mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-24 20:44:53 -05:00
Allow string for name when creating a TypeAliasDeclaration
This commit is contained in:
@@ -1462,7 +1462,7 @@ namespace ts {
|
||||
: node;
|
||||
}
|
||||
|
||||
export function createTypeAliasDeclaration(name: Identifier, typeParameters: TypeParameterDeclaration[] | undefined, type: TypeNode) {
|
||||
export function createTypeAliasDeclaration(name: string | Identifier, typeParameters: TypeParameterDeclaration[] | undefined, type: TypeNode) {
|
||||
const node = <TypeAliasDeclaration>createSynthesizedNode(SyntaxKind.TypeAliasDeclaration);
|
||||
node.name = asName(name);
|
||||
node.typeParameters = asNodeArray(typeParameters);
|
||||
|
||||
Reference in New Issue
Block a user