@typescript-deploys/pr-build 5.3.0-pr-55820-7 → 5.3.0-pr-54242-4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3295,6 +3295,7 @@ declare namespace ts {
3295
3295
  isNonTsProject(): boolean;
3296
3296
  isJsOnlyProject(): boolean;
3297
3297
  static resolveModule(moduleName: string, initialDir: string, host: ServerHost, log: (message: string) => void): {} | undefined;
3298
+ readonly jsDocParsingMode: JSDocParsingMode | undefined;
3298
3299
  isKnownTypesPackageName(name: string): boolean;
3299
3300
  installPackage(options: InstallPackageOptions): Promise<ApplyCodeActionCommandResult>;
3300
3301
  private get typingsCache();
@@ -3616,6 +3617,7 @@ declare namespace ts {
3616
3617
  typesMapLocation?: string;
3617
3618
  serverMode?: LanguageServiceMode;
3618
3619
  session: Session<unknown> | undefined;
3620
+ jsDocParsingMode?: JSDocParsingMode;
3619
3621
  }
3620
3622
  interface WatchOptionsAndErrors {
3621
3623
  watchOptions: WatchOptions;
@@ -3690,6 +3692,7 @@ declare namespace ts {
3690
3692
  private performanceEventHandler?;
3691
3693
  private pendingPluginEnablements?;
3692
3694
  private currentPluginEnablementPromise?;
3695
+ readonly jsDocParsingMode: JSDocParsingMode | undefined;
3693
3696
  constructor(opts: ProjectServiceOptions);
3694
3697
  toPath(fileName: string): Path;
3695
3698
  private loadTypesMap;
@@ -4408,9 +4411,12 @@ declare namespace ts {
4408
4411
  DefaultClause = 297,
4409
4412
  HeritageClause = 298,
4410
4413
  CatchClause = 299,
4411
- AssertClause = 300,
4412
- AssertEntry = 301,
4413
- ImportTypeAssertionContainer = 302,
4414
+ ImportAttributes = 300,
4415
+ ImportAttribute = 301,
4416
+ ImportTypeAttributes = 302,
4417
+ /** @deprecated */ AssertClause = 300,
4418
+ /** @deprecated */ AssertEntry = 301,
4419
+ /** @deprecated */ ImportTypeAssertionContainer = 302,
4414
4420
  PropertyAssignment = 303,
4415
4421
  ShorthandPropertyAssignment = 304,
4416
4422
  SpreadAssignment = 305,
@@ -5141,17 +5147,21 @@ declare namespace ts {
5141
5147
  interface KeywordTypeNode<TKind extends KeywordTypeSyntaxKind = KeywordTypeSyntaxKind> extends KeywordToken<TKind>, TypeNode {
5142
5148
  readonly kind: TKind;
5143
5149
  }
5144
- interface ImportTypeAssertionContainer extends Node {
5145
- readonly kind: SyntaxKind.ImportTypeAssertionContainer;
5150
+ /** @deprecated */
5151
+ type ImportTypeAssertionContainer = ImportTypeAttributes;
5152
+ interface ImportTypeAttributes extends Node {
5153
+ readonly kind: SyntaxKind.ImportTypeAttributes;
5146
5154
  readonly parent: ImportTypeNode;
5147
- readonly assertClause: AssertClause;
5155
+ /** @deprecated */ readonly assertClause: AssertClause;
5156
+ readonly attributes: ImportAttributes;
5148
5157
  readonly multiLine?: boolean;
5149
5158
  }
5150
5159
  interface ImportTypeNode extends NodeWithTypeArguments {
5151
5160
  readonly kind: SyntaxKind.ImportType;
5152
5161
  readonly isTypeOf: boolean;
5153
5162
  readonly argument: TypeNode;
5154
- readonly assertions?: ImportTypeAssertionContainer;
5163
+ /** @deprecated */ readonly assertions?: ImportTypeAssertionContainer;
5164
+ readonly attributes?: ImportTypeAttributes;
5155
5165
  readonly qualifier?: EntityName;
5156
5166
  }
5157
5167
  interface ThisTypeNode extends TypeNode {
@@ -5942,7 +5952,8 @@ declare namespace ts {
5942
5952
  readonly importClause?: ImportClause;
5943
5953
  /** If this is not a StringLiteral it will be a grammar error. */
5944
5954
  readonly moduleSpecifier: Expression;
5945
- readonly assertClause?: AssertClause;
5955
+ /** @deprecated */ readonly assertClause?: AssertClause;
5956
+ readonly attributes?: ImportAttributes;
5946
5957
  }
5947
5958
  type NamedImportBindings = NamespaceImport | NamedImports;
5948
5959
  type NamedExportBindings = NamespaceExport | NamedExports;
@@ -5953,17 +5964,24 @@ declare namespace ts {
5953
5964
  readonly name?: Identifier;
5954
5965
  readonly namedBindings?: NamedImportBindings;
5955
5966
  }
5956
- type AssertionKey = Identifier | StringLiteral;
5957
- interface AssertEntry extends Node {
5958
- readonly kind: SyntaxKind.AssertEntry;
5959
- readonly parent: AssertClause;
5960
- readonly name: AssertionKey;
5967
+ /** @deprecated */
5968
+ type AssertionKey = ImportAttributeName;
5969
+ /** @deprecated */
5970
+ type AssertEntry = ImportAttribute;
5971
+ /** @deprecated */
5972
+ type AssertClause = ImportAttributes;
5973
+ type ImportAttributeName = Identifier | StringLiteral;
5974
+ interface ImportAttribute extends Node {
5975
+ readonly kind: SyntaxKind.ImportAttribute;
5976
+ readonly parent: ImportAttributes;
5977
+ readonly name: ImportAttributeName;
5961
5978
  readonly value: Expression;
5962
5979
  }
5963
- interface AssertClause extends Node {
5964
- readonly kind: SyntaxKind.AssertClause;
5980
+ interface ImportAttributes extends Node {
5981
+ readonly token: SyntaxKind.WithKeyword | SyntaxKind.AssertKeyword;
5982
+ readonly kind: SyntaxKind.ImportAttributes;
5965
5983
  readonly parent: ImportDeclaration | ExportDeclaration;
5966
- readonly elements: NodeArray<AssertEntry>;
5984
+ readonly elements: NodeArray<ImportAttribute>;
5967
5985
  readonly multiLine?: boolean;
5968
5986
  }
5969
5987
  interface NamespaceImport extends NamedDeclaration {
@@ -5989,7 +6007,8 @@ declare namespace ts {
5989
6007
  readonly exportClause?: NamedExportBindings;
5990
6008
  /** If this is not a StringLiteral it will be a grammar error. */
5991
6009
  readonly moduleSpecifier?: Expression;
5992
- readonly assertClause?: AssertClause;
6010
+ /** @deprecated */ readonly assertClause?: AssertClause;
6011
+ readonly attributes?: ImportAttributes;
5993
6012
  }
5994
6013
  interface NamedImports extends Node {
5995
6014
  readonly kind: SyntaxKind.NamedImports;
@@ -7750,6 +7769,7 @@ declare namespace ts {
7750
7769
  hasInvalidatedResolutions?(filePath: Path): boolean;
7751
7770
  createHash?(data: string): string;
7752
7771
  getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined;
7772
+ jsDocParsingMode?: JSDocParsingMode;
7753
7773
  }
7754
7774
  interface SourceMapRange extends TextRange {
7755
7775
  source?: SourceMapSource;
@@ -7950,8 +7970,8 @@ declare namespace ts {
7950
7970
  updateConditionalTypeNode(node: ConditionalTypeNode, checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode): ConditionalTypeNode;
7951
7971
  createInferTypeNode(typeParameter: TypeParameterDeclaration): InferTypeNode;
7952
7972
  updateInferTypeNode(node: InferTypeNode, typeParameter: TypeParameterDeclaration): InferTypeNode;
7953
- createImportTypeNode(argument: TypeNode, assertions?: ImportTypeAssertionContainer, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode;
7954
- updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, assertions: ImportTypeAssertionContainer | undefined, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean): ImportTypeNode;
7973
+ createImportTypeNode(argument: TypeNode, attributes?: ImportTypeAttributes, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode;
7974
+ updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, attributes: ImportTypeAttributes | undefined, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean): ImportTypeNode;
7955
7975
  createParenthesizedType(type: TypeNode): ParenthesizedTypeNode;
7956
7976
  updateParenthesizedType(node: ParenthesizedTypeNode, type: TypeNode): ParenthesizedTypeNode;
7957
7977
  createThisTypeNode(): ThisTypeNode;
@@ -8108,16 +8128,22 @@ declare namespace ts {
8108
8128
  updateNamespaceExportDeclaration(node: NamespaceExportDeclaration, name: Identifier): NamespaceExportDeclaration;
8109
8129
  createImportEqualsDeclaration(modifiers: readonly ModifierLike[] | undefined, isTypeOnly: boolean, name: string | Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration;
8110
8130
  updateImportEqualsDeclaration(node: ImportEqualsDeclaration, modifiers: readonly ModifierLike[] | undefined, isTypeOnly: boolean, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration;
8111
- createImportDeclaration(modifiers: readonly ModifierLike[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause?: AssertClause): ImportDeclaration;
8112
- updateImportDeclaration(node: ImportDeclaration, modifiers: readonly ModifierLike[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause: AssertClause | undefined): ImportDeclaration;
8131
+ createImportDeclaration(modifiers: readonly ModifierLike[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, attributes?: ImportAttributes): ImportDeclaration;
8132
+ updateImportDeclaration(node: ImportDeclaration, modifiers: readonly ModifierLike[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, attributes: ImportAttributes | undefined): ImportDeclaration;
8113
8133
  createImportClause(isTypeOnly: boolean, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause;
8114
8134
  updateImportClause(node: ImportClause, isTypeOnly: boolean, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause;
8115
- createAssertClause(elements: NodeArray<AssertEntry>, multiLine?: boolean): AssertClause;
8116
- updateAssertClause(node: AssertClause, elements: NodeArray<AssertEntry>, multiLine?: boolean): AssertClause;
8117
- createAssertEntry(name: AssertionKey, value: Expression): AssertEntry;
8118
- updateAssertEntry(node: AssertEntry, name: AssertionKey, value: Expression): AssertEntry;
8119
- createImportTypeAssertionContainer(clause: AssertClause, multiLine?: boolean): ImportTypeAssertionContainer;
8120
- updateImportTypeAssertionContainer(node: ImportTypeAssertionContainer, clause: AssertClause, multiLine?: boolean): ImportTypeAssertionContainer;
8135
+ /** @deprecated */ createAssertClause(elements: NodeArray<AssertEntry>, multiLine?: boolean): AssertClause;
8136
+ /** @deprecated */ updateAssertClause(node: AssertClause, elements: NodeArray<AssertEntry>, multiLine?: boolean): AssertClause;
8137
+ /** @deprecated */ createAssertEntry(name: AssertionKey, value: Expression): AssertEntry;
8138
+ /** @deprecated */ updateAssertEntry(node: AssertEntry, name: AssertionKey, value: Expression): AssertEntry;
8139
+ /** @deprecated */ createImportTypeAssertionContainer(clause: AssertClause, multiLine?: boolean): ImportTypeAssertionContainer;
8140
+ /** @deprecated */ updateImportTypeAssertionContainer(node: ImportTypeAssertionContainer, clause: AssertClause, multiLine?: boolean): ImportTypeAssertionContainer;
8141
+ createImportAttributes(elements: NodeArray<ImportAttribute>, multiLine?: boolean): ImportAttributes;
8142
+ updateImportAttributes(node: ImportAttributes, elements: NodeArray<ImportAttribute>, multiLine?: boolean): ImportAttributes;
8143
+ createImportAttribute(name: ImportAttributeName, value: Expression): ImportAttribute;
8144
+ updateImportAttribute(node: ImportAttribute, name: ImportAttributeName, value: Expression): ImportAttribute;
8145
+ createImportTypeAttributes(attributes: ImportAttributes, multiLine?: boolean): ImportTypeAttributes;
8146
+ updateImportTypeAttributes(node: ImportTypeAttributes, attributes: ImportAttributes, multiLine?: boolean): ImportTypeAttributes;
8121
8147
  createNamespaceImport(name: Identifier): NamespaceImport;
8122
8148
  updateNamespaceImport(node: NamespaceImport, name: Identifier): NamespaceImport;
8123
8149
  createNamespaceExport(name: Identifier): NamespaceExport;
@@ -8128,8 +8154,8 @@ declare namespace ts {
8128
8154
  updateImportSpecifier(node: ImportSpecifier, isTypeOnly: boolean, propertyName: Identifier | undefined, name: Identifier): ImportSpecifier;
8129
8155
  createExportAssignment(modifiers: readonly ModifierLike[] | undefined, isExportEquals: boolean | undefined, expression: Expression): ExportAssignment;
8130
8156
  updateExportAssignment(node: ExportAssignment, modifiers: readonly ModifierLike[] | undefined, expression: Expression): ExportAssignment;
8131
- createExportDeclaration(modifiers: readonly ModifierLike[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier?: Expression, assertClause?: AssertClause): ExportDeclaration;
8132
- updateExportDeclaration(node: ExportDeclaration, modifiers: readonly ModifierLike[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier: Expression | undefined, assertClause: AssertClause | undefined): ExportDeclaration;
8157
+ createExportDeclaration(modifiers: readonly ModifierLike[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier?: Expression, attributes?: ImportAttributes): ExportDeclaration;
8158
+ updateExportDeclaration(node: ExportDeclaration, modifiers: readonly ModifierLike[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier: Expression | undefined, attributes: ImportAttributes | undefined): ExportDeclaration;
8133
8159
  createNamedExports(elements: readonly ExportSpecifier[]): NamedExports;
8134
8160
  updateNamedExports(node: NamedExports, elements: readonly ExportSpecifier[]): NamedExports;
8135
8161
  createExportSpecifier(isTypeOnly: boolean, propertyName: string | Identifier | undefined, name: string | Identifier): ExportSpecifier;
@@ -8578,7 +8604,8 @@ declare namespace ts {
8578
8604
  ObjectBindingPatternElements = 525136,
8579
8605
  ArrayBindingPatternElements = 524880,
8580
8606
  ObjectLiteralExpressionProperties = 526226,
8581
- ImportClauseEntries = 526226,
8607
+ ImportAttributes = 526226,
8608
+ /** @deprecated */ ImportClauseEntries = 526226,
8582
8609
  ArrayLiteralExpressionElements = 8914,
8583
8610
  CommaListElements = 528,
8584
8611
  CallExpressionArguments = 2576,
@@ -8607,6 +8634,33 @@ declare namespace ts {
8607
8634
  IndexSignatureParameters = 8848,
8608
8635
  JSDocComment = 33,
8609
8636
  }
8637
+ enum JSDocParsingMode {
8638
+ /**
8639
+ * Always parse JSDoc comments and include them in the AST.
8640
+ *
8641
+ * This is the default if no mode is provided.
8642
+ */
8643
+ ParseAll = 0,
8644
+ /**
8645
+ * Never parse JSDoc comments, mo matter the file type.
8646
+ */
8647
+ ParseNone = 1,
8648
+ /**
8649
+ * Parse only JSDoc comments which are needed to provide correct type errors.
8650
+ *
8651
+ * This will always parse JSDoc in non-TS files, but only parse JSDoc comments
8652
+ * containing `@see` and `@link` in TS files.
8653
+ */
8654
+ ParseForTypeErrors = 2,
8655
+ /**
8656
+ * Parse only JSDoc comments which are needed to provide correct type info.
8657
+ *
8658
+ * This will always parse JSDoc in non-TS files, but never in TS files.
8659
+ *
8660
+ * Note: Do not use this mode if you require accurate type errors; use {@link ParseForTypeErrors} instead.
8661
+ */
8662
+ ParseForTypeInfo = 3,
8663
+ }
8610
8664
  interface UserPreferences {
8611
8665
  readonly disableSuggestions?: boolean;
8612
8666
  readonly quotePreference?: "auto" | "double" | "single";
@@ -8768,6 +8822,8 @@ declare namespace ts {
8768
8822
  setOnError(onError: ErrorCallback | undefined): void;
8769
8823
  setScriptTarget(scriptTarget: ScriptTarget): void;
8770
8824
  setLanguageVariant(variant: LanguageVariant): void;
8825
+ setScriptKind(scriptKind: ScriptKind): void;
8826
+ setJSDocParsingMode(kind: JSDocParsingMode): void;
8771
8827
  /** @deprecated use {@link resetTokenState} */
8772
8828
  setTextPos(textPos: number): void;
8773
8829
  resetTokenState(pos: number): void;
@@ -9007,8 +9063,8 @@ declare namespace ts {
9007
9063
  function isTypeOnlyImportDeclaration(node: Node): node is TypeOnlyImportDeclaration;
9008
9064
  function isTypeOnlyExportDeclaration(node: Node): node is TypeOnlyExportDeclaration;
9009
9065
  function isTypeOnlyImportOrExportDeclaration(node: Node): node is TypeOnlyAliasDeclaration;
9010
- function isAssertionKey(node: Node): node is AssertionKey;
9011
9066
  function isStringTextContainingNode(node: Node): node is StringLiteral | TemplateLiteralToken;
9067
+ function isImportAttributeName(node: Node): node is ImportAttributeName;
9012
9068
  function isModifier(node: Node): node is Modifier;
9013
9069
  function isEntityName(node: Node): node is EntityName;
9014
9070
  function isPropertyName(node: Node): node is PropertyName;
@@ -9310,8 +9366,13 @@ declare namespace ts {
9310
9366
  function isImportDeclaration(node: Node): node is ImportDeclaration;
9311
9367
  function isImportClause(node: Node): node is ImportClause;
9312
9368
  function isImportTypeAssertionContainer(node: Node): node is ImportTypeAssertionContainer;
9369
+ function isImportTypeAttributes(node: Node): node is ImportTypeAttributes;
9370
+ /** @deprecated */
9313
9371
  function isAssertClause(node: Node): node is AssertClause;
9372
+ /** @deprecated */
9314
9373
  function isAssertEntry(node: Node): node is AssertEntry;
9374
+ function isImportAttributes(node: Node): node is ImportAttributes;
9375
+ function isImportAttribute(node: Node): node is ImportAttribute;
9315
9376
  function isNamespaceImport(node: Node): node is NamespaceImport;
9316
9377
  function isNamespaceExport(node: Node): node is NamespaceExport;
9317
9378
  function isNamedImports(node: Node): node is NamedImports;
@@ -9437,6 +9498,7 @@ declare namespace ts {
9437
9498
  * check specified by `isFileProbablyExternalModule` will be used to set the field.
9438
9499
  */
9439
9500
  setExternalModuleIndicator?: (file: SourceFile) => void;
9501
+ jsDocParsingMode?: JSDocParsingMode;
9440
9502
  }
9441
9503
  function parseCommandLine(commandLine: readonly string[], readFile?: (path: string) => string | undefined): ParsedCommandLine;
9442
9504
  /**
@@ -10027,6 +10089,7 @@ declare namespace ts {
10027
10089
  * Returns the module resolution cache used by a provided `resolveModuleNames` implementation so that any non-name module resolution operations (eg, package.json lookup) can reuse it
10028
10090
  */
10029
10091
  getModuleResolutionCache?(): ModuleResolutionCache | undefined;
10092
+ jsDocParsingMode?: JSDocParsingMode;
10030
10093
  }
10031
10094
  interface WatchCompilerHost<T extends BuilderProgram> extends ProgramHost<T>, WatchHost {
10032
10095
  /** Instead of using output d.ts file from project reference, use its source file */
@@ -10277,6 +10340,7 @@ declare namespace ts {
10277
10340
  installPackage?(options: InstallPackageOptions): Promise<ApplyCodeActionCommandResult>;
10278
10341
  writeFile?(fileName: string, content: string): void;
10279
10342
  getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined;
10343
+ jsDocParsingMode?: JSDocParsingMode;
10280
10344
  }
10281
10345
  type WithMetadata<T> = T & {
10282
10346
  metadata?: unknown;
@@ -11374,7 +11438,7 @@ declare namespace ts {
11374
11438
  fileName: string;
11375
11439
  highlightSpans: HighlightSpan[];
11376
11440
  }
11377
- function createDocumentRegistry(useCaseSensitiveFileNames?: boolean, currentDirectory?: string): DocumentRegistry;
11441
+ function createDocumentRegistry(useCaseSensitiveFileNames?: boolean, currentDirectory?: string, jsDocParsingMode?: JSDocParsingMode): DocumentRegistry;
11378
11442
  /**
11379
11443
  * The document registry represents a store of SourceFile objects that can be shared between
11380
11444
  * multiple LanguageService instances. A LanguageService instance holds on the SourceFile (AST)