typescript 4.6.0-dev.20220210 → 4.7.0-dev.20220216

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.
@@ -14,7 +14,7 @@ and limitations under the License.
14
14
  ***************************************************************************** */
15
15
 
16
16
  declare namespace ts {
17
- const versionMajorMinor = "4.6";
17
+ const versionMajorMinor = "4.7";
18
18
  /** The version of the TypeScript compiler release */
19
19
  const version: string;
20
20
  /**
@@ -572,7 +572,7 @@ declare namespace ts {
572
572
  }
573
573
  export interface JSDocContainer {
574
574
  }
575
- export type HasJSDoc = ParameterDeclaration | CallSignatureDeclaration | ClassStaticBlockDeclaration | ConstructSignatureDeclaration | MethodSignature | PropertySignature | ArrowFunction | ParenthesizedExpression | SpreadAssignment | ShorthandPropertyAssignment | PropertyAssignment | FunctionExpression | EmptyStatement | DebuggerStatement | Block | VariableStatement | ExpressionStatement | IfStatement | DoStatement | WhileStatement | ForStatement | ForInStatement | ForOfStatement | BreakStatement | ContinueStatement | ReturnStatement | WithStatement | SwitchStatement | LabeledStatement | ThrowStatement | TryStatement | FunctionDeclaration | ConstructorDeclaration | MethodDeclaration | VariableDeclaration | PropertyDeclaration | AccessorDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumMember | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | NamespaceExportDeclaration | ExportAssignment | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | ExportDeclaration | NamedTupleMember | ExportSpecifier | EndOfFileToken;
575
+ export type HasJSDoc = ParameterDeclaration | CallSignatureDeclaration | ClassStaticBlockDeclaration | ConstructSignatureDeclaration | MethodSignature | PropertySignature | ArrowFunction | ParenthesizedExpression | SpreadAssignment | ShorthandPropertyAssignment | PropertyAssignment | FunctionExpression | EmptyStatement | DebuggerStatement | Block | VariableStatement | ExpressionStatement | IfStatement | DoStatement | WhileStatement | ForStatement | ForInStatement | ForOfStatement | BreakStatement | ContinueStatement | ReturnStatement | WithStatement | SwitchStatement | LabeledStatement | ThrowStatement | TryStatement | FunctionDeclaration | ConstructorDeclaration | MethodDeclaration | VariableDeclaration | PropertyDeclaration | AccessorDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumMember | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | NamespaceExportDeclaration | ExportAssignment | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | ExportDeclaration | NamedTupleMember | ExportSpecifier | CaseClause | EndOfFileToken;
576
576
  export type HasType = SignatureDeclaration | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocVariadicType;
577
577
  export type HasTypeArguments = CallExpression | NewExpression | TaggedTemplateExpression | JsxOpeningElement | JsxSelfClosingElement;
578
578
  export type HasInitializer = HasExpressionInitializer | ForStatement | ForInStatement | ForOfStatement | JsxAttribute;
@@ -1498,7 +1498,7 @@ declare namespace ts {
1498
1498
  readonly parent: SwitchStatement;
1499
1499
  readonly clauses: NodeArray<CaseOrDefaultClause>;
1500
1500
  }
1501
- export interface CaseClause extends Node {
1501
+ export interface CaseClause extends Node, JSDocContainer {
1502
1502
  readonly kind: SyntaxKind.CaseClause;
1503
1503
  readonly parent: CaseBlock;
1504
1504
  readonly expression: Expression;
@@ -1749,6 +1749,7 @@ declare namespace ts {
1749
1749
  }
1750
1750
  export interface FileReference extends TextRange {
1751
1751
  fileName: string;
1752
+ resolutionMode?: SourceFile["impliedNodeFormat"];
1752
1753
  }
1753
1754
  export interface CheckJsDirective extends TextRange {
1754
1755
  enabled: boolean;
@@ -2074,7 +2075,7 @@ declare namespace ts {
2074
2075
  readonly prologues: readonly UnparsedPrologue[];
2075
2076
  helpers: readonly UnscopedEmitHelper[] | undefined;
2076
2077
  referencedFiles: readonly FileReference[];
2077
- typeReferenceDirectives: readonly string[] | undefined;
2078
+ typeReferenceDirectives: readonly FileReference[] | undefined;
2078
2079
  libReferenceDirectives: readonly FileReference[];
2079
2080
  hasNoDefaultLib?: boolean;
2080
2081
  sourceMapPath?: string;
@@ -3223,7 +3224,7 @@ declare namespace ts {
3223
3224
  /**
3224
3225
  * This method is a companion for 'resolveModuleNames' and is used to resolve 'types' references to actual type declaration files
3225
3226
  */
3226
- resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions): (ResolvedTypeReferenceDirective | undefined)[];
3227
+ resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: SourceFile["impliedNodeFormat"] | undefined): (ResolvedTypeReferenceDirective | undefined)[];
3227
3228
  getEnvironmentVariable?(name: string): string | undefined;
3228
3229
  createHash?(data: string): string;
3229
3230
  getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined;
@@ -4057,6 +4058,13 @@ declare namespace ts {
4057
4058
  readonly includePackageJsonAutoImports?: "auto" | "on" | "off";
4058
4059
  readonly provideRefactorNotApplicableReason?: boolean;
4059
4060
  readonly jsxAttributeCompletionStyle?: "auto" | "braces" | "none";
4061
+ readonly includeInlayParameterNameHints?: "none" | "literals" | "all";
4062
+ readonly includeInlayParameterNameHintsWhenArgumentMatchesName?: boolean;
4063
+ readonly includeInlayFunctionParameterTypeHints?: boolean;
4064
+ readonly includeInlayVariableTypeHints?: boolean;
4065
+ readonly includeInlayPropertyDeclarationTypeHints?: boolean;
4066
+ readonly includeInlayFunctionLikeReturnTypeHints?: boolean;
4067
+ readonly includeInlayEnumMemberValueHints?: boolean;
4060
4068
  }
4061
4069
  /** Represents a bigint literal value without requiring bigint support */
4062
4070
  export interface PseudoBigInt {
@@ -4855,7 +4863,7 @@ declare namespace ts {
4855
4863
  * This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups
4856
4864
  * is assumed to be the same as root directory of the project.
4857
4865
  */
4858
- export function resolveTypeReferenceDirective(typeReferenceDirectiveName: string, containingFile: string | undefined, options: CompilerOptions, host: ModuleResolutionHost, redirectedReference?: ResolvedProjectReference, cache?: TypeReferenceDirectiveResolutionCache): ResolvedTypeReferenceDirectiveWithFailedLookupLocations;
4866
+ export function resolveTypeReferenceDirective(typeReferenceDirectiveName: string, containingFile: string | undefined, options: CompilerOptions, host: ModuleResolutionHost, redirectedReference?: ResolvedProjectReference, cache?: TypeReferenceDirectiveResolutionCache, resolutionMode?: SourceFile["impliedNodeFormat"]): ResolvedTypeReferenceDirectiveWithFailedLookupLocations;
4859
4867
  /**
4860
4868
  * Given a set of options, returns the set of type directive names
4861
4869
  * that should be included for this program automatically.
@@ -5276,7 +5284,7 @@ declare namespace ts {
5276
5284
  /** If provided, used to resolve the module names, otherwise typescript's default module resolution */
5277
5285
  resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile): (ResolvedModule | undefined)[];
5278
5286
  /** If provided, used to resolve type reference directives, otherwise typescript's default resolution */
5279
- resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions): (ResolvedTypeReferenceDirective | undefined)[];
5287
+ resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: SourceFile["impliedNodeFormat"] | undefined): (ResolvedTypeReferenceDirective | undefined)[];
5280
5288
  }
5281
5289
  interface WatchCompilerHost<T extends BuilderProgram> extends ProgramHost<T>, WatchHost {
5282
5290
  /** Instead of using output d.ts file from project reference, use its source file */
@@ -5672,7 +5680,7 @@ declare namespace ts {
5672
5680
  getTypeRootsVersion?(): number;
5673
5681
  resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile): (ResolvedModule | undefined)[];
5674
5682
  getResolvedModuleWithFailedLookupLocationsFromCache?(modulename: string, containingFile: string, resolutionMode?: ModuleKind.CommonJS | ModuleKind.ESNext): ResolvedModuleWithFailedLookupLocations | undefined;
5675
- resolveTypeReferenceDirectives?(typeDirectiveNames: string[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions): (ResolvedTypeReferenceDirective | undefined)[];
5683
+ resolveTypeReferenceDirectives?(typeDirectiveNames: string[] | FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: SourceFile["impliedNodeFormat"] | undefined): (ResolvedTypeReferenceDirective | undefined)[];
5676
5684
  getDirectories?(directoryName: string): string[];
5677
5685
  /**
5678
5686
  * Gets a set of custom transformers to use during emit.
@@ -5881,15 +5889,6 @@ declare namespace ts {
5881
5889
  /** @deprecated Use includeCompletionsWithInsertText */
5882
5890
  includeInsertTextCompletions?: boolean;
5883
5891
  }
5884
- interface InlayHintsOptions extends UserPreferences {
5885
- readonly includeInlayParameterNameHints?: "none" | "literals" | "all";
5886
- readonly includeInlayParameterNameHintsWhenArgumentMatchesName?: boolean;
5887
- readonly includeInlayFunctionParameterTypeHints?: boolean;
5888
- readonly includeInlayVariableTypeHints?: boolean;
5889
- readonly includeInlayPropertyDeclarationTypeHints?: boolean;
5890
- readonly includeInlayFunctionLikeReturnTypeHints?: boolean;
5891
- readonly includeInlayEnumMemberValueHints?: boolean;
5892
- }
5893
5892
  type SignatureHelpTriggerCharacter = "," | "(" | "<";
5894
5893
  type SignatureHelpRetriggerCharacter = SignatureHelpTriggerCharacter | ")";
5895
5894
  interface SignatureHelpItemsOptions {
@@ -6693,7 +6692,7 @@ declare namespace ts {
6693
6692
  cancellationToken: CancellationToken;
6694
6693
  host: LanguageServiceHost;
6695
6694
  span: TextSpan;
6696
- preferences: InlayHintsOptions;
6695
+ preferences: UserPreferences;
6697
6696
  }
6698
6697
  }
6699
6698
  declare namespace ts {