Add missing undefined type for createProperty initializer (#16095)
This commit is contained in:
parent
2412f8c6cf
commit
6972766e91
1 changed files with 2 additions and 2 deletions
|
@ -303,7 +303,7 @@ namespace ts {
|
||||||
: node;
|
: node;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function createProperty(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression) {
|
export function createProperty(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined) {
|
||||||
const node = <PropertyDeclaration>createSynthesizedNode(SyntaxKind.PropertyDeclaration);
|
const node = <PropertyDeclaration>createSynthesizedNode(SyntaxKind.PropertyDeclaration);
|
||||||
node.decorators = asNodeArray(decorators);
|
node.decorators = asNodeArray(decorators);
|
||||||
node.modifiers = asNodeArray(modifiers);
|
node.modifiers = asNodeArray(modifiers);
|
||||||
|
@ -314,7 +314,7 @@ namespace ts {
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function updateProperty(node: PropertyDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: PropertyName, type: TypeNode | undefined, initializer: Expression) {
|
export function updateProperty(node: PropertyDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: PropertyName, type: TypeNode | undefined, initializer: Expression | undefined) {
|
||||||
return node.decorators !== decorators
|
return node.decorators !== decorators
|
||||||
|| node.modifiers !== modifiers
|
|| node.modifiers !== modifiers
|
||||||
|| node.name !== name
|
|| node.name !== name
|
||||||
|
|
Loading…
Reference in a new issue