fix: resolve TS errors without deprecated tsconfig options

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Yang Jun
2026-06-07 01:35:03 +08:00
co-authored by Cursor
parent 9b0b9be849
commit dd6bb0fb60
19 changed files with 92 additions and 85 deletions
+3 -3
View File
@@ -1,10 +1,10 @@
import { Token } from './token'
import { TokenKind } from '../parser'
import { literalValues, LiteralValue } from '../util'
import { literalValues, LiteralValue, LiteralKey } from '../util'
export class LiteralToken extends Token {
public content: LiteralValue
public literal: string
public literal: LiteralKey
public constructor (
public input: string,
public begin: number,
@@ -12,7 +12,7 @@ export class LiteralToken extends Token {
public file?: string
) {
super(TokenKind.Literal, input, begin, end, file)
this.literal = this.getText()
this.literal = this.getText() as LiteralKey
this.content = literalValues[this.literal]
}
}