Skip to content

Commit 3fe05c8

Browse files
authored
fix(37578): Deprecate variable name AllowQualifedNameInPlaceOfIdentifier (#38726)
* Change variable name AllowQualifedNameInPlaceOfIdentifier to AllowQualifiedNameInPlaceOfIdentifier * Change deleting AllowQualifedNameInPlaceOfIdentifier to deprecating it instead. * Fix failing tests * Replace old value
1 parent 3910d9e commit 3fe05c8

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

src/compiler/checker.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5757,7 +5757,7 @@ namespace ts {
57575757

57585758
if (expectsIdentifier && chain.length !== 1
57595759
&& !context.encounteredError
5760-
&& !(context.flags & NodeBuilderFlags.AllowQualifedNameInPlaceOfIdentifier)) {
5760+
&& !(context.flags & NodeBuilderFlags.AllowQualifiedNameInPlaceOfIdentifier)) {
57615761
context.encounteredError = true;
57625762
}
57635763
return createEntityNameFromSymbolChain(chain, chain.length - 1);

src/compiler/types.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -4289,7 +4289,9 @@ namespace ts {
42894289

42904290
// Error handling
42914291
AllowThisInObjectLiteral = 1 << 15,
4292-
AllowQualifedNameInPlaceOfIdentifier = 1 << 16,
4292+
AllowQualifiedNameInPlaceOfIdentifier = 1 << 16,
4293+
/** @deprecated AllowQualifedNameInPlaceOfIdentifier. Use AllowQualifiedNameInPlaceOfIdentifier instead. */
4294+
AllowQualifedNameInPlaceOfIdentifier = AllowQualifiedNameInPlaceOfIdentifier,
42934295
AllowAnonymousIdentifier = 1 << 17,
42944296
AllowEmptyUnionOrIntersection = 1 << 18,
42954297
AllowEmptyTuple = 1 << 19,
@@ -4300,7 +4302,7 @@ namespace ts {
43004302
AllowNodeModulesRelativePaths = 1 << 26,
43014303
/* @internal */ DoNotIncludeSymbolChain = 1 << 27, // Skip looking up and printing an accessible symbol chain
43024304

4303-
IgnoreErrors = AllowThisInObjectLiteral | AllowQualifedNameInPlaceOfIdentifier | AllowAnonymousIdentifier | AllowEmptyUnionOrIntersection | AllowEmptyTuple | AllowEmptyIndexInfoType | AllowNodeModulesRelativePaths,
4305+
IgnoreErrors = AllowThisInObjectLiteral | AllowQualifiedNameInPlaceOfIdentifier | AllowAnonymousIdentifier | AllowEmptyUnionOrIntersection | AllowEmptyTuple | AllowEmptyIndexInfoType | AllowNodeModulesRelativePaths,
43044306

43054307
// State
43064308
InObjectTypeLiteral = 1 << 22,

tests/baselines/reference/api/tsserverlibrary.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -2261,6 +2261,8 @@ declare namespace ts {
22612261
NoTypeReduction = 536870912,
22622262
NoUndefinedOptionalParameterType = 1073741824,
22632263
AllowThisInObjectLiteral = 32768,
2264+
AllowQualifiedNameInPlaceOfIdentifier = 65536,
2265+
/** @deprecated AllowQualifedNameInPlaceOfIdentifier. Use AllowQualifiedNameInPlaceOfIdentifier instead. */
22642266
AllowQualifedNameInPlaceOfIdentifier = 65536,
22652267
AllowAnonymousIdentifier = 131072,
22662268
AllowEmptyUnionOrIntersection = 262144,

tests/baselines/reference/api/typescript.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -2261,6 +2261,8 @@ declare namespace ts {
22612261
NoTypeReduction = 536870912,
22622262
NoUndefinedOptionalParameterType = 1073741824,
22632263
AllowThisInObjectLiteral = 32768,
2264+
AllowQualifiedNameInPlaceOfIdentifier = 65536,
2265+
/** @deprecated AllowQualifedNameInPlaceOfIdentifier. Use AllowQualifiedNameInPlaceOfIdentifier instead. */
22642266
AllowQualifedNameInPlaceOfIdentifier = 65536,
22652267
AllowAnonymousIdentifier = 131072,
22662268
AllowEmptyUnionOrIntersection = 262144,

0 commit comments

Comments
 (0)