Skip to content

Commit 41e37e7

Browse files
committed
add more control for other plugins
1 parent 2b10245 commit 41e37e7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/scope-locals.ts

+12
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ export class ScopeLocals {
1414
return this.#locals;
1515
}
1616

17+
get mapping() {
18+
return this.#mapping;
19+
}
20+
1721
has(key: string): boolean {
1822
return key in this.#mapping;
1923
}
@@ -40,4 +44,12 @@ export class ScopeLocals {
4044
this.#locals.push(key);
4145
}
4246
}
47+
48+
remove(key: string) {
49+
delete this.#mapping[key];
50+
const i = this.#locals.indexOf(key);
51+
if (i >= 0) {
52+
this.#locals.splice(i, 1);
53+
}
54+
}
4355
}

0 commit comments

Comments
 (0)