fix(37578): Deprecate variable name AllowQualifedNameInPlaceOfIdentifier#38726
fix(37578): Deprecate variable name AllowQualifedNameInPlaceOfIdentifier#38726sandersn merged 4 commits intomicrosoft:masterfrom cljazouli:Rename-variable-AllowQualifedNameInPlaceOfIdentifier-Typo
Conversation
…lifiedNameInPlaceOfIdentifier
There was a problem hiding this comment.
In #37578 I asked to deprecate misspelled variable instead of removing it, as it may break backward-compatibility (in linters, etc.)
It was previously done here, for example:
TypeScript/src/compiler/types.ts
Lines 3380 to 3381 in a1c8608
| // Error handling | ||
| AllowThisInObjectLiteral = 1 << 15, | ||
| AllowQualifedNameInPlaceOfIdentifier = 1 << 16, | ||
| AllowQualifiedNameInPlaceOfIdentifier = 1 << 16, |
There was a problem hiding this comment.
In #37578 I asked to deprecate misspelled variable instead of removing it, as it may break backward-compatibility (in linters, etc.)
It was previously done here, for example:
TypeScript/src/compiler/types.ts
Lines 3380 to 3381 in a1c8608
What do you think about it?
There was a problem hiding this comment.
Oh yeah, that sounds much better than deleting it. I just updated my code to deprecate it instead.
sandersn
left a comment
There was a problem hiding this comment.
Thanks for this fix. I requested one minor change; if you no longer have time for it, let me know and I'll try to get to it myself.
| if (expectsIdentifier && chain.length !== 1 | ||
| && !context.encounteredError | ||
| && !(context.flags & NodeBuilderFlags.AllowQualifiedNameInPlaceOfIdentifier) | ||
| && !(context.flags & NodeBuilderFlags.AllowQualifedNameInPlaceOfIdentifier)) { |
There was a problem hiding this comment.
the new value is the same as the old, so you should replace the old usage instead of adding to it.
sandersn
left a comment
There was a problem hiding this comment.
Couple more things I noticed
| /* @internal */ DoNotIncludeSymbolChain = 1 << 27, // Skip looking up and printing an accessible symbol chain | ||
|
|
||
| IgnoreErrors = AllowThisInObjectLiteral | AllowQualifedNameInPlaceOfIdentifier | AllowAnonymousIdentifier | AllowEmptyUnionOrIntersection | AllowEmptyTuple | AllowEmptyIndexInfoType | AllowNodeModulesRelativePaths, | ||
| IgnoreErrors = AllowThisInObjectLiteral | AllowQualifedNameInPlaceOfIdentifier | AllowQualifiedNameInPlaceOfIdentifier | AllowAnonymousIdentifier | AllowEmptyUnionOrIntersection | AllowEmptyTuple | AllowEmptyIndexInfoType | AllowNodeModulesRelativePaths, |
| AllowThisInObjectLiteral = 1 << 15, | ||
| AllowQualifiedNameInPlaceOfIdentifier = 1 << 16, | ||
| /** @deprecated AllowQualifedNameInPlaceOfIdentifier. Use AllowQualifiedNameInPlaceOfIdentifier instead. */ | ||
| AllowQualifedNameInPlaceOfIdentifier = 1 << 16, |
There was a problem hiding this comment.
please replace 1 << 16 with AllowQualifiedNameInPlaceOfIdentifier
|
@sandersn Thanks! I will make those changes |
sandersn
left a comment
There was a problem hiding this comment.
I'll merge this after 4.1 RC gets its own branch, so that it'll ship in 4.1.
Description:
Change variable name AllowQualifedNameInPlaceOfIdentifier to AllowQualifiedNameInPlaceOfIdentifier
Bug introduced in: #14709
Expected behavior:
AllowQualifedNameInPlaceOfIdentifier should be deprecated in favor of AllowQualifiedNameInPlaceOfIdentifier
Actual behavior:
AllowQualifedNameInPlaceOfIdentifier is not deprecated
Fixes #37578