* Creates an instance of TopLevelSymbol. * @param {string} name name of the variable * @param {PureCondition=} pure pure condition
(name, pure = false)
| 43 | * @param {PureCondition=} pure pure condition |
| 44 | */ |
| 45 | constructor(name, pure = false) { |
| 46 | /** @type {string} */ |
| 47 | this.name = name; |
| 48 | |
| 49 | /** @type {boolean} */ |
| 50 | this.conditional = false; |
| 51 | /** @type {boolean} */ |
| 52 | this._pure = false; |
| 53 | /** @type {((compilation: Compilation, module: Module) => boolean) | undefined} */ |
| 54 | this.pureFn = undefined; |
| 55 | |
| 56 | this.setPure(pure); |
| 57 | } |
| 58 | |
| 59 | /** |
| 60 | * Sets the pure condition |