Skip to content

Commit 8ece6b9

Browse files
committed
feat: add scope.markAsStale
1 parent 59aac66 commit 8ece6b9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/scope.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export interface Scope {
2222
declaresType(name: string): boolean
2323
declareTemporary(prefix?: string): namedTypes.Identifier;
2424
injectTemporary(identifier?: namedTypes.Identifier, init?: ExpressionKind | null): namedTypes.Identifier;
25+
markAsStale(): void;
2526
scan(force?: boolean): void;
2627
getBindings(): ScopeBinding;
2728
getTypes(): any;
@@ -168,6 +169,10 @@ export default function scopePlugin(fork: Fork) {
168169
return identifier;
169170
};
170171

172+
Sp.markAsStale = function () {
173+
this.didScan = false;
174+
}
175+
171176
Sp.scan = function(force) {
172177
if (force || !this.didScan) {
173178
for (var name in this.bindings) {

0 commit comments

Comments
 (0)