@@ -14,7 +14,7 @@ and limitations under the License.
14
14
***************************************************************************** */
15
15
16
16
declare namespace ts {
17
- const versionMajorMinor = "4.5 " ;
17
+ const versionMajorMinor = "4.6 " ;
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 | 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 ;
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 ;
@@ -897,7 +897,7 @@ declare namespace ts {
897
897
export interface TypePredicateNode extends TypeNode {
898
898
readonly kind : SyntaxKind . TypePredicate ;
899
899
readonly parent : SignatureDeclaration | JSDocTypeExpression ;
900
- readonly assertsModifier ?: AssertsToken ;
900
+ readonly assertsModifier ?: AssertsKeyword ;
901
901
readonly parameterName : Identifier | ThisTypeNode ;
902
902
readonly type ?: TypeNode ;
903
903
}
@@ -968,7 +968,7 @@ declare namespace ts {
968
968
}
969
969
export interface MappedTypeNode extends TypeNode , Declaration {
970
970
readonly kind : SyntaxKind . MappedType ;
971
- readonly readonlyToken ?: ReadonlyToken | PlusToken | MinusToken ;
971
+ readonly readonlyToken ?: ReadonlyKeyword | PlusToken | MinusToken ;
972
972
readonly typeParameter : TypeParameterDeclaration ;
973
973
readonly nameType ?: TypeNode ;
974
974
readonly questionToken ?: QuestionToken | PlusToken | MinusToken ;
@@ -1465,7 +1465,7 @@ declare namespace ts {
1465
1465
}
1466
1466
export interface ForOfStatement extends IterationStatement {
1467
1467
readonly kind : SyntaxKind . ForOfStatement ;
1468
- readonly awaitModifier ?: AwaitKeywordToken ;
1468
+ readonly awaitModifier ?: AwaitKeyword ;
1469
1469
readonly initializer : ForInitializer ;
1470
1470
readonly expression : Expression ;
1471
1471
}
@@ -1652,7 +1652,7 @@ declare namespace ts {
1652
1652
readonly kind : SyntaxKind . AssertEntry ;
1653
1653
readonly parent : AssertClause ;
1654
1654
readonly name : AssertionKey ;
1655
- readonly value : StringLiteral ;
1655
+ readonly value : Expression ;
1656
1656
}
1657
1657
export interface AssertClause extends Node {
1658
1658
readonly kind : SyntaxKind . AssertClause ;
@@ -1702,7 +1702,7 @@ declare namespace ts {
1702
1702
readonly name : Identifier ;
1703
1703
readonly isTypeOnly : boolean ;
1704
1704
}
1705
- export interface ExportSpecifier extends NamedDeclaration {
1705
+ export interface ExportSpecifier extends NamedDeclaration , JSDocContainer {
1706
1706
readonly kind : SyntaxKind . ExportSpecifier ;
1707
1707
readonly parent : NamedExports ;
1708
1708
readonly isTypeOnly : boolean ;
@@ -1720,19 +1720,23 @@ declare namespace ts {
1720
1720
readonly parent : ImportClause & {
1721
1721
readonly isTypeOnly : true ;
1722
1722
} ;
1723
- } | ImportSpecifier & {
1723
+ } | ImportSpecifier & ( {
1724
+ readonly isTypeOnly : true ;
1725
+ } | {
1724
1726
readonly parent : NamedImports & {
1725
1727
readonly parent : ImportClause & {
1726
1728
readonly isTypeOnly : true ;
1727
1729
} ;
1728
1730
} ;
1729
- } | ExportSpecifier & {
1731
+ } ) | ExportSpecifier & ( {
1732
+ readonly isTypeOnly : true ;
1733
+ } | {
1730
1734
readonly parent : NamedExports & {
1731
1735
readonly parent : ExportDeclaration & {
1732
1736
readonly isTypeOnly : true ;
1733
1737
} ;
1734
1738
} ;
1735
- } ;
1739
+ } ) ;
1736
1740
/**
1737
1741
* This is either an `export =` or an `export default` declaration.
1738
1742
* Unless `isExportEquals` is set, this node was parsed as an `export default`.
@@ -3078,6 +3082,7 @@ declare namespace ts {
3078
3082
ES2019 = 6 ,
3079
3083
ES2020 = 7 ,
3080
3084
ES2021 = 8 ,
3085
+ ES2022 = 9 ,
3081
3086
ESNext = 99 ,
3082
3087
JSON = 100 ,
3083
3088
Latest = 99
@@ -3343,7 +3348,7 @@ declare namespace ts {
3343
3348
createTrue ( ) : TrueLiteral ;
3344
3349
createFalse ( ) : FalseLiteral ;
3345
3350
createModifier < T extends ModifierSyntaxKind > ( kind : T ) : ModifierToken < T > ;
3346
- createModifiersFromModifierFlags ( flags : ModifierFlags ) : Modifier [ ] ;
3351
+ createModifiersFromModifierFlags ( flags : ModifierFlags ) : Modifier [ ] | undefined ;
3347
3352
createQualifiedName ( left : EntityName , right : string | Identifier ) : QualifiedName ;
3348
3353
updateQualifiedName ( node : QualifiedName , left : EntityName , right : Identifier ) : QualifiedName ;
3349
3354
createComputedPropertyName ( expression : Expression ) : ComputedPropertyName ;
@@ -3575,8 +3580,8 @@ declare namespace ts {
3575
3580
updateImportClause ( node : ImportClause , isTypeOnly : boolean , name : Identifier | undefined , namedBindings : NamedImportBindings | undefined ) : ImportClause ;
3576
3581
createAssertClause ( elements : NodeArray < AssertEntry > , multiLine ?: boolean ) : AssertClause ;
3577
3582
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 ;
3580
3585
createNamespaceImport ( name : Identifier ) : NamespaceImport ;
3581
3586
updateNamespaceImport ( node : NamespaceImport , name : Identifier ) : NamespaceImport ;
3582
3587
createNamespaceExport ( name : Identifier ) : NamespaceExport ;
@@ -5351,7 +5356,11 @@ declare namespace ts {
5351
5356
traceResolution ?: boolean ;
5352
5357
[ option : string ] : CompilerOptionsValue | undefined ;
5353
5358
}
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
+ }
5355
5364
interface SolutionBuilderHostBase < T extends BuilderProgram > extends ProgramHost < T > {
5356
5365
createDirectory ?( path : string ) : void ;
5357
5366
/**
@@ -5559,6 +5568,7 @@ declare namespace ts {
5559
5568
isTypeParameter ( ) : this is TypeParameter ;
5560
5569
isClassOrInterface ( ) : this is InterfaceType ;
5561
5570
isClass ( ) : this is InterfaceType ;
5571
+ isIndexType ( ) : this is IndexType ;
5562
5572
}
5563
5573
interface TypeReference {
5564
5574
typeArguments ?: readonly Type [ ] ;
@@ -5567,6 +5577,7 @@ declare namespace ts {
5567
5577
getDeclaration ( ) : SignatureDeclaration ;
5568
5578
getTypeParameters ( ) : TypeParameter [ ] | undefined ;
5569
5579
getParameters ( ) : Symbol [ ] ;
5580
+ getTypeParameterAtPosition ( pos : number ) : Type ;
5570
5581
getReturnType ( ) : Type ;
5571
5582
getDocumentationComment ( typeChecker : TypeChecker | undefined ) : SymbolDisplayPart [ ] ;
5572
5583
getJsDocTags ( ) : JSDocTagInfo [ ] ;
@@ -5753,8 +5764,9 @@ declare namespace ts {
5753
5764
* @param position A zero-based index of the character where you want the entries
5754
5765
* @param options An object describing how the request was triggered and what kinds
5755
5766
* of code actions can be returned with the completions.
5767
+ * @param formattingSettings settings needed for calling formatting functions.
5756
5768
*/
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 ;
5758
5770
/**
5759
5771
* Gets the extended details for a completion entry retrieved from `getCompletionsAtPosition`.
5760
5772
*
@@ -6586,6 +6598,7 @@ declare namespace ts {
6586
6598
externalModuleName = "external module name" ,
6587
6599
/**
6588
6600
* <JsxTagName attribute1 attribute2={0} />
6601
+ * @deprecated
6589
6602
*/
6590
6603
jsxAttribute = "JSX attribute" ,
6591
6604
/** String literal */
@@ -6855,7 +6868,7 @@ declare namespace ts {
6855
6868
/** @deprecated Use `factory.createModifier` or the factory supplied by your transformation context instead. */
6856
6869
const createModifier : < T extends ModifierSyntaxKind > ( kind : T ) => ModifierToken < T > ;
6857
6870
/** @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 ;
6859
6872
/** @deprecated Use `factory.createQualifiedName` or the factory supplied by your transformation context instead. */
6860
6873
const createQualifiedName : ( left : EntityName , right : string | Identifier ) => QualifiedName ;
6861
6874
/** @deprecated Use `factory.updateQualifiedName` or the factory supplied by your transformation context instead. */
0 commit comments