diff --git a/jsonc/parse.ts b/jsonc/parse.ts index 8ee6872ce98a..b5001c5364f0 100644 --- a/jsonc/parse.ts +++ b/jsonc/parse.ts @@ -118,7 +118,7 @@ class JSONCParser { *#tokenize(): Generator { for (let i = 0; i < this.#length; i++) { // skip whitespace - if (this.#whitespace.has(this.#text[i])) { + if (this.#whitespace.has(this.#text[i]!)) { continue; } @@ -194,7 +194,7 @@ class JSONCParser { default: { // parse null, true, false or number token const startIndex = i; for (; i < this.#length; i++) { // read until find numberEndToken - if (this.#numberEndToken.has(this.#text[i])) { + if (this.#numberEndToken.has(this.#text[i]!)) { break; } }