Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update signatures to avoid post-LKG error #48677

Merged
merged 1 commit into from
Apr 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/deprecatedCompat/deprecations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);

Expand All @@ -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);

Expand All @@ -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);

Expand Down