mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 11:24:29 -05:00
Types for the new es6 style import statement parsing
This commit is contained in:
@@ -230,6 +230,11 @@ module ts {
|
||||
ModuleBlock,
|
||||
ImportEqualsDeclaration,
|
||||
ExportAssignment,
|
||||
ImportStatement,
|
||||
ImportClause,
|
||||
NamespaceImport,
|
||||
NamedImports,
|
||||
ImportSpecifier,
|
||||
|
||||
// Module references
|
||||
ExternalModuleReference,
|
||||
@@ -861,6 +866,29 @@ module ts {
|
||||
expression?: Expression;
|
||||
}
|
||||
|
||||
export interface ImportStatement extends Statement, ModuleElement {
|
||||
importClause?: ImportClause;
|
||||
moduleSpecifier: StringLiteralExpression;
|
||||
}
|
||||
|
||||
export interface ImportClause extends Node {
|
||||
defaultBinding?: Identifier;
|
||||
bindings?: NamespaceImport | NamedImports;
|
||||
}
|
||||
|
||||
export interface NamespaceImport extends Declaration {
|
||||
name: Identifier;
|
||||
}
|
||||
|
||||
export interface NamedImports extends Node {
|
||||
elements: NodeArray<ImportSpecifier>;
|
||||
}
|
||||
|
||||
export interface ImportSpecifier extends Declaration {
|
||||
propertyName?: Identifier; // Property name to be imported from module
|
||||
name: Identifier; // element name to be imported in the scope
|
||||
}
|
||||
|
||||
export interface ExportAssignment extends Statement, ModuleElement {
|
||||
exportName: Identifier;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user