Skip to content

Commit 5969033

Browse files
committed
Target ES2015
1 parent 51dbd45 commit 5969033

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/index.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -179,22 +179,22 @@ function* lexer(str: string): Generator<LexToken, LexToken> {
179179
}
180180

181181
class Iter {
182-
#peek?: LexToken;
182+
private _peek?: LexToken;
183183

184184
constructor(private tokens: Generator<LexToken, LexToken>) {}
185185

186186
peek(): LexToken {
187-
if (!this.#peek) {
187+
if (!this._peek) {
188188
const next = this.tokens.next();
189-
this.#peek = next.value;
189+
this._peek = next.value;
190190
}
191-
return this.#peek;
191+
return this._peek;
192192
}
193193

194194
tryConsume(type: TokenType): string | undefined {
195195
const token = this.peek();
196196
if (token.type !== type) return;
197-
this.#peek = undefined; // Reset after consumed.
197+
this._peek = undefined; // Reset after consumed.
198198
return token.value;
199199
}
200200

tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"extends": "@borderless/ts-scripts/configs/tsconfig.json",
33
"compilerOptions": {
4-
"target": "ES2020",
5-
"lib": ["ES2020"],
4+
"target": "ES2015",
5+
"lib": ["ES2015"],
66
"rootDir": "src",
77
"outDir": "dist",
88
"module": "NodeNext",

0 commit comments

Comments
 (0)