MCPcopy Create free account
hub / github.com/rollup/plugins / constructor

Method constructor

packages/pluginutils/src/attachScopes.ts:29–42  ·  view source on GitHub ↗
(options: ScopeOptions = {})

Source from the content-addressed store, hash-verified

27 declarations: { [key: string]: boolean };
28
29 constructor(options: ScopeOptions = {}) {
30 this.parent = options.parent;
31 this.isBlockScope = !!options.block;
32
33 this.declarations = Object.create(null);
34
35 if (options.params) {
36 options.params.forEach((param) => {
37 extractAssignedNames(param).forEach((name) => {
38 this.declarations[name] = true;
39 });
40 });
41 }
42 }
43
44 addDeclaration(node: estree.Node, isBlockDeclaration: boolean, isVar: boolean): void {
45 if (!isBlockDeclaration && this.isBlockScope) {

Callers

nothing calls this directly

Calls 1

extractAssignedNamesFunction · 0.85

Tested by

no test coverage detected