static-injector 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/import/commonjs/index.js +6 -6
  2. package/import/es2015/di/r3_injector.js +6 -6
  3. package/import/fesm2015/index.js +6 -6
  4. package/import/typings/di/injectable.d.ts +1 -1
  5. package/import/typings/di/interface/provider.d.ts +2 -2
  6. package/import/typings/di/provider_collection.d.ts +1 -1
  7. package/import/typings/di/provider_token.d.ts +1 -1
  8. package/import/typings/di/r3_injector.d.ts +1 -1
  9. package/import/typings/di/scope.d.ts +1 -1
  10. package/import/typings/render3/definition_factory.d.ts +1 -1
  11. package/package.json +3 -3
  12. package/transform/compiler/compiler.d.ts +8 -0
  13. package/transform/compiler/compiler.js +28 -0
  14. package/transform/compiler/index.d.ts +8 -5
  15. package/transform/compiler/index.js +12 -5
  16. package/transform/compiler/public_api.d.ts +13 -0
  17. package/transform/compiler/public_api.js +30 -0
  18. package/transform/compiler/src/compiler.d.ts +27 -0
  19. package/transform/compiler/src/compiler.js +47 -0
  20. package/transform/compiler/src/output/output_ast.d.ts +1 -1
  21. package/transform/compiler/src/render3/partial/api.d.ts +1 -1
  22. package/transform/compiler/src/render3/partial/api.js +7 -0
  23. package/transform/compiler/src/render3/r3_factory.d.ts +8 -15
  24. package/transform/compiler/src/render3/r3_factory.js +37 -56
  25. package/transform/compiler/src/render3/view/util.d.ts +0 -8
  26. package/transform/compiler/src/render3/view/util.js +0 -8
  27. package/transform/compiler-cli/src/ngtsc/annotations/common/index.d.ts +10 -0
  28. package/transform/compiler-cli/src/ngtsc/annotations/common/index.js +26 -0
  29. package/transform/compiler-cli/src/ngtsc/annotations/common/src/di.d.ts +37 -0
  30. package/transform/compiler-cli/src/ngtsc/annotations/common/src/di.js +197 -0
  31. package/transform/compiler-cli/src/ngtsc/annotations/{src → common/src}/factory.d.ts +3 -3
  32. package/transform/compiler-cli/src/ngtsc/annotations/{src → common/src}/factory.js +2 -2
  33. package/transform/compiler-cli/src/ngtsc/annotations/common/src/util.d.ts +3 -34
  34. package/transform/compiler-cli/src/ngtsc/annotations/common/src/util.js +18 -216
  35. package/transform/compiler-cli/src/ngtsc/annotations/src/injectable.d.ts +3 -4
  36. package/transform/compiler-cli/src/ngtsc/annotations/src/injectable.js +31 -50
  37. package/transform/compiler-cli/src/ngtsc/diagnostics/index.d.ts +9 -2
  38. package/transform/compiler-cli/src/ngtsc/diagnostics/index.js +7 -0
  39. package/transform/compiler-cli/src/ngtsc/imports/index.d.ts +7 -0
  40. package/transform/compiler-cli/src/ngtsc/imports/index.js +7 -0
  41. package/transform/compiler-cli/src/ngtsc/imports/src/default.d.ts +19 -0
  42. package/transform/compiler-cli/src/ngtsc/imports/src/default.js +28 -0
  43. package/transform/compiler-cli/src/ngtsc/reflection/index.d.ts +10 -3
  44. package/transform/compiler-cli/src/ngtsc/reflection/index.js +7 -0
  45. package/transform/compiler-cli/src/ngtsc/reflection/src/host.d.ts +12 -13
  46. package/transform/compiler-cli/src/ngtsc/reflection/src/host.js +7 -28
  47. package/transform/compiler-cli/src/ngtsc/reflection/src/type_to_value.d.ts +1 -1
  48. package/transform/compiler-cli/src/ngtsc/reflection/src/type_to_value.js +17 -41
  49. package/transform/compiler-cli/src/ngtsc/reflection/src/typescript.d.ts +1 -1
  50. package/transform/compiler-cli/src/ngtsc/reflection/src/typescript.js +46 -65
  51. package/transform/compiler-cli/src/ngtsc/reflection/src/util.d.ts +2 -2
  52. package/transform/compiler-cli/src/ngtsc/reflection/src/util.js +7 -27
  53. package/transform/compiler-cli/src/ngtsc/transform/index.d.ts +9 -2
  54. package/transform/compiler-cli/src/ngtsc/transform/index.js +7 -0
  55. package/transform/compiler-cli/src/ngtsc/transform/src/api.d.ts +4 -4
  56. package/transform/compiler-cli/src/ngtsc/transform/src/utils.d.ts +1 -1
  57. package/transform/compiler-cli/src/ngtsc/transform/src/utils.js +15 -35
  58. package/transform/compiler-cli/src/ngtsc/translator/index.d.ts +12 -5
  59. package/transform/compiler-cli/src/ngtsc/translator/index.js +7 -0
  60. package/transform/compiler-cli/src/ngtsc/translator/src/api/ast_factory.d.ts +5 -5
  61. package/transform/compiler-cli/src/ngtsc/translator/src/import_manager.d.ts +2 -2
  62. package/transform/compiler-cli/src/ngtsc/translator/src/import_manager.js +4 -24
  63. package/transform/compiler-cli/src/ngtsc/translator/src/translator.d.ts +2 -2
  64. package/transform/compiler-cli/src/ngtsc/translator/src/translator.js +1 -1
  65. package/transform/compiler-cli/src/ngtsc/translator/src/typescript_ast_factory.d.ts +1 -1
  66. package/transform/compiler-cli/src/ngtsc/translator/src/typescript_ast_factory.js +76 -95
  67. package/transform/compiler-cli/src/ngtsc/translator/src/typescript_translator.d.ts +4 -4
  68. package/transform/compiler-cli/src/ngtsc/ts_compatibility/src/ts_cross_version_utils.d.ts +20 -126
  69. package/transform/compiler-cli/src/ngtsc/ts_compatibility/src/ts_cross_version_utils.js +23 -147
  70. package/transform/compiler-cli/src/ngtsc/util/src/typescript.d.ts +1 -8
  71. package/transform/compiler-cli/src/ngtsc/util/src/typescript.js +4 -31
  72. package/transform/injectable-transform.js +36 -7
@@ -6,44 +6,24 @@
6
6
  * Use of this source code is governed by an MIT-style license that can be
7
7
  * found in the LICENSE file at https://angular.io/license
8
8
  */
9
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- var desc = Object.getOwnPropertyDescriptor(m, k);
12
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
- desc = { enumerable: true, get: function() { return m[k]; } };
14
- }
15
- Object.defineProperty(o, k2, desc);
16
- }) : (function(o, m, k, k2) {
17
- if (k2 === undefined) k2 = k;
18
- o[k2] = m[k];
19
- }));
20
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
21
- Object.defineProperty(o, "default", { enumerable: true, value: v });
22
- }) : function(o, v) {
23
- o["default"] = v;
24
- });
25
- var __importStar = (this && this.__importStar) || function (mod) {
26
- if (mod && mod.__esModule) return mod;
27
- var result = {};
28
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
29
- __setModuleDefault(result, mod);
30
- return result;
9
+ var __importDefault = (this && this.__importDefault) || function (mod) {
10
+ return (mod && mod.__esModule) ? mod : { "default": mod };
31
11
  };
32
12
  Object.defineProperty(exports, "__esModule", { value: true });
33
13
  exports.isNamedVariableDeclaration = exports.isNamedFunctionDeclaration = exports.isNamedClassDeclaration = void 0;
34
- const ts = __importStar(require("typescript"));
14
+ const typescript_1 = __importDefault(require("typescript"));
35
15
  function isNamedClassDeclaration(node) {
36
- return ts.isClassDeclaration(node) && isIdentifier(node.name);
16
+ return typescript_1.default.isClassDeclaration(node) && isIdentifier(node.name);
37
17
  }
38
18
  exports.isNamedClassDeclaration = isNamedClassDeclaration;
39
19
  function isNamedFunctionDeclaration(node) {
40
- return ts.isFunctionDeclaration(node) && isIdentifier(node.name);
20
+ return typescript_1.default.isFunctionDeclaration(node) && isIdentifier(node.name);
41
21
  }
42
22
  exports.isNamedFunctionDeclaration = isNamedFunctionDeclaration;
43
23
  function isNamedVariableDeclaration(node) {
44
- return ts.isVariableDeclaration(node) && isIdentifier(node.name);
24
+ return typescript_1.default.isVariableDeclaration(node) && isIdentifier(node.name);
45
25
  }
46
26
  exports.isNamedVariableDeclaration = isNamedVariableDeclaration;
47
27
  function isIdentifier(node) {
48
- return node !== undefined && ts.isIdentifier(node);
28
+ return node !== undefined && typescript_1.default.isIdentifier(node);
49
29
  }
@@ -1,2 +1,9 @@
1
- export * from "./src/api";
2
- export * from "./src/utils";
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+ export * from './src/api';
9
+ export * from './src/utils';
@@ -1,4 +1,11 @@
1
1
  "use strict";
2
+ /**
3
+ * @license
4
+ * Copyright Google LLC All Rights Reserved.
5
+ *
6
+ * Use of this source code is governed by an MIT-style license that can be
7
+ * found in the LICENSE file at https://angular.io/license
8
+ */
2
9
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
10
  if (k2 === undefined) k2 = k;
4
11
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -5,9 +5,9 @@
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
- import { Expression, Statement, Type } from "../../../../../compiler";
9
- import * as ts from "typescript";
10
- import { ClassDeclaration, Decorator } from "../../reflection";
8
+ import { Expression, Statement, Type } from 'static-injector/transform/compiler';
9
+ import ts from 'typescript';
10
+ import { ClassDeclaration, Decorator } from '../../reflection';
11
11
  /**
12
12
  * A set of options which can be passed to a `DecoratorHandler` by a consumer, to tailor the output
13
13
  * of compilation beyond the decorators themselves.
@@ -39,7 +39,7 @@ export declare enum HandlerFlags {
39
39
  * @param `A` The type of analysis metadata produced by `analyze`.
40
40
  * @param `R` The type of resolution metadata produced by `resolve`.
41
41
  */
42
- export interface DecoratorHandler<D, A, S extends null, R> {
42
+ export interface DecoratorHandler<D, A, R> {
43
43
  /**
44
44
  * Scan a set of reflected decorators and determine if this handler is responsible for compilation
45
45
  * of one of them.
@@ -5,7 +5,7 @@
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
- import * as ts from 'typescript';
8
+ import ts from 'typescript';
9
9
  import { ImportManager } from '../../translator';
10
10
  /**
11
11
  * Adds extra imports in the import manage for this source file, after the existing imports
@@ -1,26 +1,6 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
24
4
  };
25
5
  Object.defineProperty(exports, "__esModule", { value: true });
26
6
  exports.addImports = void 0;
@@ -31,7 +11,8 @@ exports.addImports = void 0;
31
11
  * Use of this source code is governed by an MIT-style license that can be
32
12
  * found in the LICENSE file at https://angular.io/license
33
13
  */
34
- const ts = __importStar(require("typescript"));
14
+ const typescript_1 = __importDefault(require("typescript"));
15
+ const ts_compatibility_1 = require("../../ts_compatibility");
35
16
  /**
36
17
  * Adds extra imports in the import manage for this source file, after the existing imports
37
18
  * and before the module body.
@@ -40,16 +21,15 @@ const ts = __importStar(require("typescript"));
40
21
  function addImports(importManager, sf, extraStatements = []) {
41
22
  // Generate the import statements to prepend.
42
23
  const addedImports = importManager.getAllImports(sf.fileName).map((i) => {
43
- const qualifier = ts.factory.createIdentifier(i.qualifier.text);
44
- const importClause = ts.factory.createImportClause(
24
+ const qualifier = typescript_1.default.factory.createIdentifier(i.qualifier.text);
25
+ const importClause = typescript_1.default.factory.createImportClause(
45
26
  /* isTypeOnly */ false,
46
27
  /* name */ undefined,
47
- /* namedBindings */ ts.factory.createNamespaceImport(qualifier));
48
- const decl = ts.factory.createImportDeclaration(
49
- /* decorators */ undefined,
28
+ /* namedBindings */ typescript_1.default.factory.createNamespaceImport(qualifier));
29
+ const decl = (0, ts_compatibility_1.createImportDeclaration)(
50
30
  /* modifiers */ undefined,
51
31
  /* importClause */ importClause,
52
- /* moduleSpecifier */ ts.factory.createStringLiteral(i.specifier));
32
+ /* moduleSpecifier */ typescript_1.default.factory.createStringLiteral(i.specifier));
53
33
  // Set the qualifier's original TS node to the `ts.ImportDeclaration`. This allows downstream
54
34
  // transforms such as tsickle to properly process references to this import.
55
35
  //
@@ -58,7 +38,7 @@ function addImports(importManager, sf, extraStatements = []) {
58
38
  //
59
39
  // TODO(alxhub): add a test for this when tsickle is updated externally to depend on this
60
40
  // behavior.
61
- ts.setOriginalNode(i.qualifier, decl);
41
+ typescript_1.default.setOriginalNode(i.qualifier, decl);
62
42
  return decl;
63
43
  });
64
44
  // Filter out the existing imports and the source file body. All new statements
@@ -70,8 +50,8 @@ function addImports(importManager, sf, extraStatements = []) {
70
50
  // If we prepend imports, we also prepend NotEmittedStatement to use it as an anchor
71
51
  // for @fileoverview Closure annotation. If there is no @fileoverview annotations, this
72
52
  // statement would be a noop.
73
- const fileoverviewAnchorStmt = ts.factory.createNotEmittedStatement(sf);
74
- return ts.factory.updateSourceFile(sf, ts.factory.createNodeArray([
53
+ const fileoverviewAnchorStmt = typescript_1.default.factory.createNotEmittedStatement(sf);
54
+ return typescript_1.default.factory.updateSourceFile(sf, typescript_1.default.factory.createNodeArray([
75
55
  fileoverviewAnchorStmt,
76
56
  ...existingImports,
77
57
  ...addedImports,
@@ -83,7 +63,7 @@ function addImports(importManager, sf, extraStatements = []) {
83
63
  }
84
64
  exports.addImports = addImports;
85
65
  function isImportStatement(stmt) {
86
- return (ts.isImportDeclaration(stmt) ||
87
- ts.isImportEqualsDeclaration(stmt) ||
88
- ts.isNamespaceImport(stmt));
66
+ return (typescript_1.default.isImportDeclaration(stmt) ||
67
+ typescript_1.default.isImportEqualsDeclaration(stmt) ||
68
+ typescript_1.default.isNamespaceImport(stmt));
89
69
  }
@@ -1,5 +1,12 @@
1
- export * from "./src/context";
2
- export * from "./src/translator";
3
- export * from "./src/typescript_ast_factory";
4
- export * from "./src/typescript_translator";
5
- export * from "./src/import_manager";
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+ export * from './src/context';
9
+ export * from './src/translator';
10
+ export * from './src/typescript_ast_factory';
11
+ export * from './src/typescript_translator';
12
+ export * from './src/import_manager';
@@ -1,4 +1,11 @@
1
1
  "use strict";
2
+ /**
3
+ * @license
4
+ * Copyright Google LLC All Rights Reserved.
5
+ *
6
+ * Use of this source code is governed by an MIT-style license that can be
7
+ * found in the LICENSE file at https://angular.io/license
8
+ */
2
9
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
10
  if (k2 === undefined) k2 = k;
4
11
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -21,7 +21,7 @@ export interface AstFactory<TStatement, TExpression> {
21
21
  */
22
22
  attachComments(statement: TStatement, leadingComments: LeadingComment[]): void;
23
23
  /**
24
- * Create a literal array expresion (e.g. `[expr1, expr2]`).
24
+ * Create a literal array expression (e.g. `[expr1, expr2]`).
25
25
  *
26
26
  * @param elements a collection of the expressions to appear in each array slot.
27
27
  */
@@ -51,7 +51,7 @@ export interface AstFactory<TStatement, TExpression> {
51
51
  * Create an expression that is calling the `callee` with the given `args`.
52
52
  *
53
53
  * @param callee an expression that evaluates to a function to be called.
54
- * @param args the arugments to be passed to the call.
54
+ * @param args the arguments to be passed to the call.
55
55
  * @param pure whether to mark the call as pure (having no side-effects).
56
56
  */
57
57
  createCallExpression(callee: TExpression, args: TExpression[], pure: boolean): TExpression;
@@ -198,15 +198,15 @@ export interface AstFactory<TStatement, TExpression> {
198
198
  /**
199
199
  * The type of a variable declaration.
200
200
  */
201
- export declare type VariableDeclarationType = "const" | "let" | "var";
201
+ export type VariableDeclarationType = 'const' | 'let' | 'var';
202
202
  /**
203
203
  * The unary operators supported by the `AstFactory`.
204
204
  */
205
- export declare type UnaryOperator = "+" | "-" | "!";
205
+ export type UnaryOperator = '+' | '-' | '!';
206
206
  /**
207
207
  * The binary operators supported by the `AstFactory`.
208
208
  */
209
- export declare type BinaryOperator = "&&" | ">" | ">=" | "&" | "/" | "==" | "===" | "<" | "<=" | "-" | "%" | "*" | "!=" | "!==" | "||" | "+" | "??";
209
+ export type BinaryOperator = '&&' | '>' | '>=' | '&' | '/' | '==' | '===' | '<' | '<=' | '-' | '%' | '*' | '!=' | '!==' | '||' | '+' | '??';
210
210
  /**
211
211
  * The original location of the start or end of a node created by the `AstFactory`.
212
212
  */
@@ -5,7 +5,7 @@
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
- import * as ts from 'typescript';
8
+ import ts from 'typescript';
9
9
  import { ImportRewriter } from '../../imports';
10
10
  import { ImportGenerator, NamedImport } from './api/import_generator';
11
11
  /**
@@ -14,7 +14,7 @@ import { ImportGenerator, NamedImport } from './api/import_generator';
14
14
  export interface Import {
15
15
  /** The name of the module that has been imported. */
16
16
  specifier: string;
17
- /** The `ts.Identifer` by which the imported module is known. */
17
+ /** The `ts.Identifier` by which the imported module is known. */
18
18
  qualifier: ts.Identifier;
19
19
  }
20
20
  export declare class ImportManager implements ImportGenerator<ts.Identifier> {
@@ -1,26 +1,6 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
24
4
  };
25
5
  Object.defineProperty(exports, "__esModule", { value: true });
26
6
  exports.ImportManager = void 0;
@@ -31,7 +11,7 @@ exports.ImportManager = void 0;
31
11
  * Use of this source code is governed by an MIT-style license that can be
32
12
  * found in the LICENSE file at https://angular.io/license
33
13
  */
34
- const ts = __importStar(require("typescript"));
14
+ const typescript_1 = __importDefault(require("typescript"));
35
15
  const imports_1 = require("../../imports");
36
16
  class ImportManager {
37
17
  constructor(rewriter = new imports_1.NoopImportRewriter(), prefix = 'i') {
@@ -42,7 +22,7 @@ class ImportManager {
42
22
  }
43
23
  generateNamespaceImport(moduleName) {
44
24
  if (!this.specifierToIdentifier.has(moduleName)) {
45
- this.specifierToIdentifier.set(moduleName, ts.factory.createIdentifier(`${this.prefix}${this.nextIndex++}`));
25
+ this.specifierToIdentifier.set(moduleName, typescript_1.default.factory.createIdentifier(`${this.prefix}${this.nextIndex++}`));
46
26
  }
47
27
  return this.specifierToIdentifier.get(moduleName);
48
28
  }
@@ -5,11 +5,11 @@
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
- import * as o from '../../../../../compiler';
8
+ import * as o from 'static-injector/transform/compiler';
9
9
  import { AstFactory } from './api/ast_factory';
10
10
  import { ImportGenerator } from './api/import_generator';
11
11
  import { Context } from './context';
12
- export declare type RecordWrappedNodeFn<TExpression> = (node: o.WrappedNodeExpr<TExpression>) => void;
12
+ export type RecordWrappedNodeFn<TExpression> = (node: o.WrappedNodeExpr<TExpression>) => void;
13
13
  export interface TranslatorOptions<TExpression> {
14
14
  downlevelTaggedTemplates?: boolean;
15
15
  downlevelVariableDeclarations?: boolean;
@@ -31,7 +31,7 @@ exports.ExpressionTranslatorVisitor = void 0;
31
31
  * Use of this source code is governed by an MIT-style license that can be
32
32
  * found in the LICENSE file at https://angular.io/license
33
33
  */
34
- const o = __importStar(require("../../../../../compiler"));
34
+ const o = __importStar(require("static-injector/transform/compiler"));
35
35
  const UNARY_OPERATORS = new Map([
36
36
  [o.UnaryOperator.Minus, '-'],
37
37
  [o.UnaryOperator.Plus, '+'],
@@ -5,7 +5,7 @@
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
- import * as ts from 'typescript';
8
+ import ts from 'typescript';
9
9
  import { AstFactory, BinaryOperator, LeadingComment, ObjectLiteralProperty, SourceMapRange, TemplateLiteral, UnaryOperator, VariableDeclarationType } from './api/ast_factory';
10
10
  /**
11
11
  * A TypeScript flavoured implementation of the AstFactory.