forked from rollup/rollup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMethodDefinition.ts
21 lines (20 loc) · 918 Bytes
/
MethodDefinition.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import type { HasEffectsContext } from '../ExecutionContext';
import { checkEffectForNodes } from '../utils/checkEffectForNodes';
import type Decorator from './Decorator';
import type FunctionExpression from './FunctionExpression';
import type * as NodeType from './NodeType';
import type PrivateIdentifier from './PrivateIdentifier';
import MethodBase from './shared/MethodBase';
import type { ExpressionNode } from './shared/Node';
export default class MethodDefinition extends MethodBase {
declare key: ExpressionNode | PrivateIdentifier;
declare kind: 'constructor' | 'method' | 'get' | 'set';
declare static: boolean;
declare type: NodeType.tMethodDefinition;
declare value: FunctionExpression;
declare decorators: Decorator[];
hasEffects(context: HasEffectsContext): boolean {
return super.hasEffects(context) || checkEffectForNodes(this.decorators, context);
}
protected applyDeoptimizations() {}
}