mirror of
https://github.com/swc-project/swc.git
synced 2024-11-23 17:54:15 +03:00
fix(es/lexer): Fix typo in package
keyword (#8589)
**Description:** There is a typo in the ES lexer for the keyword `package`. **Related issue:** - Closes #8588
This commit is contained in:
parent
386c391081
commit
8413a6c48e
@ -198,7 +198,7 @@ const L_O: ByteHandler = Some(|lexer| {
|
||||
const L_P: ByteHandler = Some(|lexer| {
|
||||
lexer.read_word_with(|s| match s {
|
||||
"public" => Some(Word::Ident(IdentLike::Known(KnownIdent::Public))),
|
||||
"pacakge" => Some(Word::Ident(IdentLike::Known(KnownIdent::Package))),
|
||||
"package" => Some(Word::Ident(IdentLike::Known(KnownIdent::Package))),
|
||||
"protected" => Some(Word::Ident(IdentLike::Known(KnownIdent::Protected))),
|
||||
"private" => Some(Word::Ident(IdentLike::Known(KnownIdent::Private))),
|
||||
_ => None,
|
||||
|
@ -0,0 +1 @@
|
||||
const package = 1;
|
@ -0,0 +1,6 @@
|
||||
|
||||
x `package` cannot be used as an identifier in strict mode
|
||||
,-[$DIR/tests/typescript-errors/issue-8588/input.ts:1:1]
|
||||
1 | const package = 1;
|
||||
: ^^^^^^^
|
||||
`----
|
Loading…
Reference in New Issue
Block a user