From 6c47c326a9b52245edfbad2b2cb2decabcac91a4 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Thu, 12 Feb 2015 18:05:50 -0800 Subject: [PATCH] Accepting new baselines --- .../baselines/reference/APISample_compile.js | 53 +++++---- .../reference/APISample_compile.types | 101 ++++++++++++------ tests/baselines/reference/APISample_linter.js | 53 +++++---- .../reference/APISample_linter.types | 101 ++++++++++++------ .../reference/APISample_transform.js | 53 +++++---- .../reference/APISample_transform.types | 101 ++++++++++++------ .../baselines/reference/APISample_watcher.js | 53 +++++---- .../reference/APISample_watcher.types | 101 ++++++++++++------ 8 files changed, 408 insertions(+), 208 deletions(-) diff --git a/tests/baselines/reference/APISample_compile.js b/tests/baselines/reference/APISample_compile.js index eeb78ce8250..9f75f86dc1c 100644 --- a/tests/baselines/reference/APISample_compile.js +++ b/tests/baselines/reference/APISample_compile.js @@ -259,23 +259,26 @@ declare module "typescript" { ModuleDeclaration = 197, ModuleBlock = 198, ImportEqualsDeclaration = 199, - ExportAssignment = 200, - ImportDeclaration = 201, - ImportClause = 202, - NamespaceImport = 203, - NamedImports = 204, - ImportSpecifier = 205, - ExternalModuleReference = 206, - CaseClause = 207, - DefaultClause = 208, - HeritageClause = 209, - CatchClause = 210, - PropertyAssignment = 211, - ShorthandPropertyAssignment = 212, - EnumMember = 213, - SourceFile = 214, - SyntaxList = 215, - Count = 216, + ImportDeclaration = 200, + ImportClause = 201, + NamespaceImport = 202, + NamedImports = 203, + ImportSpecifier = 204, + ExportAssignment = 205, + ExportDeclaration = 206, + NamedExports = 207, + ExportSpecifier = 208, + ExternalModuleReference = 209, + CaseClause = 210, + DefaultClause = 211, + HeritageClause = 212, + CatchClause = 213, + PropertyAssignment = 214, + ShorthandPropertyAssignment = 215, + EnumMember = 216, + SourceFile = 217, + SyntaxList = 218, + Count = 219, FirstAssignment = 52, LastAssignment = 63, FirstReservedWord = 65, @@ -727,13 +730,21 @@ declare module "typescript" { interface NamespaceImport extends Declaration { name: Identifier; } - interface NamedImports extends Node { - elements: NodeArray; + interface ExportDeclaration extends Statement, ModuleElement { + exportClause?: NamedExports; + moduleSpecifier?: Expression; } - interface ImportSpecifier extends Declaration { + interface NamedImportsOrExports extends Node { + elements: NodeArray; + } + type NamedImports = NamedImportsOrExports; + type NamedExports = NamedImportsOrExports; + interface ImportOrExportSpecifier extends Declaration { propertyName?: Identifier; name: Identifier; } + type ImportSpecifier = ImportOrExportSpecifier; + type ExportSpecifier = ImportOrExportSpecifier; interface ExportAssignment extends Statement, ModuleElement { exportName: Identifier; } @@ -902,7 +913,7 @@ declare module "typescript" { errorModuleName?: string; } interface EmitResolver { - getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration): string; + getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration | ExportDeclaration): string; getExpressionNameSubstitution(node: Identifier): string; getExportAssignmentName(node: SourceFile): string; isReferencedImportDeclaration(node: Node): boolean; diff --git a/tests/baselines/reference/APISample_compile.types b/tests/baselines/reference/APISample_compile.types index b85d0132a04..b992b3ba119 100644 --- a/tests/baselines/reference/APISample_compile.types +++ b/tests/baselines/reference/APISample_compile.types @@ -793,55 +793,64 @@ declare module "typescript" { ImportEqualsDeclaration = 199, >ImportEqualsDeclaration : SyntaxKind - ExportAssignment = 200, ->ExportAssignment : SyntaxKind - - ImportDeclaration = 201, + ImportDeclaration = 200, >ImportDeclaration : SyntaxKind - ImportClause = 202, + ImportClause = 201, >ImportClause : SyntaxKind - NamespaceImport = 203, + NamespaceImport = 202, >NamespaceImport : SyntaxKind - NamedImports = 204, + NamedImports = 203, >NamedImports : SyntaxKind - ImportSpecifier = 205, + ImportSpecifier = 204, >ImportSpecifier : SyntaxKind - ExternalModuleReference = 206, + ExportAssignment = 205, +>ExportAssignment : SyntaxKind + + ExportDeclaration = 206, +>ExportDeclaration : SyntaxKind + + NamedExports = 207, +>NamedExports : SyntaxKind + + ExportSpecifier = 208, +>ExportSpecifier : SyntaxKind + + ExternalModuleReference = 209, >ExternalModuleReference : SyntaxKind - CaseClause = 207, + CaseClause = 210, >CaseClause : SyntaxKind - DefaultClause = 208, + DefaultClause = 211, >DefaultClause : SyntaxKind - HeritageClause = 209, + HeritageClause = 212, >HeritageClause : SyntaxKind - CatchClause = 210, + CatchClause = 213, >CatchClause : SyntaxKind - PropertyAssignment = 211, + PropertyAssignment = 214, >PropertyAssignment : SyntaxKind - ShorthandPropertyAssignment = 212, + ShorthandPropertyAssignment = 215, >ShorthandPropertyAssignment : SyntaxKind - EnumMember = 213, + EnumMember = 216, >EnumMember : SyntaxKind - SourceFile = 214, + SourceFile = 217, >SourceFile : SyntaxKind - SyntaxList = 215, + SyntaxList = 218, >SyntaxList : SyntaxKind - Count = 216, + Count = 219, >Count : SyntaxKind FirstAssignment = 52, @@ -2196,9 +2205,9 @@ declare module "typescript" { >Identifier : Identifier namedBindings?: NamespaceImport | NamedImports; ->namedBindings : NamespaceImport | NamedImports +>namedBindings : NamespaceImport | NamedImportsOrExports >NamespaceImport : NamespaceImport ->NamedImports : NamedImports +>NamedImports : NamedImportsOrExports } interface NamespaceImport extends Declaration { >NamespaceImport : NamespaceImport @@ -2208,17 +2217,38 @@ declare module "typescript" { >name : Identifier >Identifier : Identifier } - interface NamedImports extends Node { ->NamedImports : NamedImports + interface ExportDeclaration extends Statement, ModuleElement { +>ExportDeclaration : ExportDeclaration +>Statement : Statement +>ModuleElement : ModuleElement + + exportClause?: NamedExports; +>exportClause : NamedImportsOrExports +>NamedExports : NamedImportsOrExports + + moduleSpecifier?: Expression; +>moduleSpecifier : Expression +>Expression : Expression + } + interface NamedImportsOrExports extends Node { +>NamedImportsOrExports : NamedImportsOrExports >Node : Node - elements: NodeArray; ->elements : NodeArray + elements: NodeArray; +>elements : NodeArray >NodeArray : NodeArray ->ImportSpecifier : ImportSpecifier +>ImportOrExportSpecifier : ImportOrExportSpecifier } - interface ImportSpecifier extends Declaration { ->ImportSpecifier : ImportSpecifier + type NamedImports = NamedImportsOrExports; +>NamedImports : NamedImportsOrExports +>NamedImportsOrExports : NamedImportsOrExports + + type NamedExports = NamedImportsOrExports; +>NamedExports : NamedImportsOrExports +>NamedImportsOrExports : NamedImportsOrExports + + interface ImportOrExportSpecifier extends Declaration { +>ImportOrExportSpecifier : ImportOrExportSpecifier >Declaration : Declaration propertyName?: Identifier; @@ -2229,6 +2259,14 @@ declare module "typescript" { >name : Identifier >Identifier : Identifier } + type ImportSpecifier = ImportOrExportSpecifier; +>ImportSpecifier : ImportOrExportSpecifier +>ImportOrExportSpecifier : ImportOrExportSpecifier + + type ExportSpecifier = ImportOrExportSpecifier; +>ExportSpecifier : ImportOrExportSpecifier +>ImportOrExportSpecifier : ImportOrExportSpecifier + interface ExportAssignment extends Statement, ModuleElement { >ExportAssignment : ExportAssignment >Statement : Statement @@ -2882,12 +2920,13 @@ declare module "typescript" { interface EmitResolver { >EmitResolver : EmitResolver - getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration): string; ->getGeneratedNameForNode : (node: EnumDeclaration | ModuleDeclaration | ImportDeclaration) => string ->node : EnumDeclaration | ModuleDeclaration | ImportDeclaration + getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration | ExportDeclaration): string; +>getGeneratedNameForNode : (node: EnumDeclaration | ModuleDeclaration | ImportDeclaration | ExportDeclaration) => string +>node : EnumDeclaration | ModuleDeclaration | ImportDeclaration | ExportDeclaration >ModuleDeclaration : ModuleDeclaration >EnumDeclaration : EnumDeclaration >ImportDeclaration : ImportDeclaration +>ExportDeclaration : ExportDeclaration getExpressionNameSubstitution(node: Identifier): string; >getExpressionNameSubstitution : (node: Identifier) => string diff --git a/tests/baselines/reference/APISample_linter.js b/tests/baselines/reference/APISample_linter.js index 1a5e6520805..0ec2bf4f77c 100644 --- a/tests/baselines/reference/APISample_linter.js +++ b/tests/baselines/reference/APISample_linter.js @@ -290,23 +290,26 @@ declare module "typescript" { ModuleDeclaration = 197, ModuleBlock = 198, ImportEqualsDeclaration = 199, - ExportAssignment = 200, - ImportDeclaration = 201, - ImportClause = 202, - NamespaceImport = 203, - NamedImports = 204, - ImportSpecifier = 205, - ExternalModuleReference = 206, - CaseClause = 207, - DefaultClause = 208, - HeritageClause = 209, - CatchClause = 210, - PropertyAssignment = 211, - ShorthandPropertyAssignment = 212, - EnumMember = 213, - SourceFile = 214, - SyntaxList = 215, - Count = 216, + ImportDeclaration = 200, + ImportClause = 201, + NamespaceImport = 202, + NamedImports = 203, + ImportSpecifier = 204, + ExportAssignment = 205, + ExportDeclaration = 206, + NamedExports = 207, + ExportSpecifier = 208, + ExternalModuleReference = 209, + CaseClause = 210, + DefaultClause = 211, + HeritageClause = 212, + CatchClause = 213, + PropertyAssignment = 214, + ShorthandPropertyAssignment = 215, + EnumMember = 216, + SourceFile = 217, + SyntaxList = 218, + Count = 219, FirstAssignment = 52, LastAssignment = 63, FirstReservedWord = 65, @@ -758,13 +761,21 @@ declare module "typescript" { interface NamespaceImport extends Declaration { name: Identifier; } - interface NamedImports extends Node { - elements: NodeArray; + interface ExportDeclaration extends Statement, ModuleElement { + exportClause?: NamedExports; + moduleSpecifier?: Expression; } - interface ImportSpecifier extends Declaration { + interface NamedImportsOrExports extends Node { + elements: NodeArray; + } + type NamedImports = NamedImportsOrExports; + type NamedExports = NamedImportsOrExports; + interface ImportOrExportSpecifier extends Declaration { propertyName?: Identifier; name: Identifier; } + type ImportSpecifier = ImportOrExportSpecifier; + type ExportSpecifier = ImportOrExportSpecifier; interface ExportAssignment extends Statement, ModuleElement { exportName: Identifier; } @@ -933,7 +944,7 @@ declare module "typescript" { errorModuleName?: string; } interface EmitResolver { - getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration): string; + getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration | ExportDeclaration): string; getExpressionNameSubstitution(node: Identifier): string; getExportAssignmentName(node: SourceFile): string; isReferencedImportDeclaration(node: Node): boolean; diff --git a/tests/baselines/reference/APISample_linter.types b/tests/baselines/reference/APISample_linter.types index f8f4b6bd199..3bb894b55de 100644 --- a/tests/baselines/reference/APISample_linter.types +++ b/tests/baselines/reference/APISample_linter.types @@ -937,55 +937,64 @@ declare module "typescript" { ImportEqualsDeclaration = 199, >ImportEqualsDeclaration : SyntaxKind - ExportAssignment = 200, ->ExportAssignment : SyntaxKind - - ImportDeclaration = 201, + ImportDeclaration = 200, >ImportDeclaration : SyntaxKind - ImportClause = 202, + ImportClause = 201, >ImportClause : SyntaxKind - NamespaceImport = 203, + NamespaceImport = 202, >NamespaceImport : SyntaxKind - NamedImports = 204, + NamedImports = 203, >NamedImports : SyntaxKind - ImportSpecifier = 205, + ImportSpecifier = 204, >ImportSpecifier : SyntaxKind - ExternalModuleReference = 206, + ExportAssignment = 205, +>ExportAssignment : SyntaxKind + + ExportDeclaration = 206, +>ExportDeclaration : SyntaxKind + + NamedExports = 207, +>NamedExports : SyntaxKind + + ExportSpecifier = 208, +>ExportSpecifier : SyntaxKind + + ExternalModuleReference = 209, >ExternalModuleReference : SyntaxKind - CaseClause = 207, + CaseClause = 210, >CaseClause : SyntaxKind - DefaultClause = 208, + DefaultClause = 211, >DefaultClause : SyntaxKind - HeritageClause = 209, + HeritageClause = 212, >HeritageClause : SyntaxKind - CatchClause = 210, + CatchClause = 213, >CatchClause : SyntaxKind - PropertyAssignment = 211, + PropertyAssignment = 214, >PropertyAssignment : SyntaxKind - ShorthandPropertyAssignment = 212, + ShorthandPropertyAssignment = 215, >ShorthandPropertyAssignment : SyntaxKind - EnumMember = 213, + EnumMember = 216, >EnumMember : SyntaxKind - SourceFile = 214, + SourceFile = 217, >SourceFile : SyntaxKind - SyntaxList = 215, + SyntaxList = 218, >SyntaxList : SyntaxKind - Count = 216, + Count = 219, >Count : SyntaxKind FirstAssignment = 52, @@ -2340,9 +2349,9 @@ declare module "typescript" { >Identifier : Identifier namedBindings?: NamespaceImport | NamedImports; ->namedBindings : NamespaceImport | NamedImports +>namedBindings : NamespaceImport | NamedImportsOrExports >NamespaceImport : NamespaceImport ->NamedImports : NamedImports +>NamedImports : NamedImportsOrExports } interface NamespaceImport extends Declaration { >NamespaceImport : NamespaceImport @@ -2352,17 +2361,38 @@ declare module "typescript" { >name : Identifier >Identifier : Identifier } - interface NamedImports extends Node { ->NamedImports : NamedImports + interface ExportDeclaration extends Statement, ModuleElement { +>ExportDeclaration : ExportDeclaration +>Statement : Statement +>ModuleElement : ModuleElement + + exportClause?: NamedExports; +>exportClause : NamedImportsOrExports +>NamedExports : NamedImportsOrExports + + moduleSpecifier?: Expression; +>moduleSpecifier : Expression +>Expression : Expression + } + interface NamedImportsOrExports extends Node { +>NamedImportsOrExports : NamedImportsOrExports >Node : Node - elements: NodeArray; ->elements : NodeArray + elements: NodeArray; +>elements : NodeArray >NodeArray : NodeArray ->ImportSpecifier : ImportSpecifier +>ImportOrExportSpecifier : ImportOrExportSpecifier } - interface ImportSpecifier extends Declaration { ->ImportSpecifier : ImportSpecifier + type NamedImports = NamedImportsOrExports; +>NamedImports : NamedImportsOrExports +>NamedImportsOrExports : NamedImportsOrExports + + type NamedExports = NamedImportsOrExports; +>NamedExports : NamedImportsOrExports +>NamedImportsOrExports : NamedImportsOrExports + + interface ImportOrExportSpecifier extends Declaration { +>ImportOrExportSpecifier : ImportOrExportSpecifier >Declaration : Declaration propertyName?: Identifier; @@ -2373,6 +2403,14 @@ declare module "typescript" { >name : Identifier >Identifier : Identifier } + type ImportSpecifier = ImportOrExportSpecifier; +>ImportSpecifier : ImportOrExportSpecifier +>ImportOrExportSpecifier : ImportOrExportSpecifier + + type ExportSpecifier = ImportOrExportSpecifier; +>ExportSpecifier : ImportOrExportSpecifier +>ImportOrExportSpecifier : ImportOrExportSpecifier + interface ExportAssignment extends Statement, ModuleElement { >ExportAssignment : ExportAssignment >Statement : Statement @@ -3026,12 +3064,13 @@ declare module "typescript" { interface EmitResolver { >EmitResolver : EmitResolver - getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration): string; ->getGeneratedNameForNode : (node: EnumDeclaration | ModuleDeclaration | ImportDeclaration) => string ->node : EnumDeclaration | ModuleDeclaration | ImportDeclaration + getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration | ExportDeclaration): string; +>getGeneratedNameForNode : (node: EnumDeclaration | ModuleDeclaration | ImportDeclaration | ExportDeclaration) => string +>node : EnumDeclaration | ModuleDeclaration | ImportDeclaration | ExportDeclaration >ModuleDeclaration : ModuleDeclaration >EnumDeclaration : EnumDeclaration >ImportDeclaration : ImportDeclaration +>ExportDeclaration : ExportDeclaration getExpressionNameSubstitution(node: Identifier): string; >getExpressionNameSubstitution : (node: Identifier) => string diff --git a/tests/baselines/reference/APISample_transform.js b/tests/baselines/reference/APISample_transform.js index 295d45c220e..1627415c834 100644 --- a/tests/baselines/reference/APISample_transform.js +++ b/tests/baselines/reference/APISample_transform.js @@ -291,23 +291,26 @@ declare module "typescript" { ModuleDeclaration = 197, ModuleBlock = 198, ImportEqualsDeclaration = 199, - ExportAssignment = 200, - ImportDeclaration = 201, - ImportClause = 202, - NamespaceImport = 203, - NamedImports = 204, - ImportSpecifier = 205, - ExternalModuleReference = 206, - CaseClause = 207, - DefaultClause = 208, - HeritageClause = 209, - CatchClause = 210, - PropertyAssignment = 211, - ShorthandPropertyAssignment = 212, - EnumMember = 213, - SourceFile = 214, - SyntaxList = 215, - Count = 216, + ImportDeclaration = 200, + ImportClause = 201, + NamespaceImport = 202, + NamedImports = 203, + ImportSpecifier = 204, + ExportAssignment = 205, + ExportDeclaration = 206, + NamedExports = 207, + ExportSpecifier = 208, + ExternalModuleReference = 209, + CaseClause = 210, + DefaultClause = 211, + HeritageClause = 212, + CatchClause = 213, + PropertyAssignment = 214, + ShorthandPropertyAssignment = 215, + EnumMember = 216, + SourceFile = 217, + SyntaxList = 218, + Count = 219, FirstAssignment = 52, LastAssignment = 63, FirstReservedWord = 65, @@ -759,13 +762,21 @@ declare module "typescript" { interface NamespaceImport extends Declaration { name: Identifier; } - interface NamedImports extends Node { - elements: NodeArray; + interface ExportDeclaration extends Statement, ModuleElement { + exportClause?: NamedExports; + moduleSpecifier?: Expression; } - interface ImportSpecifier extends Declaration { + interface NamedImportsOrExports extends Node { + elements: NodeArray; + } + type NamedImports = NamedImportsOrExports; + type NamedExports = NamedImportsOrExports; + interface ImportOrExportSpecifier extends Declaration { propertyName?: Identifier; name: Identifier; } + type ImportSpecifier = ImportOrExportSpecifier; + type ExportSpecifier = ImportOrExportSpecifier; interface ExportAssignment extends Statement, ModuleElement { exportName: Identifier; } @@ -934,7 +945,7 @@ declare module "typescript" { errorModuleName?: string; } interface EmitResolver { - getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration): string; + getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration | ExportDeclaration): string; getExpressionNameSubstitution(node: Identifier): string; getExportAssignmentName(node: SourceFile): string; isReferencedImportDeclaration(node: Node): boolean; diff --git a/tests/baselines/reference/APISample_transform.types b/tests/baselines/reference/APISample_transform.types index 90b06ebb8ca..9d0dbdb0768 100644 --- a/tests/baselines/reference/APISample_transform.types +++ b/tests/baselines/reference/APISample_transform.types @@ -889,55 +889,64 @@ declare module "typescript" { ImportEqualsDeclaration = 199, >ImportEqualsDeclaration : SyntaxKind - ExportAssignment = 200, ->ExportAssignment : SyntaxKind - - ImportDeclaration = 201, + ImportDeclaration = 200, >ImportDeclaration : SyntaxKind - ImportClause = 202, + ImportClause = 201, >ImportClause : SyntaxKind - NamespaceImport = 203, + NamespaceImport = 202, >NamespaceImport : SyntaxKind - NamedImports = 204, + NamedImports = 203, >NamedImports : SyntaxKind - ImportSpecifier = 205, + ImportSpecifier = 204, >ImportSpecifier : SyntaxKind - ExternalModuleReference = 206, + ExportAssignment = 205, +>ExportAssignment : SyntaxKind + + ExportDeclaration = 206, +>ExportDeclaration : SyntaxKind + + NamedExports = 207, +>NamedExports : SyntaxKind + + ExportSpecifier = 208, +>ExportSpecifier : SyntaxKind + + ExternalModuleReference = 209, >ExternalModuleReference : SyntaxKind - CaseClause = 207, + CaseClause = 210, >CaseClause : SyntaxKind - DefaultClause = 208, + DefaultClause = 211, >DefaultClause : SyntaxKind - HeritageClause = 209, + HeritageClause = 212, >HeritageClause : SyntaxKind - CatchClause = 210, + CatchClause = 213, >CatchClause : SyntaxKind - PropertyAssignment = 211, + PropertyAssignment = 214, >PropertyAssignment : SyntaxKind - ShorthandPropertyAssignment = 212, + ShorthandPropertyAssignment = 215, >ShorthandPropertyAssignment : SyntaxKind - EnumMember = 213, + EnumMember = 216, >EnumMember : SyntaxKind - SourceFile = 214, + SourceFile = 217, >SourceFile : SyntaxKind - SyntaxList = 215, + SyntaxList = 218, >SyntaxList : SyntaxKind - Count = 216, + Count = 219, >Count : SyntaxKind FirstAssignment = 52, @@ -2292,9 +2301,9 @@ declare module "typescript" { >Identifier : Identifier namedBindings?: NamespaceImport | NamedImports; ->namedBindings : NamespaceImport | NamedImports +>namedBindings : NamespaceImport | NamedImportsOrExports >NamespaceImport : NamespaceImport ->NamedImports : NamedImports +>NamedImports : NamedImportsOrExports } interface NamespaceImport extends Declaration { >NamespaceImport : NamespaceImport @@ -2304,17 +2313,38 @@ declare module "typescript" { >name : Identifier >Identifier : Identifier } - interface NamedImports extends Node { ->NamedImports : NamedImports + interface ExportDeclaration extends Statement, ModuleElement { +>ExportDeclaration : ExportDeclaration +>Statement : Statement +>ModuleElement : ModuleElement + + exportClause?: NamedExports; +>exportClause : NamedImportsOrExports +>NamedExports : NamedImportsOrExports + + moduleSpecifier?: Expression; +>moduleSpecifier : Expression +>Expression : Expression + } + interface NamedImportsOrExports extends Node { +>NamedImportsOrExports : NamedImportsOrExports >Node : Node - elements: NodeArray; ->elements : NodeArray + elements: NodeArray; +>elements : NodeArray >NodeArray : NodeArray ->ImportSpecifier : ImportSpecifier +>ImportOrExportSpecifier : ImportOrExportSpecifier } - interface ImportSpecifier extends Declaration { ->ImportSpecifier : ImportSpecifier + type NamedImports = NamedImportsOrExports; +>NamedImports : NamedImportsOrExports +>NamedImportsOrExports : NamedImportsOrExports + + type NamedExports = NamedImportsOrExports; +>NamedExports : NamedImportsOrExports +>NamedImportsOrExports : NamedImportsOrExports + + interface ImportOrExportSpecifier extends Declaration { +>ImportOrExportSpecifier : ImportOrExportSpecifier >Declaration : Declaration propertyName?: Identifier; @@ -2325,6 +2355,14 @@ declare module "typescript" { >name : Identifier >Identifier : Identifier } + type ImportSpecifier = ImportOrExportSpecifier; +>ImportSpecifier : ImportOrExportSpecifier +>ImportOrExportSpecifier : ImportOrExportSpecifier + + type ExportSpecifier = ImportOrExportSpecifier; +>ExportSpecifier : ImportOrExportSpecifier +>ImportOrExportSpecifier : ImportOrExportSpecifier + interface ExportAssignment extends Statement, ModuleElement { >ExportAssignment : ExportAssignment >Statement : Statement @@ -2978,12 +3016,13 @@ declare module "typescript" { interface EmitResolver { >EmitResolver : EmitResolver - getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration): string; ->getGeneratedNameForNode : (node: EnumDeclaration | ModuleDeclaration | ImportDeclaration) => string ->node : EnumDeclaration | ModuleDeclaration | ImportDeclaration + getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration | ExportDeclaration): string; +>getGeneratedNameForNode : (node: EnumDeclaration | ModuleDeclaration | ImportDeclaration | ExportDeclaration) => string +>node : EnumDeclaration | ModuleDeclaration | ImportDeclaration | ExportDeclaration >ModuleDeclaration : ModuleDeclaration >EnumDeclaration : EnumDeclaration >ImportDeclaration : ImportDeclaration +>ExportDeclaration : ExportDeclaration getExpressionNameSubstitution(node: Identifier): string; >getExpressionNameSubstitution : (node: Identifier) => string diff --git a/tests/baselines/reference/APISample_watcher.js b/tests/baselines/reference/APISample_watcher.js index d083c54673e..6c4c0977aac 100644 --- a/tests/baselines/reference/APISample_watcher.js +++ b/tests/baselines/reference/APISample_watcher.js @@ -328,23 +328,26 @@ declare module "typescript" { ModuleDeclaration = 197, ModuleBlock = 198, ImportEqualsDeclaration = 199, - ExportAssignment = 200, - ImportDeclaration = 201, - ImportClause = 202, - NamespaceImport = 203, - NamedImports = 204, - ImportSpecifier = 205, - ExternalModuleReference = 206, - CaseClause = 207, - DefaultClause = 208, - HeritageClause = 209, - CatchClause = 210, - PropertyAssignment = 211, - ShorthandPropertyAssignment = 212, - EnumMember = 213, - SourceFile = 214, - SyntaxList = 215, - Count = 216, + ImportDeclaration = 200, + ImportClause = 201, + NamespaceImport = 202, + NamedImports = 203, + ImportSpecifier = 204, + ExportAssignment = 205, + ExportDeclaration = 206, + NamedExports = 207, + ExportSpecifier = 208, + ExternalModuleReference = 209, + CaseClause = 210, + DefaultClause = 211, + HeritageClause = 212, + CatchClause = 213, + PropertyAssignment = 214, + ShorthandPropertyAssignment = 215, + EnumMember = 216, + SourceFile = 217, + SyntaxList = 218, + Count = 219, FirstAssignment = 52, LastAssignment = 63, FirstReservedWord = 65, @@ -796,13 +799,21 @@ declare module "typescript" { interface NamespaceImport extends Declaration { name: Identifier; } - interface NamedImports extends Node { - elements: NodeArray; + interface ExportDeclaration extends Statement, ModuleElement { + exportClause?: NamedExports; + moduleSpecifier?: Expression; } - interface ImportSpecifier extends Declaration { + interface NamedImportsOrExports extends Node { + elements: NodeArray; + } + type NamedImports = NamedImportsOrExports; + type NamedExports = NamedImportsOrExports; + interface ImportOrExportSpecifier extends Declaration { propertyName?: Identifier; name: Identifier; } + type ImportSpecifier = ImportOrExportSpecifier; + type ExportSpecifier = ImportOrExportSpecifier; interface ExportAssignment extends Statement, ModuleElement { exportName: Identifier; } @@ -971,7 +982,7 @@ declare module "typescript" { errorModuleName?: string; } interface EmitResolver { - getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration): string; + getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration | ExportDeclaration): string; getExpressionNameSubstitution(node: Identifier): string; getExportAssignmentName(node: SourceFile): string; isReferencedImportDeclaration(node: Node): boolean; diff --git a/tests/baselines/reference/APISample_watcher.types b/tests/baselines/reference/APISample_watcher.types index e4cffc16aa1..fb342d09cdd 100644 --- a/tests/baselines/reference/APISample_watcher.types +++ b/tests/baselines/reference/APISample_watcher.types @@ -1062,55 +1062,64 @@ declare module "typescript" { ImportEqualsDeclaration = 199, >ImportEqualsDeclaration : SyntaxKind - ExportAssignment = 200, ->ExportAssignment : SyntaxKind - - ImportDeclaration = 201, + ImportDeclaration = 200, >ImportDeclaration : SyntaxKind - ImportClause = 202, + ImportClause = 201, >ImportClause : SyntaxKind - NamespaceImport = 203, + NamespaceImport = 202, >NamespaceImport : SyntaxKind - NamedImports = 204, + NamedImports = 203, >NamedImports : SyntaxKind - ImportSpecifier = 205, + ImportSpecifier = 204, >ImportSpecifier : SyntaxKind - ExternalModuleReference = 206, + ExportAssignment = 205, +>ExportAssignment : SyntaxKind + + ExportDeclaration = 206, +>ExportDeclaration : SyntaxKind + + NamedExports = 207, +>NamedExports : SyntaxKind + + ExportSpecifier = 208, +>ExportSpecifier : SyntaxKind + + ExternalModuleReference = 209, >ExternalModuleReference : SyntaxKind - CaseClause = 207, + CaseClause = 210, >CaseClause : SyntaxKind - DefaultClause = 208, + DefaultClause = 211, >DefaultClause : SyntaxKind - HeritageClause = 209, + HeritageClause = 212, >HeritageClause : SyntaxKind - CatchClause = 210, + CatchClause = 213, >CatchClause : SyntaxKind - PropertyAssignment = 211, + PropertyAssignment = 214, >PropertyAssignment : SyntaxKind - ShorthandPropertyAssignment = 212, + ShorthandPropertyAssignment = 215, >ShorthandPropertyAssignment : SyntaxKind - EnumMember = 213, + EnumMember = 216, >EnumMember : SyntaxKind - SourceFile = 214, + SourceFile = 217, >SourceFile : SyntaxKind - SyntaxList = 215, + SyntaxList = 218, >SyntaxList : SyntaxKind - Count = 216, + Count = 219, >Count : SyntaxKind FirstAssignment = 52, @@ -2465,9 +2474,9 @@ declare module "typescript" { >Identifier : Identifier namedBindings?: NamespaceImport | NamedImports; ->namedBindings : NamespaceImport | NamedImports +>namedBindings : NamespaceImport | NamedImportsOrExports >NamespaceImport : NamespaceImport ->NamedImports : NamedImports +>NamedImports : NamedImportsOrExports } interface NamespaceImport extends Declaration { >NamespaceImport : NamespaceImport @@ -2477,17 +2486,38 @@ declare module "typescript" { >name : Identifier >Identifier : Identifier } - interface NamedImports extends Node { ->NamedImports : NamedImports + interface ExportDeclaration extends Statement, ModuleElement { +>ExportDeclaration : ExportDeclaration +>Statement : Statement +>ModuleElement : ModuleElement + + exportClause?: NamedExports; +>exportClause : NamedImportsOrExports +>NamedExports : NamedImportsOrExports + + moduleSpecifier?: Expression; +>moduleSpecifier : Expression +>Expression : Expression + } + interface NamedImportsOrExports extends Node { +>NamedImportsOrExports : NamedImportsOrExports >Node : Node - elements: NodeArray; ->elements : NodeArray + elements: NodeArray; +>elements : NodeArray >NodeArray : NodeArray ->ImportSpecifier : ImportSpecifier +>ImportOrExportSpecifier : ImportOrExportSpecifier } - interface ImportSpecifier extends Declaration { ->ImportSpecifier : ImportSpecifier + type NamedImports = NamedImportsOrExports; +>NamedImports : NamedImportsOrExports +>NamedImportsOrExports : NamedImportsOrExports + + type NamedExports = NamedImportsOrExports; +>NamedExports : NamedImportsOrExports +>NamedImportsOrExports : NamedImportsOrExports + + interface ImportOrExportSpecifier extends Declaration { +>ImportOrExportSpecifier : ImportOrExportSpecifier >Declaration : Declaration propertyName?: Identifier; @@ -2498,6 +2528,14 @@ declare module "typescript" { >name : Identifier >Identifier : Identifier } + type ImportSpecifier = ImportOrExportSpecifier; +>ImportSpecifier : ImportOrExportSpecifier +>ImportOrExportSpecifier : ImportOrExportSpecifier + + type ExportSpecifier = ImportOrExportSpecifier; +>ExportSpecifier : ImportOrExportSpecifier +>ImportOrExportSpecifier : ImportOrExportSpecifier + interface ExportAssignment extends Statement, ModuleElement { >ExportAssignment : ExportAssignment >Statement : Statement @@ -3151,12 +3189,13 @@ declare module "typescript" { interface EmitResolver { >EmitResolver : EmitResolver - getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration): string; ->getGeneratedNameForNode : (node: EnumDeclaration | ModuleDeclaration | ImportDeclaration) => string ->node : EnumDeclaration | ModuleDeclaration | ImportDeclaration + getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration | ExportDeclaration): string; +>getGeneratedNameForNode : (node: EnumDeclaration | ModuleDeclaration | ImportDeclaration | ExportDeclaration) => string +>node : EnumDeclaration | ModuleDeclaration | ImportDeclaration | ExportDeclaration >ModuleDeclaration : ModuleDeclaration >EnumDeclaration : EnumDeclaration >ImportDeclaration : ImportDeclaration +>ExportDeclaration : ExportDeclaration getExpressionNameSubstitution(node: Identifier): string; >getExpressionNameSubstitution : (node: Identifier) => string