forked from rollup/rollup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSuper.ts
33 lines (28 loc) · 897 Bytes
/
Super.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import type { NodeInteraction } from '../NodeInteractions';
import type { ObjectPath, PathTracker } from '../utils/PathTracker';
import type Variable from '../variables/Variable';
import type * as NodeType from './NodeType';
import { NodeBase } from './shared/Node';
export default class Super extends NodeBase {
declare type: NodeType.tSuper;
declare variable: Variable;
bind(): void {
this.variable = this.scope.findVariable('this');
}
deoptimizeArgumentsOnInteractionAtPath(
interaction: NodeInteraction,
path: ObjectPath,
recursionTracker: PathTracker
) {
this.variable.deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker);
}
deoptimizePath(path: ObjectPath): void {
this.variable.deoptimizePath(path);
}
include(): void {
if (!this.included) {
this.included = true;
this.scope.context.includeVariableInModule(this.variable);
}
}
}