source: trip-planner-front/node_modules/@angular/compiler/esm2015/src/render3/r3_jit.js

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 5.9 KB
Line 
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/**
9 * Implementation of `CompileReflector` which resolves references to @angular/core
10 * symbols at runtime, according to a consumer-provided mapping.
11 *
12 * Only supports `resolveExternalReference`, all other methods throw.
13 */
14export class R3JitReflector {
15 constructor(context) {
16 this.context = context;
17 }
18 resolveExternalReference(ref) {
19 // This reflector only handles @angular/core imports.
20 if (ref.moduleName !== '@angular/core') {
21 throw new Error(`Cannot resolve external reference to ${ref.moduleName}, only references to @angular/core are supported.`);
22 }
23 if (!this.context.hasOwnProperty(ref.name)) {
24 throw new Error(`No value provided for @angular/core symbol '${ref.name}'.`);
25 }
26 return this.context[ref.name];
27 }
28 parameters(typeOrFunc) {
29 throw new Error('Not implemented.');
30 }
31 annotations(typeOrFunc) {
32 throw new Error('Not implemented.');
33 }
34 shallowAnnotations(typeOrFunc) {
35 throw new Error('Not implemented.');
36 }
37 tryAnnotations(typeOrFunc) {
38 throw new Error('Not implemented.');
39 }
40 propMetadata(typeOrFunc) {
41 throw new Error('Not implemented.');
42 }
43 hasLifecycleHook(type, lcProperty) {
44 throw new Error('Not implemented.');
45 }
46 guards(typeOrFunc) {
47 throw new Error('Not implemented.');
48 }
49 componentModuleUrl(type, cmpMetadata) {
50 throw new Error('Not implemented.');
51 }
52}
53//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicjNfaml0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvY29tcGlsZXIvc3JjL3JlbmRlcjMvcjNfaml0LnRzIl0sIm5hbWVzIjpbXSwibWFwcG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SB7XG4gICAgdGhyb3cgbmV3IEVycm9yKCdOb3QgaW1wbGVtZW50ZWQuJyk7XG4gIH1cblxuICBzaGFsbG93QW5ub3RhdGlvbnModHlwZU9yRnVuYzogYW55KTogYW55W10ge1xuICAgIHRocm93IG5ldyBFcnJvcignTm90IGltcGxlbWVudGVkLicpO1xuICB9XG5cbiAgdHJ5QW5ub3RhdGlvbnModHlwZU9yRnVuYzogYW55KTogYW55W10ge1xuICAgIHRocm93IG5ldyBFcnJvcignTm90IGltcGxlbWVudGVkLicpO1xuICB9XG5cbiAgcHJvcE1ldGFkYXRhKHR5cGVPckZ1bmM6IGFueSk6IHtba2V5OiBzdHJpbmddOiBhbnlbXTt9IHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoJ05vdCBpbXBsZW1lbnRlZC4nKTtcbiAgfVxuXG4gIGhhc0xpZmVjeWNsZUhvb2sodHlwZTogYW55LCBsY1Byb3BlcnR5OiBzdHJpbmcpOiBib29sZWFuIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoJ05vdCBpbXBsZW1lbnRlZC4nKTtcbiAgfVxuXG4gIGd1YXJkcyh0eXBlT3JGdW5jOiBhbnkpOiB7W2tleTogc3RyaW5nXTogYW55O30ge1xuICAgIHRocm93IG5ldyBFcnJvcignTm90IGltcGxlbWVudGVkLicpO1xuICB9XG5cbiAgY29tcG9uZW50TW9kdWxlVXJsKHR5cGU6IGFueSwgY21wTWV0YWRhdGE6IGFueSk6IHN0cmluZyB7XG4gICAgdGhyb3cgbmV3IEVycm9yKCdOb3QgaW1wbGVtZW50ZWQuJyk7XG4gIH1cbn1cbiJdfQ==
Note: See TracBrowser for help on using the repository browser.