Add missing undefined type (#15999)

This commit is contained in:
Ika
2017-05-23 06:58:35 +08:00
committed by Mohamed Hegazy
parent bc914c02e6
commit 05498be441

View File

@@ -1631,14 +1631,14 @@ namespace ts {
: node;
}
export function createImportClause(name: Identifier, namedBindings: NamedImportBindings): ImportClause {
export function createImportClause(name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause {
const node = <ImportClause>createSynthesizedNode(SyntaxKind.ImportClause);
node.name = name;
node.namedBindings = namedBindings;
return node;
}
export function updateImportClause(node: ImportClause, name: Identifier, namedBindings: NamedImportBindings) {
export function updateImportClause(node: ImportClause, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined) {
return node.name !== name
|| node.namedBindings !== namedBindings
? updateNode(createImportClause(name, namedBindings), node)