Skip to content

Commit b27aec2

Browse files
author
Mohsen Azimi
committed
Allow string for name when creating a TypeAliasDeclaration
1 parent f9c46b5 commit b27aec2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/factory.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1462,7 +1462,7 @@ namespace ts {
14621462
: node;
14631463
}
14641464

1465-
export function createTypeAliasDeclaration(name: Identifier, typeParameters: TypeParameterDeclaration[] | undefined, type: TypeNode) {
1465+
export function createTypeAliasDeclaration(name: string | Identifier, typeParameters: TypeParameterDeclaration[] | undefined, type: TypeNode) {
14661466
const node = <TypeAliasDeclaration>createSynthesizedNode(SyntaxKind.TypeAliasDeclaration);
14671467
node.name = asName(name);
14681468
node.typeParameters = asNodeArray(typeParameters);

0 commit comments

Comments
 (0)