Mark APIs related to prepend option deprecated (#52344)

This commit is contained in:
Sheetal Nandi 2023-01-20 15:25:19 -08:00 коммит произвёл GitHub
Родитель d76f3612c1
Коммит e474b3df69
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
12 изменённых файлов: 138 добавлений и 68 удалений

Просмотреть файл

@ -154,6 +154,7 @@ export interface ReusableBuilderProgramState extends BuilderState {
*/
latestChangedDtsFile: string | undefined;
/**
* @deprecated
* Bundle information either from oldState or current one so it can be used to complete the information in buildInfo when emitting only js or dts files
*/
bundle?: BundleBuildInfo;

Просмотреть файл

@ -1168,6 +1168,7 @@ export const notImplementedResolver: EmitResolver = {
/**
* File that isnt present resulting in error or output files
*
* @deprecated
* @internal
*/
export type EmitUsingBuildInfoResult = string | readonly OutputFile[];
@ -1199,7 +1200,7 @@ function createSourceFilesFromBundleBuildInfo(bundle: BundleBuildInfo, buildInfo
});
}
/** @internal */
/** @deprecated @internal */
export function emitUsingBuildInfo(
config: ParsedCommandLine,
host: CompilerHost,

Просмотреть файл

@ -7273,8 +7273,11 @@ const syntheticFactory: BaseNodeFactory = {
export const factory = createNodeFactory(NodeFactoryFlags.NoIndentationOnFreshPropertyAccess, syntheticFactory);
/** @deprecated */
export function createUnparsedSourceFile(text: string): UnparsedSource;
/** @deprecated */
export function createUnparsedSourceFile(inputFile: InputFiles, type: "js" | "dts", stripInternal?: boolean): UnparsedSource;
/** @deprecated */
export function createUnparsedSourceFile(text: string, mapPath: string | undefined, map: string | undefined): UnparsedSource;
export function createUnparsedSourceFile(textOrInputFiles: string | InputFiles, mapPathOrType?: string, mapTextOrStripInternal?: string | boolean): UnparsedSource {
let stripInternal: boolean | undefined;
@ -7445,10 +7448,12 @@ function parseOldFileOfCurrentEmit(bundleFileInfo: BundleFileInfo) {
}
// TODO(rbuckton): Move part of this to factory
/** @deprecated */
export function createInputFiles(
javascriptText: string,
declarationText: string
): InputFiles;
/** @deprecated */
export function createInputFiles(
javascriptText: string,
declarationText: string,
@ -7457,6 +7462,7 @@ export function createInputFiles(
declarationMapPath: string | undefined,
declarationMapText: string | undefined
): InputFiles;
/** @deprecated */
export function createInputFiles(
readFileText: (path: string) => string | undefined,
javascriptPath: string,
@ -7493,7 +7499,7 @@ export function createInputFiles(
declarationMapTextOrBuildInfoPath,
);
}
/** @internal */
/** @deprecated @internal */
export function createInputFilesWithFilePaths(
readFileText: (path: string) => string | undefined,
javascriptPath: string,
@ -7546,7 +7552,7 @@ export function createInputFilesWithFilePaths(
});
return node;
}
/** @internal */
/** @deprecated @internal */
export function createInputFilesWithFileTexts(
javascriptPath: string | undefined,
javascriptText: string,

Просмотреть файл

@ -1011,7 +1011,7 @@ export function isEnumMember(node: Node): node is EnumMember {
// Unparsed
// TODO(rbuckton): isUnparsedPrologue
/** @deprecated */
export function isUnparsedPrepend(node: Node): node is UnparsedPrepend {
return node.kind === SyntaxKind.UnparsedPrepend;
}
@ -1029,6 +1029,7 @@ export function isBundle(node: Node): node is Bundle {
return node.kind === SyntaxKind.Bundle;
}
/** @deprecated */
export function isUnparsedSource(node: Node): node is UnparsedSource {
return node.kind === SyntaxKind.UnparsedSource;
}

Просмотреть файл

@ -5023,7 +5023,7 @@ export function parseConfigHostFromCompilerHostLike(host: CompilerHostLike, dire
};
}
/** @internal */
/** @deprecated @internal */
export function createPrependNodes(
projectReferences: readonly ProjectReference[] | undefined,
getCommandLine: (ref: ProjectReference, index: number) => ParsedCommandLine | undefined,

Просмотреть файл

@ -16,6 +16,7 @@ export enum UpToDateStatusType {
*/
UpToDateWithUpstreamTypes,
/**
* @deprecated
* The project appears out of date because its upstream inputs are newer than its outputs,
* but all of its outputs are actually newer than the previous identical outputs of its (.d.ts) inputs.
* This means we can Pseudo-build (just manipulate outputs), as if we had actually built this project.
@ -87,6 +88,7 @@ export namespace Status {
}
/**
* @deprecated
* The project is up to date with respect to its inputs except for prepend output changed (no declaration file change in prepend).
*/
export interface OutOfDateWithPrepend {

Просмотреть файл

@ -237,8 +237,8 @@ export interface SolutionBuilderHostBase<T extends BuilderProgram> extends Progr
// TODO: To do better with watch mode and normal build mode api that creates program and emits files
// This currently helps enable --diagnostics and --extendedDiagnostics
afterProgramEmitAndDiagnostics?(program: T): void;
/** @internal */ beforeEmitBundle?(config: ParsedCommandLine): void;
/** @internal */ afterEmitBundle?(config: ParsedCommandLine): void;
/** @deprecated @internal */ beforeEmitBundle?(config: ParsedCommandLine): void;
/** @deprecated @internal */ afterEmitBundle?(config: ParsedCommandLine): void;
// For testing
/** @internal */ now?(): Date;
@ -795,7 +795,7 @@ function setupInitialBuild<T extends BuilderProgram>(state: SolutionBuilderState
export enum InvalidatedProjectKind {
Build,
UpdateBundle,
/** @deprecated */ UpdateBundle,
UpdateOutputFileStamps
}
@ -847,6 +847,7 @@ export interface BuildInvalidedProject<T extends BuilderProgram> extends Invalid
// emitNextAffectedFile(writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, customTransformers?: CustomTransformers): AffectedFileResult<EmitResult>;
}
/** @deprecated */
export interface UpdateBundleProject<T extends BuilderProgram> extends InvalidatedProjectBase {
readonly kind: InvalidatedProjectKind.UpdateBundle;
emit(writeFile?: WriteFileCallback, customTransformers?: CustomTransformers): EmitResult | BuildInvalidedProject<T> | undefined;
@ -898,9 +899,9 @@ enum BuildStep {
SyntaxDiagnostics,
SemanticDiagnostics,
Emit,
EmitBundle,
/** @deprecated */ EmitBundle,
EmitBuildInfo,
BuildInvalidatedProjectOfBundle,
/** @deprecated */ BuildInvalidatedProjectOfBundle,
QueueReferencingProjects,
Done
}

Просмотреть файл

@ -378,17 +378,17 @@ export const enum SyntaxKind {
// Enum
EnumMember,
// Unparsed
UnparsedPrologue,
UnparsedPrepend,
UnparsedText,
UnparsedInternalText,
UnparsedSyntheticReference,
/** @deprecated */ UnparsedPrologue,
/** @deprecated */ UnparsedPrepend,
/** @deprecated */ UnparsedText,
/** @deprecated */ UnparsedInternalText,
/** @deprecated */ UnparsedSyntheticReference,
// Top-level nodes
SourceFile,
Bundle,
UnparsedSource,
InputFiles,
/** @deprecated */ UnparsedSource,
/** @deprecated */ InputFiles,
// JSDoc nodes
JSDocTypeExpression,
@ -4408,7 +4408,7 @@ export type ExportedModulesFromDeclarationEmit = readonly Symbol[];
export interface Bundle extends Node {
readonly kind: SyntaxKind.Bundle;
readonly prepends: readonly (InputFiles | UnparsedSource)[];
/** @deprecated */ readonly prepends: readonly (InputFiles | UnparsedSource)[];
readonly sourceFiles: readonly SourceFile[];
/** @internal */ syntheticFileReferences?: readonly FileReference[];
/** @internal */ syntheticTypeReferences?: readonly FileReference[];
@ -4416,6 +4416,7 @@ export interface Bundle extends Node {
/** @internal */ hasNoDefaultLib?: boolean;
}
/** @deprecated */
export interface InputFiles extends Node {
readonly kind: SyntaxKind.InputFiles;
javascriptPath?: string;
@ -4431,6 +4432,7 @@ export interface InputFiles extends Node {
/** @internal */ oldFileOfCurrentEmit?: boolean;
}
/** @deprecated */
export interface UnparsedSource extends Node {
readonly kind: SyntaxKind.UnparsedSource;
fileName: string;
@ -4455,29 +4457,34 @@ export interface UnparsedSource extends Node {
getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
}
/** @deprecated */
export type UnparsedSourceText =
| UnparsedPrepend
| UnparsedTextLike
;
/** @deprecated */
export type UnparsedNode =
| UnparsedPrologue
| UnparsedSourceText
| UnparsedSyntheticReference
;
/** @deprecated */
export interface UnparsedSection extends Node {
readonly kind: SyntaxKind;
readonly parent: UnparsedSource;
readonly data?: string;
}
/** @deprecated */
export interface UnparsedPrologue extends UnparsedSection {
readonly kind: SyntaxKind.UnparsedPrologue;
readonly parent: UnparsedSource;
readonly data: string;
}
/** @deprecated */
export interface UnparsedPrepend extends UnparsedSection {
readonly kind: SyntaxKind.UnparsedPrepend;
readonly parent: UnparsedSource;
@ -4485,11 +4492,13 @@ export interface UnparsedPrepend extends UnparsedSection {
readonly texts: readonly UnparsedTextLike[];
}
/** @deprecated */
export interface UnparsedTextLike extends UnparsedSection {
readonly kind: SyntaxKind.UnparsedText | SyntaxKind.UnparsedInternalText;
readonly parent: UnparsedSource;
}
/** @deprecated */
export interface UnparsedSyntheticReference extends UnparsedSection {
readonly kind: SyntaxKind.UnparsedSyntheticReference;
readonly parent: UnparsedSource;
@ -8008,7 +8017,7 @@ export interface EmitHost extends ScriptReferenceHost, ModuleSpecifierResolution
isEmitBlocked(emitFileName: string): boolean;
getPrependNodes(): readonly (InputFiles | UnparsedSource)[];
/** @deprecated */ getPrependNodes(): readonly (InputFiles | UnparsedSource)[];
writeFile: WriteFileCallback;
getBuildInfo(bundle: BundleBuildInfo | undefined): BuildInfo | undefined;
@ -8666,12 +8675,12 @@ export interface NodeFactory {
/** @internal */ createRedirectedSourceFile(redirectInfo: RedirectInfo): SourceFile;
/** @internal */ createUnparsedSource(prologues: readonly UnparsedPrologue[], syntheticReferences: readonly UnparsedSyntheticReference[] | undefined, texts: readonly UnparsedSourceText[]): UnparsedSource;
/** @internal */ createUnparsedPrologue(data?: string): UnparsedPrologue;
/** @internal */ createUnparsedPrepend(data: string | undefined, texts: readonly UnparsedSourceText[]): UnparsedPrepend;
/** @internal */ createUnparsedTextLike(data: string | undefined, internal: boolean): UnparsedTextLike;
/** @internal */ createUnparsedSyntheticReference(section: BundleFileHasNoDefaultLib | BundleFileReference): UnparsedSyntheticReference;
/** @internal */ createInputFiles(): InputFiles;
/** @deprecated @internal */ createUnparsedSource(prologues: readonly UnparsedPrologue[], syntheticReferences: readonly UnparsedSyntheticReference[] | undefined, texts: readonly UnparsedSourceText[]): UnparsedSource;
/** @deprecated @internal */ createUnparsedPrologue(data?: string): UnparsedPrologue;
/** @deprecated @internal */ createUnparsedPrepend(data: string | undefined, texts: readonly UnparsedSourceText[]): UnparsedPrepend;
/** @deprecated @internal */ createUnparsedTextLike(data: string | undefined, internal: boolean): UnparsedTextLike;
/** @deprecated @internal */ createUnparsedSyntheticReference(section: BundleFileHasNoDefaultLib | BundleFileReference): UnparsedSyntheticReference;
/** @deprecated @internal */ createInputFiles(): InputFiles;
//
// Synthetic Nodes
@ -8692,8 +8701,10 @@ export interface NodeFactory {
/** @internal */ updateSyntheticReferenceExpression(node: SyntheticReferenceExpression, expression: Expression, thisArg: Expression): SyntheticReferenceExpression;
createCommaListExpression(elements: readonly Expression[]): CommaListExpression;
updateCommaListExpression(node: CommaListExpression, elements: readonly Expression[]): CommaListExpression;
createBundle(sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[]): Bundle;
updateBundle(node: Bundle, sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[]): Bundle;
createBundle(sourceFiles: readonly SourceFile[]): Bundle;
/** @deprecated*/ createBundle(sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[]): Bundle; // eslint-disable-line @typescript-eslint/unified-signatures
updateBundle(node: Bundle, sourceFiles: readonly SourceFile[]): Bundle;
/** @deprecated*/ updateBundle(node: Bundle, sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[]): Bundle; // eslint-disable-line @typescript-eslint/unified-signatures
//
// Common operators
@ -9159,10 +9170,10 @@ export interface Printer {
/** @internal */ writeList<T extends Node>(format: ListFormat, list: NodeArray<T> | undefined, sourceFile: SourceFile | undefined, writer: EmitTextWriter): void;
/** @internal */ writeFile(sourceFile: SourceFile, writer: EmitTextWriter, sourceMapGenerator: SourceMapGenerator | undefined): void;
/** @internal */ writeBundle(bundle: Bundle, writer: EmitTextWriter, sourceMapGenerator: SourceMapGenerator | undefined): void;
/** @internal */ bundleFileInfo?: BundleFileInfo;
/** @deprecated @internal */ bundleFileInfo?: BundleFileInfo;
}
/** @internal */
/** @deprecated @internal */
export const enum BundleFileSectionKind {
Prologue = "prologue",
EmitHelpers = "emitHelpers",
@ -9178,51 +9189,51 @@ export const enum BundleFileSectionKind {
// comments?
}
/** @internal */
/** @deprecated @internal */
export interface BundleFileSectionBase extends TextRange {
kind: BundleFileSectionKind;
data?: string;
}
/** @internal */
/** @deprecated @internal */
export interface BundleFilePrologue extends BundleFileSectionBase {
kind: BundleFileSectionKind.Prologue;
data: string;
}
/** @internal */
/** @deprecated @internal */
export interface BundleFileEmitHelpers extends BundleFileSectionBase {
kind: BundleFileSectionKind.EmitHelpers;
data: string;
}
/** @internal */
/** @deprecated @internal */
export interface BundleFileHasNoDefaultLib extends BundleFileSectionBase {
kind: BundleFileSectionKind.NoDefaultLib;
}
/** @internal */
/** @deprecated @internal */
export interface BundleFileReference extends BundleFileSectionBase {
kind: BundleFileSectionKind.Reference | BundleFileSectionKind.Type | BundleFileSectionKind.Lib | BundleFileSectionKind.TypeResolutionModeImport | BundleFileSectionKind.TypeResolutionModeRequire;
data: string;
}
/** @internal */
/** @deprecated @internal */
export interface BundleFilePrepend extends BundleFileSectionBase {
kind: BundleFileSectionKind.Prepend;
data: string;
texts: BundleFileTextLike[];
}
/** @internal */
/** @deprecated @internal */
export type BundleFileTextLikeKind = BundleFileSectionKind.Text | BundleFileSectionKind.Internal;
/** @internal */
/** @deprecated @internal */
export interface BundleFileTextLike extends BundleFileSectionBase {
kind: BundleFileTextLikeKind;
}
/** @internal */
/** @deprecated @internal */
export type BundleFileSection =
BundleFilePrologue
| BundleFileEmitHelpers
@ -9231,31 +9242,31 @@ export type BundleFileSection =
| BundleFilePrepend
| BundleFileTextLike;
/** @internal */
/** @deprecated @internal */
export interface SourceFilePrologueDirectiveExpression extends TextRange {
text: string;
}
/** @internal */
/** @deprecated @internal */
export interface SourceFilePrologueDirective extends TextRange {
expression: SourceFilePrologueDirectiveExpression;
}
/** @internal */
/** @deprecated @internal */
export interface SourceFilePrologueInfo {
file: number;
text: string;
directives: SourceFilePrologueDirective[];
}
/** @internal */
/** @deprecated @internal */
export interface SourceFileInfo {
// List of helpers in own source files emitted if no prepend is present
helpers?: string[];
prologues?: SourceFilePrologueInfo[];
}
/** @internal */
/** @deprecated @internal */
export interface BundleFileInfo {
sections: BundleFileSection[];
hash?: string;
@ -9263,7 +9274,7 @@ export interface BundleFileInfo {
sources?: SourceFileInfo;
}
/** @internal */
/** @deprecated @internal */
export interface BundleBuildInfo {
js?: BundleFileInfo;
dts?: BundleFileInfo;
@ -9273,6 +9284,7 @@ export interface BundleBuildInfo {
/** @internal */
export interface BuildInfo {
/** @deprecated */
bundle?: BundleBuildInfo;
program?: ProgramBuildInfo;
version: string;
@ -9351,7 +9363,7 @@ export interface PrinterOptions {
/** @internal */ extendedDiagnostics?: boolean;
/** @internal */ onlyPrintJsDocStyle?: boolean;
/** @internal */ neverAsciiEscape?: boolean;
/** @internal */ writeBundleFileInfo?: boolean;
/** @deprecated @internal */ writeBundleFileInfo?: boolean;
/** @internal */ recordInternalSection?: boolean;
/** @internal */ stripInternal?: boolean;
/** @internal */ preserveSourceNewlines?: boolean;

Просмотреть файл

@ -7406,7 +7406,7 @@ export function getNameOfAccessExpression(node: AccessExpression) {
return node.argumentExpression;
}
/** @internal */
/** @deprecated @internal */
export function isBundleFileTextLike(section: BundleFileSection): section is BundleFileTextLike {
switch (section.kind) {
case BundleFileSectionKind.Text:

Просмотреть файл

@ -1376,6 +1376,7 @@ export function isNamedExportBindings(node: Node): node is NamedExportBindings {
return node.kind === SyntaxKind.NamespaceExport || node.kind === SyntaxKind.NamedExports;
}
/** @deprecated */
export function isUnparsedTextLike(node: Node): node is UnparsedTextLike {
switch (node.kind) {
case SyntaxKind.UnparsedText:
@ -1386,6 +1387,7 @@ export function isUnparsedTextLike(node: Node): node is UnparsedTextLike {
}
}
/** @deprecated */
export function isUnparsedNode(node: Node): node is UnparsedNode {
return isUnparsedTextLike(node) ||
node.kind === SyntaxKind.UnparsedPrologue ||

Просмотреть файл

@ -4327,15 +4327,15 @@ declare namespace ts {
ShorthandPropertyAssignment = 300,
SpreadAssignment = 301,
EnumMember = 302,
UnparsedPrologue = 303,
UnparsedPrepend = 304,
UnparsedText = 305,
UnparsedInternalText = 306,
UnparsedSyntheticReference = 307,
/** @deprecated */ UnparsedPrologue = 303,
/** @deprecated */ UnparsedPrepend = 304,
/** @deprecated */ UnparsedText = 305,
/** @deprecated */ UnparsedInternalText = 306,
/** @deprecated */ UnparsedSyntheticReference = 307,
SourceFile = 308,
Bundle = 309,
UnparsedSource = 310,
InputFiles = 311,
/** @deprecated */ UnparsedSource = 310,
/** @deprecated */ InputFiles = 311,
JSDocTypeExpression = 312,
JSDocNameReference = 313,
JSDocMemberName = 314,
@ -6104,9 +6104,10 @@ declare namespace ts {
}
interface Bundle extends Node {
readonly kind: SyntaxKind.Bundle;
readonly prepends: readonly (InputFiles | UnparsedSource)[];
/** @deprecated */ readonly prepends: readonly (InputFiles | UnparsedSource)[];
readonly sourceFiles: readonly SourceFile[];
}
/** @deprecated */
interface InputFiles extends Node {
readonly kind: SyntaxKind.InputFiles;
javascriptPath?: string;
@ -6118,6 +6119,7 @@ declare namespace ts {
declarationMapPath?: string;
declarationMapText?: string;
}
/** @deprecated */
interface UnparsedSource extends Node {
readonly kind: SyntaxKind.UnparsedSource;
fileName: string;
@ -6133,28 +6135,35 @@ declare namespace ts {
readonly syntheticReferences?: readonly UnparsedSyntheticReference[];
readonly texts: readonly UnparsedSourceText[];
}
/** @deprecated */
type UnparsedSourceText = UnparsedPrepend | UnparsedTextLike;
/** @deprecated */
type UnparsedNode = UnparsedPrologue | UnparsedSourceText | UnparsedSyntheticReference;
/** @deprecated */
interface UnparsedSection extends Node {
readonly kind: SyntaxKind;
readonly parent: UnparsedSource;
readonly data?: string;
}
/** @deprecated */
interface UnparsedPrologue extends UnparsedSection {
readonly kind: SyntaxKind.UnparsedPrologue;
readonly parent: UnparsedSource;
readonly data: string;
}
/** @deprecated */
interface UnparsedPrepend extends UnparsedSection {
readonly kind: SyntaxKind.UnparsedPrepend;
readonly parent: UnparsedSource;
readonly data: string;
readonly texts: readonly UnparsedTextLike[];
}
/** @deprecated */
interface UnparsedTextLike extends UnparsedSection {
readonly kind: SyntaxKind.UnparsedText | SyntaxKind.UnparsedInternalText;
readonly parent: UnparsedSource;
}
/** @deprecated */
interface UnparsedSyntheticReference extends UnparsedSection {
readonly kind: SyntaxKind.UnparsedSyntheticReference;
readonly parent: UnparsedSource;
@ -7876,8 +7885,10 @@ declare namespace ts {
updatePartiallyEmittedExpression(node: PartiallyEmittedExpression, expression: Expression): PartiallyEmittedExpression;
createCommaListExpression(elements: readonly Expression[]): CommaListExpression;
updateCommaListExpression(node: CommaListExpression, elements: readonly Expression[]): CommaListExpression;
createBundle(sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[]): Bundle;
updateBundle(node: Bundle, sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[]): Bundle;
createBundle(sourceFiles: readonly SourceFile[]): Bundle;
/** @deprecated*/ createBundle(sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[]): Bundle;
updateBundle(node: Bundle, sourceFiles: readonly SourceFile[]): Bundle;
/** @deprecated*/ updateBundle(node: Bundle, sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[]): Bundle;
createComma(left: Expression, right: Expression): BinaryExpression;
createAssignment(left: ObjectLiteralExpression | ArrayLiteralExpression, right: Expression): DestructuringAssignment;
createAssignment(left: Expression, right: Expression): AssignmentExpression<EqualsToken>;
@ -8583,7 +8594,9 @@ declare namespace ts {
function isNonNullChain(node: Node): node is NonNullChain;
function isBreakOrContinueStatement(node: Node): node is BreakOrContinueStatement;
function isNamedExportBindings(node: Node): node is NamedExportBindings;
/** @deprecated */
function isUnparsedTextLike(node: Node): node is UnparsedTextLike;
/** @deprecated */
function isUnparsedNode(node: Node): node is UnparsedNode;
function isJSDocPropertyLikeTag(node: Node): node is JSDocPropertyLikeTag;
/**
@ -8653,11 +8666,17 @@ declare namespace ts {
name: Identifier;
};
function emitModuleKindIsNonNodeESM(moduleKind: ModuleKind): boolean;
/** @deprecated */
function createUnparsedSourceFile(text: string): UnparsedSource;
/** @deprecated */
function createUnparsedSourceFile(inputFile: InputFiles, type: "js" | "dts", stripInternal?: boolean): UnparsedSource;
/** @deprecated */
function createUnparsedSourceFile(text: string, mapPath: string | undefined, map: string | undefined): UnparsedSource;
/** @deprecated */
function createInputFiles(javascriptText: string, declarationText: string): InputFiles;
/** @deprecated */
function createInputFiles(javascriptText: string, declarationText: string, javascriptMapPath: string | undefined, javascriptMapText: string | undefined, declarationMapPath: string | undefined, declarationMapText: string | undefined): InputFiles;
/** @deprecated */
function createInputFiles(readFileText: (path: string) => string | undefined, javascriptPath: string, javascriptMapPath: string | undefined, declarationPath: string, declarationMapPath: string | undefined, buildInfoPath: string | undefined): InputFiles;
/**
* Create an external source map source file reference
@ -8891,9 +8910,11 @@ declare namespace ts {
function isShorthandPropertyAssignment(node: Node): node is ShorthandPropertyAssignment;
function isSpreadAssignment(node: Node): node is SpreadAssignment;
function isEnumMember(node: Node): node is EnumMember;
/** @deprecated */
function isUnparsedPrepend(node: Node): node is UnparsedPrepend;
function isSourceFile(node: Node): node is SourceFile;
function isBundle(node: Node): node is Bundle;
/** @deprecated */
function isUnparsedSource(node: Node): node is UnparsedSource;
function isJSDocTypeExpression(node: Node): node is JSDocTypeExpression;
function isJSDocNameReference(node: Node): node is JSDocNameReference;
@ -9680,7 +9701,7 @@ declare namespace ts {
}
enum InvalidatedProjectKind {
Build = 0,
UpdateBundle = 1,
/** @deprecated */ UpdateBundle = 1,
UpdateOutputFileStamps = 2
}
interface InvalidatedProjectBase {
@ -9712,6 +9733,7 @@ declare namespace ts {
getSemanticDiagnosticsOfNextAffectedFile(cancellationToken?: CancellationToken, ignoreSourceFile?: (sourceFile: SourceFile) => boolean): AffectedFileResult<readonly Diagnostic[]>;
emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): EmitResult | undefined;
}
/** @deprecated */
interface UpdateBundleProject<T extends BuilderProgram> extends InvalidatedProjectBase {
readonly kind: InvalidatedProjectKind.UpdateBundle;
emit(writeFile?: WriteFileCallback, customTransformers?: CustomTransformers): EmitResult | BuildInvalidedProject<T> | undefined;

44
tests/baselines/reference/api/typescript.d.ts поставляемый
Просмотреть файл

@ -348,15 +348,15 @@ declare namespace ts {
ShorthandPropertyAssignment = 300,
SpreadAssignment = 301,
EnumMember = 302,
UnparsedPrologue = 303,
UnparsedPrepend = 304,
UnparsedText = 305,
UnparsedInternalText = 306,
UnparsedSyntheticReference = 307,
/** @deprecated */ UnparsedPrologue = 303,
/** @deprecated */ UnparsedPrepend = 304,
/** @deprecated */ UnparsedText = 305,
/** @deprecated */ UnparsedInternalText = 306,
/** @deprecated */ UnparsedSyntheticReference = 307,
SourceFile = 308,
Bundle = 309,
UnparsedSource = 310,
InputFiles = 311,
/** @deprecated */ UnparsedSource = 310,
/** @deprecated */ InputFiles = 311,
JSDocTypeExpression = 312,
JSDocNameReference = 313,
JSDocMemberName = 314,
@ -2125,9 +2125,10 @@ declare namespace ts {
}
interface Bundle extends Node {
readonly kind: SyntaxKind.Bundle;
readonly prepends: readonly (InputFiles | UnparsedSource)[];
/** @deprecated */ readonly prepends: readonly (InputFiles | UnparsedSource)[];
readonly sourceFiles: readonly SourceFile[];
}
/** @deprecated */
interface InputFiles extends Node {
readonly kind: SyntaxKind.InputFiles;
javascriptPath?: string;
@ -2139,6 +2140,7 @@ declare namespace ts {
declarationMapPath?: string;
declarationMapText?: string;
}
/** @deprecated */
interface UnparsedSource extends Node {
readonly kind: SyntaxKind.UnparsedSource;
fileName: string;
@ -2154,28 +2156,35 @@ declare namespace ts {
readonly syntheticReferences?: readonly UnparsedSyntheticReference[];
readonly texts: readonly UnparsedSourceText[];
}
/** @deprecated */
type UnparsedSourceText = UnparsedPrepend | UnparsedTextLike;
/** @deprecated */
type UnparsedNode = UnparsedPrologue | UnparsedSourceText | UnparsedSyntheticReference;
/** @deprecated */
interface UnparsedSection extends Node {
readonly kind: SyntaxKind;
readonly parent: UnparsedSource;
readonly data?: string;
}
/** @deprecated */
interface UnparsedPrologue extends UnparsedSection {
readonly kind: SyntaxKind.UnparsedPrologue;
readonly parent: UnparsedSource;
readonly data: string;
}
/** @deprecated */
interface UnparsedPrepend extends UnparsedSection {
readonly kind: SyntaxKind.UnparsedPrepend;
readonly parent: UnparsedSource;
readonly data: string;
readonly texts: readonly UnparsedTextLike[];
}
/** @deprecated */
interface UnparsedTextLike extends UnparsedSection {
readonly kind: SyntaxKind.UnparsedText | SyntaxKind.UnparsedInternalText;
readonly parent: UnparsedSource;
}
/** @deprecated */
interface UnparsedSyntheticReference extends UnparsedSection {
readonly kind: SyntaxKind.UnparsedSyntheticReference;
readonly parent: UnparsedSource;
@ -3897,8 +3906,10 @@ declare namespace ts {
updatePartiallyEmittedExpression(node: PartiallyEmittedExpression, expression: Expression): PartiallyEmittedExpression;
createCommaListExpression(elements: readonly Expression[]): CommaListExpression;
updateCommaListExpression(node: CommaListExpression, elements: readonly Expression[]): CommaListExpression;
createBundle(sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[]): Bundle;
updateBundle(node: Bundle, sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[]): Bundle;
createBundle(sourceFiles: readonly SourceFile[]): Bundle;
/** @deprecated*/ createBundle(sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[]): Bundle;
updateBundle(node: Bundle, sourceFiles: readonly SourceFile[]): Bundle;
/** @deprecated*/ updateBundle(node: Bundle, sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[]): Bundle;
createComma(left: Expression, right: Expression): BinaryExpression;
createAssignment(left: ObjectLiteralExpression | ArrayLiteralExpression, right: Expression): DestructuringAssignment;
createAssignment(left: Expression, right: Expression): AssignmentExpression<EqualsToken>;
@ -4604,7 +4615,9 @@ declare namespace ts {
function isNonNullChain(node: Node): node is NonNullChain;
function isBreakOrContinueStatement(node: Node): node is BreakOrContinueStatement;
function isNamedExportBindings(node: Node): node is NamedExportBindings;
/** @deprecated */
function isUnparsedTextLike(node: Node): node is UnparsedTextLike;
/** @deprecated */
function isUnparsedNode(node: Node): node is UnparsedNode;
function isJSDocPropertyLikeTag(node: Node): node is JSDocPropertyLikeTag;
/**
@ -4674,11 +4687,17 @@ declare namespace ts {
name: Identifier;
};
function emitModuleKindIsNonNodeESM(moduleKind: ModuleKind): boolean;
/** @deprecated */
function createUnparsedSourceFile(text: string): UnparsedSource;
/** @deprecated */
function createUnparsedSourceFile(inputFile: InputFiles, type: "js" | "dts", stripInternal?: boolean): UnparsedSource;
/** @deprecated */
function createUnparsedSourceFile(text: string, mapPath: string | undefined, map: string | undefined): UnparsedSource;
/** @deprecated */
function createInputFiles(javascriptText: string, declarationText: string): InputFiles;
/** @deprecated */
function createInputFiles(javascriptText: string, declarationText: string, javascriptMapPath: string | undefined, javascriptMapText: string | undefined, declarationMapPath: string | undefined, declarationMapText: string | undefined): InputFiles;
/** @deprecated */
function createInputFiles(readFileText: (path: string) => string | undefined, javascriptPath: string, javascriptMapPath: string | undefined, declarationPath: string, declarationMapPath: string | undefined, buildInfoPath: string | undefined): InputFiles;
/**
* Create an external source map source file reference
@ -4912,9 +4931,11 @@ declare namespace ts {
function isShorthandPropertyAssignment(node: Node): node is ShorthandPropertyAssignment;
function isSpreadAssignment(node: Node): node is SpreadAssignment;
function isEnumMember(node: Node): node is EnumMember;
/** @deprecated */
function isUnparsedPrepend(node: Node): node is UnparsedPrepend;
function isSourceFile(node: Node): node is SourceFile;
function isBundle(node: Node): node is Bundle;
/** @deprecated */
function isUnparsedSource(node: Node): node is UnparsedSource;
function isJSDocTypeExpression(node: Node): node is JSDocTypeExpression;
function isJSDocNameReference(node: Node): node is JSDocNameReference;
@ -5701,7 +5722,7 @@ declare namespace ts {
}
enum InvalidatedProjectKind {
Build = 0,
UpdateBundle = 1,
/** @deprecated */ UpdateBundle = 1,
UpdateOutputFileStamps = 2
}
interface InvalidatedProjectBase {
@ -5733,6 +5754,7 @@ declare namespace ts {
getSemanticDiagnosticsOfNextAffectedFile(cancellationToken?: CancellationToken, ignoreSourceFile?: (sourceFile: SourceFile) => boolean): AffectedFileResult<readonly Diagnostic[]>;
emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): EmitResult | undefined;
}
/** @deprecated */
interface UpdateBundleProject<T extends BuilderProgram> extends InvalidatedProjectBase {
readonly kind: InvalidatedProjectKind.UpdateBundle;
emit(writeFile?: WriteFileCallback, customTransformers?: CustomTransformers): EmitResult | BuildInvalidedProject<T> | undefined;