-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
--noImplicitOverride #39669
--noImplicitOverride #39669
Changes from 46 commits
8b90b8d
ea5608a
9371d87
6cb7f5e
061cd27
37ada55
6401e1a
be00363
fbb6e28
6014a3a
a65df91
43d9f70
e73c941
c0edf6f
dca93ac
2fd560a
94187c7
2b57fbd
3a2286b
d34afb9
b4614d1
1ef034d
aebfb28
7753983
5c04ccc
add16c9
5316e2f
f36fede
811bd1e
d0f5095
dd51815
22bb09d
eee3b77
f94e93c
74f14c3
e35ee17
d8fda5f
18434fd
5ab5a7f
f52822a
48c23a5
a3f0443
cdd0739
8e53ad3
827bc95
618f883
bc4d758
47296d6
5d19a90
68e1440
82109e9
2552495
cf5dc7e
b65d244
84cc69d
6d89a7a
062f149
feb9093
0c09a2e
3cf3c28
d874ae8
e361ddc
40da344
f9384bc
eea8259
ff3cbc1
a3766d2
e2c245e
8f3dcb9
1db64fb
71c00d5
e3c0993
89517a0
6c8d00d
bbfb7eb
4575b5a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4573,6 +4573,18 @@ namespace ts { | |
return hasSyntacticModifier(node, ModifierFlags.Static); | ||
} | ||
|
||
export function hasOverrideModifier(node: Node): boolean { | ||
return hasSyntacticModifier(node, ModifierFlags.Override); | ||
} | ||
|
||
export function hasAbstractModifier(node: Node): boolean { | ||
return hasSyntacticModifier(node, ModifierFlags.Abstract); | ||
} | ||
|
||
export function hasAmbientModifier(node: Node): boolean { | ||
return hasSyntacticModifier(node, ModifierFlags.Ambient); | ||
} | ||
Comment on lines
+4662
to
+4668
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm finding the need for these somewhat surprising. How were we checking for ambient-ness and abtract-ness before? Are there cheaper ways? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure. Does it expensive? Even I found cache inside There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't see where this was used, so I don’t know for sure that this is what you’re looking for, but you can use |
||
|
||
export function hasEffectiveReadonlyModifier(node: Node): boolean { | ||
return hasEffectiveModifier(node, ModifierFlags.Readonly); | ||
} | ||
|
@@ -4683,10 +4695,15 @@ namespace ts { | |
case SyntaxKind.DefaultKeyword: return ModifierFlags.Default; | ||
case SyntaxKind.AsyncKeyword: return ModifierFlags.Async; | ||
case SyntaxKind.ReadonlyKeyword: return ModifierFlags.Readonly; | ||
case SyntaxKind.OverrideKeyword: return ModifierFlags.Override; | ||
} | ||
return ModifierFlags.None; | ||
} | ||
|
||
export function createModifiers(modifierFlags: ModifierFlags): ModifiersArray | undefined { | ||
return modifierFlags ? factory.createNodeArray(factory.createModifiersFromModifierFlags(modifierFlags)) : undefined; | ||
} | ||
|
||
export function isLogicalOperator(token: SyntaxKind): boolean { | ||
return token === SyntaxKind.BarBarToken | ||
|| token === SyntaxKind.AmpersandAmpersandToken | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.