angular/packages/core/src/linker
Alan Agius c80278ac4a fix(core): emit pure annotations to static property initializers (#43344)
Currently the pure annotations comments are not emitted because unless the entire expression is wrapped in braces.

See the below TypeScript playgrounds

https://www.typescriptlang.org/play?target=99&module=1&ts=4.4.2&ssl=8&ssc=1&pln=1&pc=1#code/MYGwhgzhAEByCuIQEkB2ArApsALgewCdoBvAXwFgAoKzADwAdCdowAjCHAsXaUSGNFlyESVaNA5gcAS2BwAqgBlF0ALzQA9ACpoAAQD6+gAryASgFFD0LRuipMAdziIUGbPgIAKAJQBuKhTUlMB4qBB4IJgAdCB4AOaegu6EUbBKin5UQA
```js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Injector = void 0;
class NullInjector {
}
class Injector {
}
exports.Injector = Injector;
Injector.NULL = new NullInjector();
console.log(Injector.NULL);

```

https://www.typescriptlang.org/play?target=99&module=1&ts=4.4.2&ssl=4&ssc=18&pln=4&pc=33#code/MYGwhgzhAEByCuIQEkB2ArApsALgewCdoBvAXwFgAoKzADwAdCdowAjCHAsXaUSGNFlyESVaNA5gcAS2BwAqgBlF0ALzQAFAHoAVNAACAfUMAFeQCUAoseg6t0VJgDucRCgzZ8BDQEofAbioKakpgPFQIPBBMADoQPABzDUFPQhjYJUUAqiA

```js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Injector = void 0;
class NullInjector {
}
class Injector {
}a
exports.Injector = Injector;
Injector.NULL = ( /* @__PURE__ */new NullInjector());
console.log(Injector.NULL);
```

PR Close #43344
2021-09-09 09:21:24 -07:00
..
compiler.ts docs: fix typo (#40566) 2021-01-25 14:55:56 -08:00
component_factory.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
component_factory_resolver.ts fix(core): emit pure annotations to static property initializers (#43344) 2021-09-09 09:21:24 -07:00
element_ref.ts ci: add lint error for files with missing trailing new-line (#42478) 2021-06-04 13:31:03 -07:00
ng_module_factory.ts docs: clean up api doc in core (#37053) 2020-06-30 12:11:15 -07:00
ng_module_factory_loader.ts refactor(core): Remove circular dependency on render3 and ng_module (#39621) 2020-11-16 09:12:46 -08:00
ng_module_factory_registration.ts refactor(core): Remove circular dependency on render3 and ng_module (#39621) 2020-11-16 09:12:46 -08:00
query_list.ts ci: add lint error for files with missing trailing new-line (#42478) 2021-06-04 13:31:03 -07:00
system_js_ng_module_factory_loader.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
template_ref.ts refactor: add override keyword to members implementing abstract declarations (#42512) 2021-07-12 13:11:17 -07:00
view_container_ref.ts refactor: add override keyword to members implementing abstract declarations (#42512) 2021-07-12 13:11:17 -07:00
view_ref.ts fix(core): allow EmbeddedViewRef context to be updated (#40360) 2021-02-23 08:14:01 -08:00