mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 20:25:23 -06:00
Types for the new es6 style import statement parsing
This commit is contained in:
parent
e0581899fa
commit
5bd8271f04
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user