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 | import { FactoryTarget, getCompilerFacade } from '../../compiler/compiler_facade';
|
---|
9 | import { setClassMetadata } from '../metadata';
|
---|
10 | import { angularCoreEnv } from './environment';
|
---|
11 | /**
|
---|
12 | * Compiles a partial directive declaration object into a full directive definition object.
|
---|
13 | *
|
---|
14 | * @codeGenApi
|
---|
15 | */
|
---|
16 | export function ɵɵngDeclareDirective(decl) {
|
---|
17 | const compiler = getCompilerFacade({ usage: 1 /* PartialDeclaration */, kind: 'directive', type: decl.type });
|
---|
18 | return compiler.compileDirectiveDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵfac.js`, decl);
|
---|
19 | }
|
---|
20 | /**
|
---|
21 | * Evaluates the class metadata declaration.
|
---|
22 | *
|
---|
23 | * @codeGenApi
|
---|
24 | */
|
---|
25 | export function ɵɵngDeclareClassMetadata(decl) {
|
---|
26 | var _a, _b;
|
---|
27 | setClassMetadata(decl.type, decl.decorators, (_a = decl.ctorParameters) !== null && _a !== void 0 ? _a : null, (_b = decl.propDecorators) !== null && _b !== void 0 ? _b : null);
|
---|
28 | }
|
---|
29 | /**
|
---|
30 | * Compiles a partial component declaration object into a full component definition object.
|
---|
31 | *
|
---|
32 | * @codeGenApi
|
---|
33 | */
|
---|
34 | export function ɵɵngDeclareComponent(decl) {
|
---|
35 | const compiler = getCompilerFacade({ usage: 1 /* PartialDeclaration */, kind: 'component', type: decl.type });
|
---|
36 | return compiler.compileComponentDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵcmp.js`, decl);
|
---|
37 | }
|
---|
38 | /**
|
---|
39 | * Compiles a partial pipe declaration object into a full pipe definition object.
|
---|
40 | *
|
---|
41 | * @codeGenApi
|
---|
42 | */
|
---|
43 | export function ɵɵngDeclareFactory(decl) {
|
---|
44 | const compiler = getCompilerFacade({
|
---|
45 | usage: 1 /* PartialDeclaration */,
|
---|
46 | kind: getFactoryKind(decl.target),
|
---|
47 | type: decl.type
|
---|
48 | });
|
---|
49 | return compiler.compileFactoryDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵfac.js`, decl);
|
---|
50 | }
|
---|
51 | function getFactoryKind(target) {
|
---|
52 | switch (target) {
|
---|
53 | case FactoryTarget.Directive:
|
---|
54 | return 'directive';
|
---|
55 | case FactoryTarget.Component:
|
---|
56 | return 'component';
|
---|
57 | case FactoryTarget.Injectable:
|
---|
58 | return 'injectable';
|
---|
59 | case FactoryTarget.Pipe:
|
---|
60 | return 'pipe';
|
---|
61 | case FactoryTarget.NgModule:
|
---|
62 | return 'NgModule';
|
---|
63 | }
|
---|
64 | }
|
---|
65 | /**
|
---|
66 | * Compiles a partial injectable declaration object into a full injectable definition object.
|
---|
67 | *
|
---|
68 | * @codeGenApi
|
---|
69 | */
|
---|
70 | export function ɵɵngDeclareInjectable(decl) {
|
---|
71 | const compiler = getCompilerFacade({ usage: 1 /* PartialDeclaration */, kind: 'injectable', type: decl.type });
|
---|
72 | return compiler.compileInjectableDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵprov.js`, decl);
|
---|
73 | }
|
---|
74 | /**
|
---|
75 | * These enums are used in the partial factory declaration calls.
|
---|
76 | */
|
---|
77 | export { FactoryTarget } from '../../compiler/compiler_facade';
|
---|
78 | /**
|
---|
79 | * Compiles a partial injector declaration object into a full injector definition object.
|
---|
80 | *
|
---|
81 | * @codeGenApi
|
---|
82 | */
|
---|
83 | export function ɵɵngDeclareInjector(decl) {
|
---|
84 | const compiler = getCompilerFacade({ usage: 1 /* PartialDeclaration */, kind: 'NgModule', type: decl.type });
|
---|
85 | return compiler.compileInjectorDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵinj.js`, decl);
|
---|
86 | }
|
---|
87 | /**
|
---|
88 | * Compiles a partial NgModule declaration object into a full NgModule definition object.
|
---|
89 | *
|
---|
90 | * @codeGenApi
|
---|
91 | */
|
---|
92 | export function ɵɵngDeclareNgModule(decl) {
|
---|
93 | const compiler = getCompilerFacade({ usage: 1 /* PartialDeclaration */, kind: 'NgModule', type: decl.type });
|
---|
94 | return compiler.compileNgModuleDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵmod.js`, decl);
|
---|
95 | }
|
---|
96 | /**
|
---|
97 | * Compiles a partial pipe declaration object into a full pipe definition object.
|
---|
98 | *
|
---|
99 | * @codeGenApi
|
---|
100 | */
|
---|
101 | export function ɵɵngDeclarePipe(decl) {
|
---|
102 | const compiler = getCompilerFacade({ usage: 1 /* PartialDeclaration */, kind: 'pipe', type: decl.type });
|
---|
103 | return compiler.compilePipeDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵpipe.js`, decl);
|
---|
104 | }
|
---|
105 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFydGlhbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2NvcmUvc3JjL3JlbmRlcjMvaml0L3BhcnRpYWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBRUgsT0FBTyxFQUFDLGFBQWEsRUFBRSxpQkFBaUIsRUFBaU0sTUFBTSxnQ0FBZ0MsQ0FBQztBQUVoUixPQUFPLEVBQUMsZ0JBQWdCLEVBQUMsTUFBTSxhQUFhLENBQUM7QUFDN0MsT0FBTyxFQUFDLGNBQWMsRUFBQyxNQUFNLGVBQWUsQ0FBQztBQUU3Qzs7OztHQUlHO0FBQ0gsTUFBTSxVQUFVLG9CQUFvQixDQUFDLElBQThCO0lBQ2pFLE1BQU0sUUFBUSxHQUFHLGlCQUFpQixDQUM5QixFQUFDLEtBQUssNEJBQXFDLEVBQUUsSUFBSSxFQUFFLFdBQVcs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