Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
8ccfb4a
Analyze control flow effects of lambdas passed as arguments
ahejlsberg May 31, 2024
e4d20f8
Accept new baselines
ahejlsberg May 31, 2024
de9171e
Formatting + handle unreachable code
ahejlsberg Jun 3, 2024
18f1ba9
Add Deferred<T> intrinsic + only check lambdas with mutation flow nodes
ahejlsberg Jun 5, 2024
46f6706
Accept new baselines
ahejlsberg Jun 5, 2024
dd59710
Local declarations don't mutate captured outer variables
ahejlsberg Jun 5, 2024
63ef249
Less aggressive call resolution
ahejlsberg Jun 6, 2024
0523c63
Optimize lambda assignment analysis using isMutableFlowNode walk
ahejlsberg Jun 7, 2024
3dbb4f4
Allocation-free caching in isMutationFlowNode
ahejlsberg Jun 8, 2024
738f6b5
Only analyze lambdas when widening is possible
ahejlsberg Jun 10, 2024
3ae7cb2
Implement 'deferred' modifier, remove Deferred<T> marker type
ahejlsberg Jun 13, 2024
0288e18
Accept new baselines
ahejlsberg Jun 13, 2024
fc9c454
Use comparable relation for check + fix parsing issue
ahejlsberg Jun 16, 2024
b6fb469
Add 'deferred' modifiers to Promise methods
ahejlsberg Jun 16, 2024
41883a1
Accept new baselines
ahejlsberg Jun 17, 2024
35aced6
Validation, print back, support for JSDoc
ahejlsberg Jun 20, 2024
89715f2
Accept new API baselines
ahejlsberg Jun 20, 2024
329d3fc
Accept Promise<T> print back changes
ahejlsberg Jun 20, 2024
8d8e60d
Merge branch 'main' into fix11498
ahejlsberg Jun 20, 2024
fde340b
Merge branch 'main' into fix11498
ahejlsberg Jul 10, 2024
96e6921
Support /** @deferred */ in .ts files
ahejlsberg Jul 11, 2024
37e6258
Switch lib.d.ts to use /** @deferred */
ahejlsberg Jul 11, 2024
22e9458
Accept new baselines
ahejlsberg Jul 11, 2024
3508e0e
Fix formatting
ahejlsberg Jul 11, 2024
01670b0
Add tests
ahejlsberg Jul 12, 2024
f392aa3
Merge branch 'main' into fix11498
ahejlsberg Aug 7, 2024
5ae48a2
Switch from 'deferred' modifier to 'immediate' modifier
ahejlsberg Aug 8, 2024
c16fc38
Update library types
ahejlsberg Aug 8, 2024
b60fbc0
Update tests
ahejlsberg Aug 8, 2024
7f7ccf6
Accept new baselines
ahejlsberg Aug 8, 2024
22faf4e
Delete old test baselines
ahejlsberg Aug 8, 2024
e037d82
Handle immediate modifier in strictSubtypeRelation and union signatures
ahejlsberg Aug 12, 2024
64e0459
Add tests
ahejlsberg Aug 12, 2024
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
Prev Previous commit
Next Next commit
Switch from 'deferred' modifier to 'immediate' modifier
  • Loading branch information
ahejlsberg committed Aug 8, 2024
commit 5ae48a223af04b060175760cf24fdc5a81827b4b
24 changes: 12 additions & 12 deletions src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28554,7 +28554,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
// circularities. Instead, we simply check if any signature has a deferred callback marker in the
// particular argument position.
signatures ??= getSignaturesOfType(getTypeOfExpression(flow.node.expression), SignatureKind.Call);
if (!some(signatures, sig => !!(getModifiersAtPosition(sig, i) & (ModifierFlags.Deferred | ModifierFlags.JSDocDeferred)))) {
if (some(signatures, sig => !!(getModifiersAtPosition(sig, i) & (ModifierFlags.Immediate | ModifierFlags.JSDocImmediate)))) {
const lambdaType = getTypeFromFlowType(getTypeAtFlowNode(lambda.returnFlowNode));
if (lambdaType !== initialType) {
lambdaTypes ??= [initialType];
Expand Down Expand Up @@ -41140,10 +41140,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
if (node.dotDotDotToken && !isBindingPattern(node.name) && !isTypeAssignableTo(getReducedType(getTypeOfSymbol(node.symbol)), anyReadonlyArrayType)) {
error(node, Diagnostics.A_rest_parameter_must_be_of_an_array_type);
}
if (hasEffectiveModifier(node, ModifierFlags.Deferred | ModifierFlags.JSDocDeferred)) {
if (hasEffectiveModifier(node, ModifierFlags.Immediate | ModifierFlags.JSDocImmediate)) {
const funcType = node.dotDotDotToken ? createArrayType(globalFunctionType, /*readonly*/ true) : globalFunctionType;
if (!areTypesComparable(getTypeOfSymbol(node.symbol), funcType)) {
error(node, Diagnostics.A_deferred_parameter_must_have_a_type_that_permits_functions);
error(node, Diagnostics.An_immediate_parameter_must_have_a_type_that_permits_functions);
}
}
}
Expand Down Expand Up @@ -51025,26 +51025,26 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
break;
}

case SyntaxKind.DeferredKeyword:
case SyntaxKind.ImmediateKeyword:
if (node.kind !== SyntaxKind.Parameter) {
return grammarErrorOnNode(modifier, Diagnostics.deferred_modifier_can_only_appear_on_a_parameter_declaration);
return grammarErrorOnNode(modifier, Diagnostics.immediate_modifier_can_only_appear_on_a_parameter_declaration);
}
if (flags & ModifierFlags.Deferred) {
return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "deferred");
if (flags & ModifierFlags.Immediate) {
return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "immediate");
}
if (flags & ModifierFlags.Public) {
return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "deferred", "public");
return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "immediate", "public");
}
if (flags & ModifierFlags.Protected) {
return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "deferred", "protected");
return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "immediate", "protected");
}
if (flags & ModifierFlags.Private) {
return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "deferred", "private");
return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "immediate", "private");
}
if (flags & ModifierFlags.Readonly) {
return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "deferred", "readonly");
return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "immediate", "readonly");
}
flags |= ModifierFlags.Deferred;
flags |= ModifierFlags.Immediate;
break;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/diagnosticMessages.json
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,7 @@
"category": "Error",
"code": 1293
},
"'deferred' modifier can only appear on a parameter declaration.": {
"'immediate' modifier can only appear on a parameter declaration.": {
"category": "Error",
"code": 1294
},
Expand Down Expand Up @@ -3944,7 +3944,7 @@
"category": "Error",
"code": 2873
},
"A 'deferred' parameter must have a type that permits functions.": {
"An 'immediate' parameter must have a type that permits functions.": {
"category": "Error",
"code": 2874
},
Expand Down
14 changes: 7 additions & 7 deletions src/compiler/factory/nodeFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,10 @@ import {
JSDocCallbackTag,
JSDocClassTag,
JSDocComment,
JSDocDeferredTag,
JSDocDeprecatedTag,
JSDocEnumTag,
JSDocFunctionType,
JSDocImmediateTag,
JSDocImplementsTag,
JSDocImportTag,
JSDocLink,
Expand Down Expand Up @@ -939,11 +939,11 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode
get updateJSDocDeprecatedTag() {
return getJSDocSimpleTagUpdateFunction<JSDocDeprecatedTag>(SyntaxKind.JSDocDeprecatedTag);
},
get createJSDocDeferredTag() {
return getJSDocSimpleTagCreateFunction<JSDocDeferredTag>(SyntaxKind.JSDocDeferredTag);
get createJSDocImmediateTag() {
return getJSDocSimpleTagCreateFunction<JSDocImmediateTag>(SyntaxKind.JSDocImmediateTag);
},
get updateJSDocDeferredTag() {
return getJSDocSimpleTagUpdateFunction<JSDocDeferredTag>(SyntaxKind.JSDocDeferredTag);
get updateJSDocImmediateTag() {
return getJSDocSimpleTagUpdateFunction<JSDocImmediateTag>(SyntaxKind.JSDocImmediateTag);
},
get createJSDocThrowsTag() {
return getJSDocTypeLikeTagCreateFunction<JSDocThrowsTag>(SyntaxKind.JSDocThrowsTag);
Expand Down Expand Up @@ -1478,7 +1478,7 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode
case SyntaxKind.ReadonlyKeyword:
case SyntaxKind.AbstractKeyword:
case SyntaxKind.DeclareKeyword:
case SyntaxKind.DeferredKeyword:
case SyntaxKind.ImmediateKeyword:
case SyntaxKind.ConstKeyword:
case SyntaxKind.AnyKeyword:
case SyntaxKind.NumberKeyword:
Expand Down Expand Up @@ -1563,7 +1563,7 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode
if (flags & ModifierFlags.Ambient) result.push(createModifier(SyntaxKind.DeclareKeyword));
if (flags & ModifierFlags.Default) result.push(createModifier(SyntaxKind.DefaultKeyword));
if (flags & ModifierFlags.Const) result.push(createModifier(SyntaxKind.ConstKeyword));
if (flags & ModifierFlags.Deferred) result.push(createModifier(SyntaxKind.DeferredKeyword));
if (flags & ModifierFlags.Immediate) result.push(createModifier(SyntaxKind.ImmediateKeyword));
if (flags & ModifierFlags.Public) result.push(createModifier(SyntaxKind.PublicKeyword));
if (flags & ModifierFlags.Private) result.push(createModifier(SyntaxKind.PrivateKeyword));
if (flags & ModifierFlags.Protected) result.push(createModifier(SyntaxKind.ProtectedKeyword));
Expand Down
6 changes: 3 additions & 3 deletions src/compiler/factory/nodeTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ import {
JSDocAuthorTag,
JSDocCallbackTag,
JSDocClassTag,
JSDocDeferredTag,
JSDocDeprecatedTag,
JSDocEnumTag,
JSDocFunctionType,
JSDocImmediateTag,
JSDocImplementsTag,
JSDocImportTag,
JSDocLink,
Expand Down Expand Up @@ -1138,8 +1138,8 @@ export function isJSDocDeprecatedTag(node: Node): node is JSDocDeprecatedTag {
return node.kind === SyntaxKind.JSDocDeprecatedTag;
}

export function isJSDocDeferredTag(node: Node): node is JSDocDeferredTag {
return node.kind === SyntaxKind.JSDocDeferredTag;
export function isJSDocImmediateTag(node: Node): node is JSDocImmediateTag {
return node.kind === SyntaxKind.JSDocImmediateTag;
}

export function isJSDocSeeTag(node: Node): node is JSDocSeeTag {
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9081,8 +9081,8 @@ namespace Parser {
hasDeprecatedTag = true;
tag = parseSimpleTag(start, factory.createJSDocDeprecatedTag, tagName, margin, indentText);
break;
case "deferred":
tag = parseSimpleTag(start, factory.createJSDocDeferredTag, tagName, margin, indentText);
case "immediate":
tag = parseSimpleTag(start, factory.createJSDocImmediateTag, tagName, margin, indentText);
break;
case "this":
tag = parseThisTag(start, tagName, margin, indentText);
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/program.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3342,7 +3342,7 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg
case SyntaxKind.ProtectedKeyword:
case SyntaxKind.ReadonlyKeyword:
case SyntaxKind.DeclareKeyword:
case SyntaxKind.DeferredKeyword:
case SyntaxKind.ImmediateKeyword:
case SyntaxKind.AbstractKeyword:
case SyntaxKind.OverrideKeyword:
case SyntaxKind.InKeyword:
Expand Down
6 changes: 3 additions & 3 deletions src/compiler/scanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ export const textToKeywordObj: MapLike<KeywordSyntaxKind> = {
debugger: SyntaxKind.DebuggerKeyword,
declare: SyntaxKind.DeclareKeyword,
default: SyntaxKind.DefaultKeyword,
deferred: SyntaxKind.DeferredKeyword,
delete: SyntaxKind.DeleteKeyword,
do: SyntaxKind.DoKeyword,
else: SyntaxKind.ElseKeyword,
Expand All @@ -164,6 +163,7 @@ export const textToKeywordObj: MapLike<KeywordSyntaxKind> = {
function: SyntaxKind.FunctionKeyword,
get: SyntaxKind.GetKeyword,
if: SyntaxKind.IfKeyword,
immediate: SyntaxKind.ImmediateKeyword,
implements: SyntaxKind.ImplementsKeyword,
import: SyntaxKind.ImportKeyword,
in: SyntaxKind.InKeyword,
Expand Down Expand Up @@ -352,7 +352,7 @@ const commentDirectiveRegExSingleLine = /^\/\/\/?\s*@(ts-expect-error|ts-ignore)
*/
const commentDirectiveRegExMultiLine = /^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/;

const jsDocSeeOrLinkOrDeferred = /@(?:see|link|deferred)/i;
const jsDocSeeOrLinkOrImmediate = /@(?:see|link|immediate)/i;

function lookupInUnicodeMap(code: number, map: readonly number[]): boolean {
// Bail out quickly if it couldn't possibly be in the map.
Expand Down Expand Up @@ -2397,7 +2397,7 @@ export function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean
return false;
}

return jsDocSeeOrLinkOrDeferred.test(text.slice(fullStartPos, pos));
return jsDocSeeOrLinkOrImmediate.test(text.slice(fullStartPos, pos));
}

function reScanInvalidIdentifier(): SyntaxKind {
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/transformers/ts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ export function transformTypeScript(context: TransformationContext) {
case SyntaxKind.OverrideKeyword:
case SyntaxKind.ConstKeyword:
case SyntaxKind.DeclareKeyword:
case SyntaxKind.DeferredKeyword:
case SyntaxKind.ImmediateKeyword:
case SyntaxKind.ReadonlyKeyword:
case SyntaxKind.InKeyword:
case SyntaxKind.OutKeyword:
Expand Down
32 changes: 16 additions & 16 deletions src/compiler/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ export const enum SyntaxKind {
BooleanKeyword,
ConstructorKeyword,
DeclareKeyword,
DeferredKeyword,
GetKeyword,
ImmediateKeyword,
InferKeyword,
IntrinsicKeyword,
IsKeyword,
Expand Down Expand Up @@ -420,7 +420,7 @@ export const enum SyntaxKind {
JSDocImplementsTag,
JSDocAuthorTag,
JSDocDeprecatedTag,
JSDocDeferredTag,
JSDocImmediateTag,
JSDocClassTag,
JSDocPublicTag,
JSDocPrivateTag,
Expand Down Expand Up @@ -599,7 +599,6 @@ export type KeywordSyntaxKind =
| SyntaxKind.DebuggerKeyword
| SyntaxKind.DeclareKeyword
| SyntaxKind.DefaultKeyword
| SyntaxKind.DeferredKeyword
| SyntaxKind.DeleteKeyword
| SyntaxKind.DoKeyword
| SyntaxKind.ElseKeyword
Expand All @@ -614,6 +613,7 @@ export type KeywordSyntaxKind =
| SyntaxKind.GetKeyword
| SyntaxKind.GlobalKeyword
| SyntaxKind.IfKeyword
| SyntaxKind.ImmediateKeyword
| SyntaxKind.ImplementsKeyword
| SyntaxKind.ImportKeyword
| SyntaxKind.InferKeyword
Expand Down Expand Up @@ -671,8 +671,8 @@ export type ModifierSyntaxKind =
| SyntaxKind.ConstKeyword
| SyntaxKind.DeclareKeyword
| SyntaxKind.DefaultKeyword
| SyntaxKind.DeferredKeyword
| SyntaxKind.ExportKeyword
| SyntaxKind.ImmediateKeyword
| SyntaxKind.InKeyword
| SyntaxKind.PrivateKeyword
| SyntaxKind.ProtectedKeyword
Expand Down Expand Up @@ -869,11 +869,11 @@ export const enum ModifierFlags {
In = 1 << 13, // Contravariance modifier
Out = 1 << 14, // Covariance modifier
Decorator = 1 << 15, // Contains a decorator.
Deferred = 1 << 16, // Parameter
Immediate = 1 << 16, // Parameter

// JSDoc-only modifiers
Deprecated = 1 << 17, // Deprecated tag.
JSDocDeferred = 1 << 18, // Parameter
JSDocImmediate = 1 << 18, // Parameter

// Cache-only JSDoc-modifiers. Should match order of Syntactic/JSDoc modifiers, above.
/** @internal */ JSDocPublic = 1 << 23, // if this value changes, `selectEffectiveModifierFlags` must change accordingly
Expand All @@ -883,10 +883,10 @@ export const enum ModifierFlags {
/** @internal */ JSDocOverride = 1 << 27,

/** @internal */ SyntacticOrJSDocModifiers = Public | Private | Protected | Readonly | Override,
/** @internal */ SyntacticOnlyModifiers = Export | Ambient | Abstract | Static | Accessor | Async | Default | Const | In | Out | Decorator | Deferred,
/** @internal */ SyntacticOnlyModifiers = Export | Ambient | Abstract | Static | Accessor | Async | Default | Const | In | Out | Decorator | Immediate,
/** @internal */ SyntacticModifiers = SyntacticOrJSDocModifiers | SyntacticOnlyModifiers,
/** @internal */ JSDocCacheOnlyModifiers = JSDocPublic | JSDocPrivate | JSDocProtected | JSDocReadonly | JSDocOverride,
/** @internal */ JSDocOnlyModifiers = Deprecated | JSDocDeferred,
/** @internal */ JSDocOnlyModifiers = Deprecated | JSDocImmediate,
/** @internal */ NonCacheOnlyModifiers = SyntacticOrJSDocModifiers | SyntacticOnlyModifiers | JSDocOnlyModifiers,

HasComputedJSDocModifiers = 1 << 28, // Indicates the computed modifier flags include modifiers from JSDoc.
Expand All @@ -897,9 +897,9 @@ export const enum ModifierFlags {
ParameterPropertyModifier = AccessibilityModifier | Readonly | Override,
NonPublicAccessibilityModifier = Private | Protected,

TypeScriptModifier = Ambient | Public | Private | Protected | Readonly | Abstract | Const | Override | In | Out | Deferred,
TypeScriptModifier = Ambient | Public | Private | Protected | Readonly | Abstract | Const | Override | In | Out | Immediate,
ExportDefault = Export | Default,
All = Export | Ambient | Public | Private | Protected | Static | Readonly | Abstract | Accessor | Async | Default | Const | Deprecated | Override | In | Out | Deferred | Decorator,
All = Export | Ambient | Public | Private | Protected | Static | Readonly | Abstract | Accessor | Async | Default | Const | Deprecated | Override | In | Out | Immediate | Decorator,
Modifier = All & ~Decorator,
}

Expand Down Expand Up @@ -1636,8 +1636,8 @@ export type AsyncKeyword = ModifierToken<SyntaxKind.AsyncKeyword>;
export type ConstKeyword = ModifierToken<SyntaxKind.ConstKeyword>;
export type DeclareKeyword = ModifierToken<SyntaxKind.DeclareKeyword>;
export type DefaultKeyword = ModifierToken<SyntaxKind.DefaultKeyword>;
export type DeferredKeyword = ModifierToken<SyntaxKind.DeferredKeyword>;
export type ExportKeyword = ModifierToken<SyntaxKind.ExportKeyword>;
export type ImmediateKeyword = ModifierToken<SyntaxKind.ImmediateKeyword>;
export type InKeyword = ModifierToken<SyntaxKind.InKeyword>;
export type PrivateKeyword = ModifierToken<SyntaxKind.PrivateKeyword>;
export type ProtectedKeyword = ModifierToken<SyntaxKind.ProtectedKeyword>;
Expand All @@ -1654,8 +1654,8 @@ export type Modifier =
| ConstKeyword
| DeclareKeyword
| DefaultKeyword
| DeferredKeyword
| ExportKeyword
| ImmediateKeyword
| InKeyword
| PrivateKeyword
| ProtectedKeyword
Expand Down Expand Up @@ -3994,8 +3994,8 @@ export interface JSDocDeprecatedTag extends JSDocTag {
kind: SyntaxKind.JSDocDeprecatedTag;
}

export interface JSDocDeferredTag extends JSDocTag {
kind: SyntaxKind.JSDocDeferredTag;
export interface JSDocImmediateTag extends JSDocTag {
kind: SyntaxKind.JSDocImmediateTag;
}

export interface JSDocClassTag extends JSDocTag {
Expand Down Expand Up @@ -9057,8 +9057,8 @@ export interface NodeFactory {
updateJSDocUnknownTag(node: JSDocUnknownTag, tagName: Identifier, comment: string | NodeArray<JSDocComment> | undefined): JSDocUnknownTag;
createJSDocDeprecatedTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocDeprecatedTag;
updateJSDocDeprecatedTag(node: JSDocDeprecatedTag, tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocDeprecatedTag;
createJSDocDeferredTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocDeferredTag;
updateJSDocDeferredTag(node: JSDocDeferredTag, tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocDeferredTag;
createJSDocImmediateTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocImmediateTag;
updateJSDocImmediateTag(node: JSDocImmediateTag, tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocImmediateTag;
createJSDocOverrideTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocOverrideTag;
updateJSDocOverrideTag(node: JSDocOverrideTag, tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocOverrideTag;
createJSDocThrowsTag(tagName: Identifier, typeExpression: JSDocTypeExpression | undefined, comment?: string | NodeArray<JSDocComment>): JSDocThrowsTag;
Expand Down
8 changes: 4 additions & 4 deletions src/compiler/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ import {
getDirectoryPath,
getImpliedNodeFormatForEmitWorker,
getJSDocAugmentsTag,
getJSDocDeferredTagNoCache,
getJSDocDeprecatedTagNoCache,
getJSDocImmediateTagNoCache,
getJSDocImplementsTags,
getJSDocOverrideTagNoCache,
getJSDocParameterTags,
Expand Down Expand Up @@ -7108,7 +7108,7 @@ function getRawJSDocModifierFlagsNoCache(node: Node): ModifierFlags {
}
}
if (!isParameter(node) && getJSDocDeprecatedTagNoCache(node)) flags |= ModifierFlags.Deprecated;
if (getJSDocDeferredTagNoCache(node)) flags |= ModifierFlags.JSDocDeferred;
if (getJSDocImmediateTagNoCache(node)) flags |= ModifierFlags.JSDocImmediate;
}

return flags;
Expand Down Expand Up @@ -7198,8 +7198,8 @@ export function modifierToFlag(token: SyntaxKind): ModifierFlags {
return ModifierFlags.In;
case SyntaxKind.OutKeyword:
return ModifierFlags.Out;
case SyntaxKind.DeferredKeyword:
return ModifierFlags.Deferred;
case SyntaxKind.ImmediateKeyword:
return ModifierFlags.Immediate;
case SyntaxKind.Decorator:
return ModifierFlags.Decorator;
}
Expand Down
Loading