mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor(core): tree-shake NOT_SET and EMPTY_CLEANUP_SET (#60979)
Adds `__PURE__` annotations to `NOT_SET` and `EMPTY_CLEANUP_SET` to enable tree-shaking, even if they are not referenced. These variables are not dropped when Angular is imported from a module that has `sideEffects` set to `true`. PR Close #60979
This commit is contained in:
@@ -40,8 +40,8 @@ import {LView} from '../interfaces/view';
|
||||
import {ViewContext} from '../view_context';
|
||||
import {assertNotInReactiveContext} from './asserts';
|
||||
|
||||
const NOT_SET = Symbol('NOT_SET');
|
||||
const EMPTY_CLEANUP_SET = new Set<() => void>();
|
||||
const NOT_SET = /* @__PURE__ */ Symbol('NOT_SET');
|
||||
const EMPTY_CLEANUP_SET = /* @__PURE__ */ new Set<() => void>();
|
||||
|
||||
/** Callback type for an `afterRenderEffect` phase effect */
|
||||
type AfterRenderPhaseEffectHook = (
|
||||
|
||||
Reference in New Issue
Block a user