Skip to content

Commit

Permalink
refactor(jsonc): prepare for noUncheckedIndexedAccess (#4149)
Browse files Browse the repository at this point in the history
  • Loading branch information
syhol committed Jan 10, 2024
1 parent a4d02ab commit 7bc2930
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jsonc/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class JSONCParser {
*#tokenize(): Generator<Token, void> {
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;
}

Expand Down Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 7bc2930

Please sign in to comment.