mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 12:19:15 +00:00
feat(ast): add TSType::TSIntrinsicKeyword to is_keyword (#3775)
follow up #3767
This commit is contained in:
parent
7c44703a4c
commit
4b06dc72ae
1 changed files with 6 additions and 15 deletions
|
|
@ -266,22 +266,13 @@ impl<'a> TSType<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
#[rustfmt::skip]
|
||||
pub fn is_keyword(&self) -> bool {
|
||||
matches!(
|
||||
self,
|
||||
TSType::TSAnyKeyword(_)
|
||||
| TSType::TSBigIntKeyword(_)
|
||||
| TSType::TSBooleanKeyword(_)
|
||||
| TSType::TSNeverKeyword(_)
|
||||
| TSType::TSNullKeyword(_)
|
||||
| TSType::TSNumberKeyword(_)
|
||||
| TSType::TSObjectKeyword(_)
|
||||
| TSType::TSStringKeyword(_)
|
||||
| TSType::TSSymbolKeyword(_)
|
||||
| TSType::TSThisType(_)
|
||||
| TSType::TSUndefinedKeyword(_)
|
||||
| TSType::TSUnknownKeyword(_)
|
||||
| TSType::TSVoidKeyword(_)
|
||||
matches!(self, TSType::TSAnyKeyword(_) | TSType::TSBigIntKeyword(_) | TSType::TSBooleanKeyword(_)
|
||||
| TSType::TSNeverKeyword(_) | TSType::TSNullKeyword(_) | TSType::TSNumberKeyword(_)
|
||||
| TSType::TSObjectKeyword(_) | TSType::TSStringKeyword(_)| TSType::TSVoidKeyword(_)
|
||||
| TSType::TSIntrinsicKeyword(_) | TSType::TSSymbolKeyword(_) | TSType::TSThisType(_)
|
||||
| TSType::TSUndefinedKeyword(_) | TSType::TSUnknownKeyword(_)
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue