Last change
on this file since fa375fe was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
2.6 KB
|
Line | |
---|
1 | (function (factory) {
|
---|
2 | if (typeof module === "object" && typeof module.exports === "object") {
|
---|
3 | var v = factory(require, exports);
|
---|
4 | if (v !== undefined) module.exports = v;
|
---|
5 | }
|
---|
6 | else if (typeof define === "function" && define.amd) {
|
---|
7 | define("@angular/compiler-cli/linker/src/ast/utils", ["require", "exports", "@angular/compiler-cli/linker/src/fatal_linker_error"], factory);
|
---|
8 | }
|
---|
9 | })(function (require, exports) {
|
---|
10 | "use strict";
|
---|
11 | Object.defineProperty(exports, "__esModule", { value: true });
|
---|
12 | exports.assert = void 0;
|
---|
13 | /**
|
---|
14 | * @license
|
---|
15 | * Copyright Google LLC All Rights Reserved.
|
---|
16 | *
|
---|
17 | * Use of this source code is governed by an MIT-style license that can be
|
---|
18 | * found in the LICENSE file at https://angular.io/license
|
---|
19 | */
|
---|
20 | var fatal_linker_error_1 = require("@angular/compiler-cli/linker/src/fatal_linker_error");
|
---|
21 | /**
|
---|
22 | * Assert that the given `node` is of the type guarded by the `predicate` function.
|
---|
23 | */
|
---|
24 | function assert(node, predicate, expected) {
|
---|
25 | if (!predicate(node)) {
|
---|
26 | throw new fatal_linker_error_1.FatalLinkerError(node, "Unsupported syntax, expected " + expected + ".");
|
---|
27 | }
|
---|
28 | }
|
---|
29 | exports.assert = assert;
|
---|
30 | });
|
---|
31 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9jb21waWxlci1jbGkvbGlua2VyL3NyYy9hc3QvdXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7O0lBQUE7Ozs7OztPQU1HO0lBQ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