@@ -14,7 +14,7 @@ and limitations under the License.
1414***************************************************************************** */
1515
1616declare namespace ts {
17- const versionMajorMinor = "4.5 " ;
17+ const versionMajorMinor = "4.6 " ;
1818 /** The version of the TypeScript compiler release */
1919 const version : string ;
2020 /**
@@ -572,7 +572,7 @@ declare namespace ts {
572572 }
573573 export interface JSDocContainer {
574574 }
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 | 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 | EndOfFileToken ;
576576 export type HasType = SignatureDeclaration | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocVariadicType ;
577577 export type HasTypeArguments = CallExpression | NewExpression | TaggedTemplateExpression | JsxOpeningElement | JsxSelfClosingElement ;
578578 export type HasInitializer = HasExpressionInitializer | ForStatement | ForInStatement | ForOfStatement | JsxAttribute ;
@@ -897,7 +897,7 @@ declare namespace ts {
897897 export interface TypePredicateNode extends TypeNode {
898898 readonly kind : SyntaxKind . TypePredicate ;
899899 readonly parent : SignatureDeclaration | JSDocTypeExpression ;
900- readonly assertsModifier ?: AssertsToken ;
900+ readonly assertsModifier ?: AssertsKeyword ;
901901 readonly parameterName : Identifier | ThisTypeNode ;
902902 readonly type ?: TypeNode ;
903903 }
@@ -968,7 +968,7 @@ declare namespace ts {
968968 }
969969 export interface MappedTypeNode extends TypeNode , Declaration {
970970 readonly kind : SyntaxKind . MappedType ;
971- readonly readonlyToken ?: ReadonlyToken | PlusToken | MinusToken ;
971+ readonly readonlyToken ?: ReadonlyKeyword | PlusToken | MinusToken ;
972972 readonly typeParameter : TypeParameterDeclaration ;
973973 readonly nameType ?: TypeNode ;
974974 readonly questionToken ?: QuestionToken | PlusToken | MinusToken ;
@@ -1465,7 +1465,7 @@ declare namespace ts {
14651465 }
14661466 export interface ForOfStatement extends IterationStatement {
14671467 readonly kind : SyntaxKind . ForOfStatement ;
1468- readonly awaitModifier ?: AwaitKeywordToken ;
1468+ readonly awaitModifier ?: AwaitKeyword ;
14691469 readonly initializer : ForInitializer ;
14701470 readonly expression : Expression ;
14711471 }
@@ -1652,7 +1652,7 @@ declare namespace ts {
16521652 readonly kind : SyntaxKind . AssertEntry ;
16531653 readonly parent : AssertClause ;
16541654 readonly name : AssertionKey ;
1655- readonly value : StringLiteral ;
1655+ readonly value : Expression ;
16561656 }
16571657 export interface AssertClause extends Node {
16581658 readonly kind : SyntaxKind . AssertClause ;
@@ -1702,7 +1702,7 @@ declare namespace ts {
17021702 readonly name : Identifier ;
17031703 readonly isTypeOnly : boolean ;
17041704 }
1705- export interface ExportSpecifier extends NamedDeclaration {
1705+ export interface ExportSpecifier extends NamedDeclaration , JSDocContainer {
17061706 readonly kind : SyntaxKind . ExportSpecifier ;
17071707 readonly parent : NamedExports ;
17081708 readonly isTypeOnly : boolean ;
@@ -1720,19 +1720,23 @@ declare namespace ts {
17201720 readonly parent : ImportClause & {
17211721 readonly isTypeOnly : true ;
17221722 } ;
1723- } | ImportSpecifier & {
1723+ } | ImportSpecifier & ( {
1724+ readonly isTypeOnly : true ;
1725+ } | {
17241726 readonly parent : NamedImports & {
17251727 readonly parent : ImportClause & {
17261728 readonly isTypeOnly : true ;
17271729 } ;
17281730 } ;
1729- } | ExportSpecifier & {
1731+ } ) | ExportSpecifier & ( {
1732+ readonly isTypeOnly : true ;
1733+ } | {
17301734 readonly parent : NamedExports & {
17311735 readonly parent : ExportDeclaration & {
17321736 readonly isTypeOnly : true ;
17331737 } ;
17341738 } ;
1735- } ;
1739+ } ) ;
17361740 /**
17371741 * This is either an `export =` or an `export default` declaration.
17381742 * Unless `isExportEquals` is set, this node was parsed as an `export default`.
@@ -3078,6 +3082,7 @@ declare namespace ts {
30783082 ES2019 = 6 ,
30793083 ES2020 = 7 ,
30803084 ES2021 = 8 ,
3085+ ES2022 = 9 ,
30813086 ESNext = 99 ,
30823087 JSON = 100 ,
30833088 Latest = 99
@@ -3343,7 +3348,7 @@ declare namespace ts {
33433348 createTrue ( ) : TrueLiteral ;
33443349 createFalse ( ) : FalseLiteral ;
33453350 createModifier < T extends ModifierSyntaxKind > ( kind : T ) : ModifierToken < T > ;
3346- createModifiersFromModifierFlags ( flags : ModifierFlags ) : Modifier [ ] ;
3351+ createModifiersFromModifierFlags ( flags : ModifierFlags ) : Modifier [ ] | undefined ;
33473352 createQualifiedName ( left : EntityName , right : string | Identifier ) : QualifiedName ;
33483353 updateQualifiedName ( node : QualifiedName , left : EntityName , right : Identifier ) : QualifiedName ;
33493354 createComputedPropertyName ( expression : Expression ) : ComputedPropertyName ;
@@ -3575,8 +3580,8 @@ declare namespace ts {
35753580 updateImportClause ( node : ImportClause , isTypeOnly : boolean , name : Identifier | undefined , namedBindings : NamedImportBindings | undefined ) : ImportClause ;
35763581 createAssertClause ( elements : NodeArray < AssertEntry > , multiLine ?: boolean ) : AssertClause ;
35773582 updateAssertClause ( node : AssertClause , elements : NodeArray < AssertEntry > , multiLine ?: boolean ) : AssertClause ;
3578- createAssertEntry ( name : AssertionKey , value : StringLiteral ) : AssertEntry ;
3579- updateAssertEntry ( node : AssertEntry , name : AssertionKey , value : StringLiteral ) : AssertEntry ;
3583+ createAssertEntry ( name : AssertionKey , value : Expression ) : AssertEntry ;
3584+ updateAssertEntry ( node : AssertEntry , name : AssertionKey , value : Expression ) : AssertEntry ;
35803585 createNamespaceImport ( name : Identifier ) : NamespaceImport ;
35813586 updateNamespaceImport ( node : NamespaceImport , name : Identifier ) : NamespaceImport ;
35823587 createNamespaceExport ( name : Identifier ) : NamespaceExport ;
@@ -5351,7 +5356,11 @@ declare namespace ts {
53515356 traceResolution ?: boolean ;
53525357 [ option : string ] : CompilerOptionsValue | undefined ;
53535358 }
5354- type ReportEmitErrorSummary = ( errorCount : number ) => void ;
5359+ type ReportEmitErrorSummary = ( errorCount : number , filesInError : ( ReportFileInError | undefined ) [ ] ) => void ;
5360+ interface ReportFileInError {
5361+ fileName : string ;
5362+ line : number ;
5363+ }
53555364 interface SolutionBuilderHostBase < T extends BuilderProgram > extends ProgramHost < T > {
53565365 createDirectory ?( path : string ) : void ;
53575366 /**
@@ -5559,6 +5568,7 @@ declare namespace ts {
55595568 isTypeParameter ( ) : this is TypeParameter ;
55605569 isClassOrInterface ( ) : this is InterfaceType ;
55615570 isClass ( ) : this is InterfaceType ;
5571+ isIndexType ( ) : this is IndexType ;
55625572 }
55635573 interface TypeReference {
55645574 typeArguments ?: readonly Type [ ] ;
@@ -5567,6 +5577,7 @@ declare namespace ts {
55675577 getDeclaration ( ) : SignatureDeclaration ;
55685578 getTypeParameters ( ) : TypeParameter [ ] | undefined ;
55695579 getParameters ( ) : Symbol [ ] ;
5580+ getTypeParameterAtPosition ( pos : number ) : Type ;
55705581 getReturnType ( ) : Type ;
55715582 getDocumentationComment ( typeChecker : TypeChecker | undefined ) : SymbolDisplayPart [ ] ;
55725583 getJsDocTags ( ) : JSDocTagInfo [ ] ;
@@ -5753,8 +5764,9 @@ declare namespace ts {
57535764 * @param position A zero-based index of the character where you want the entries
57545765 * @param options An object describing how the request was triggered and what kinds
57555766 * of code actions can be returned with the completions.
5767+ * @param formattingSettings settings needed for calling formatting functions.
57565768 */
5757- getCompletionsAtPosition ( fileName : string , position : number , options : GetCompletionsAtPositionOptions | undefined ) : WithMetadata < CompletionInfo > | undefined ;
5769+ getCompletionsAtPosition ( fileName : string , position : number , options : GetCompletionsAtPositionOptions | undefined , formattingSettings ?: FormatCodeSettings ) : WithMetadata < CompletionInfo > | undefined ;
57585770 /**
57595771 * Gets the extended details for a completion entry retrieved from `getCompletionsAtPosition`.
57605772 *
@@ -6586,6 +6598,7 @@ declare namespace ts {
65866598 externalModuleName = "external module name" ,
65876599 /**
65886600 * <JsxTagName attribute1 attribute2={0} />
6601+ * @deprecated
65896602 */
65906603 jsxAttribute = "JSX attribute" ,
65916604 /** String literal */
@@ -6855,7 +6868,7 @@ declare namespace ts {
68556868 /** @deprecated Use `factory.createModifier` or the factory supplied by your transformation context instead. */
68566869 const createModifier : < T extends ModifierSyntaxKind > ( kind : T ) => ModifierToken < T > ;
68576870 /** @deprecated Use `factory.createModifiersFromModifierFlags` or the factory supplied by your transformation context instead. */
6858- const createModifiersFromModifierFlags : ( flags : ModifierFlags ) => Modifier [ ] ;
6871+ const createModifiersFromModifierFlags : ( flags : ModifierFlags ) => Modifier [ ] | undefined ;
68596872 /** @deprecated Use `factory.createQualifiedName` or the factory supplied by your transformation context instead. */
68606873 const createQualifiedName : ( left : EntityName , right : string | Identifier ) => QualifiedName ;
68616874 /** @deprecated Use `factory.updateQualifiedName` or the factory supplied by your transformation context instead. */
0 commit comments