mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-29 16:29:19 -05:00
Update signatures to avoid post-LKG error (#48677)
This commit is contained in:
@@ -1125,7 +1125,7 @@ namespace ts {
|
||||
name: PropertyName | string,
|
||||
questionToken: QuestionToken | undefined,
|
||||
type: TypeNode | undefined,
|
||||
initializer?: Expression
|
||||
initializer?: Expression | undefined
|
||||
): PropertySignature {
|
||||
const node = factory.createPropertySignature(modifiers, name, questionToken, type);
|
||||
node.initializer = initializer;
|
||||
@@ -1187,7 +1187,7 @@ namespace ts {
|
||||
arguments.length >= 1 && arguments.length <= 3 ? factory.createVariableDeclaration(name, /*exclamationToken*/ undefined, exclamationTokenOrType as TypeNode | undefined, typeOrInitializer as Expression | undefined) :
|
||||
Debug.fail("Argument count mismatch");
|
||||
} as {
|
||||
(name: string | BindingName, type?: TypeNode, initializer?: Expression): VariableDeclaration;
|
||||
(name: string | BindingName, type?: TypeNode | undefined, initializer?: Expression | undefined): VariableDeclaration;
|
||||
(name: string | BindingName, exclamationToken: ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration;
|
||||
}, factoryDeprecation);
|
||||
|
||||
@@ -1212,7 +1212,7 @@ namespace ts {
|
||||
}, factoryDeprecation);
|
||||
|
||||
/** @deprecated Use `factory.createExportDeclaration` or the factory supplied by your transformation context instead. */
|
||||
export const createExportDeclaration = Debug.deprecate(function createExportDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, exportClause: NamedExportBindings | undefined, moduleSpecifier?: Expression, isTypeOnly = false) {
|
||||
export const createExportDeclaration = Debug.deprecate(function createExportDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, exportClause: NamedExportBindings | undefined, moduleSpecifier?: Expression | undefined, isTypeOnly = false) {
|
||||
return factory.createExportDeclaration(decorators, modifiers, isTypeOnly, exportClause, moduleSpecifier);
|
||||
}, factoryDeprecation);
|
||||
|
||||
@@ -1228,7 +1228,7 @@ namespace ts {
|
||||
}, factoryDeprecation);
|
||||
|
||||
/** @deprecated Use `factory.createJSDocParameterTag` or the factory supplied by your transformation context instead. */
|
||||
export const createJSDocParamTag = Debug.deprecate(function createJSDocParamTag(name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression, comment?: string): JSDocParameterTag {
|
||||
export const createJSDocParamTag = Debug.deprecate(function createJSDocParamTag(name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression | undefined, comment?: string | undefined): JSDocParameterTag {
|
||||
return factory.createJSDocParameterTag(/*tagName*/ undefined, name, isBracketed, typeExpression, /*isNameFirst*/ false, comment ? factory.createNodeArray([factory.createJSDocText(comment)]) : undefined);
|
||||
}, factoryDeprecation);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user