/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ (function (factory) { if (typeof module === "object" && typeof module.exports === "object") { var v = factory(require, exports); if (v !== undefined) module.exports = v; } else if (typeof define === "function" && define.amd) { define("@angular/compiler-cli/src/metadata/schema", ["require", "exports"], factory); } })(function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isMetadataError = exports.isMetadataSymbolicSpreadExpression = exports.isMetadataSymbolicSelectExpression = exports.isMetadataSymbolicReferenceExpression = exports.isMetadataImportDefaultReference = exports.isMetadataImportedSymbolReferenceExpression = exports.isMetadataModuleReferenceExpression = exports.isMetadataGlobalReferenceExpression = exports.isMetadataSymbolicIfExpression = exports.isMetadataSymbolicPrefixExpression = exports.isMetadataSymbolicCallExpression = exports.isMetadataSymbolicIndexExpression = exports.isMetadataSymbolicBinaryExpression = exports.isMetadataSymbolicExpression = exports.isFunctionMetadata = exports.isConstructorMetadata = exports.isMethodMetadata = exports.isMemberMetadata = exports.isInterfaceMetadata = exports.isClassMetadata = exports.isModuleMetadata = exports.METADATA_VERSION = void 0; // Metadata Schema // If you make a backwards incompatible change to the schema, increment the METADTA_VERSION number. // If you make a backwards compatible change to the metadata (such as adding an option field) then // leave METADATA_VERSION the same. If possible, supply as many versions of the metadata that can // represent the semantics of the file in an array. For example, when generating a version 2 file, // if version 1 can accurately represent the metadata, generate both version 1 and version 2 in // an array. exports.METADATA_VERSION = 4; function isModuleMetadata(value) { return value && value.__symbolic === 'module'; } exports.isModuleMetadata = isModuleMetadata; function isClassMetadata(value) { return value && value.__symbolic === 'class'; } exports.isClassMetadata = isClassMetadata; function isInterfaceMetadata(value) { return value && value.__symbolic === 'interface'; } exports.isInterfaceMetadata = isInterfaceMetadata; function isMemberMetadata(value) { if (value) { switch (value.__symbolic) { case 'constructor': case 'method': case 'property': return true; } } return false; } exports.isMemberMetadata = isMemberMetadata; function isMethodMetadata(value) { return value && (value.__symbolic === 'constructor' || value.__symbolic === 'method'); } exports.isMethodMetadata = isMethodMetadata; function isConstructorMetadata(value) { return value && value.__symbolic === 'constructor'; } exports.isConstructorMetadata = isConstructorMetadata; function isFunctionMetadata(value) { return value && value.__symbolic === 'function'; } exports.isFunctionMetadata = isFunctionMetadata; function isMetadataSymbolicExpression(value) { if (value) { switch (value.__symbolic) { case 'binary': case 'call': case 'index': case 'new': case 'pre': case 'reference': case 'select': case 'spread': case 'if': return true; } } return false; } exports.isMetadataSymbolicExpression = isMetadataSymbolicExpression; function isMetadataSymbolicBinaryExpression(value) { return value && value.__symbolic === 'binary'; } exports.isMetadataSymbolicBinaryExpression = isMetadataSymbolicBinaryExpression; function isMetadataSymbolicIndexExpression(value) { return value && value.__symbolic === 'index'; } exports.isMetadataSymbolicIndexExpression = isMetadataSymbolicIndexExpression; function isMetadataSymbolicCallExpression(value) { return value && (value.__symbolic === 'call' || value.__symbolic === 'new'); } exports.isMetadataSymbolicCallExpression = isMetadataSymbolicCallExpression; function isMetadataSymbolicPrefixExpression(value) { return value && value.__symbolic === 'pre'; } exports.isMetadataSymbolicPrefixExpression = isMetadataSymbolicPrefixExpression; function isMetadataSymbolicIfExpression(value) { return value && value.__symbolic === 'if'; } exports.isMetadataSymbolicIfExpression = isMetadataSymbolicIfExpression; function isMetadataGlobalReferenceExpression(value) { return value && value.name && !value.module && isMetadataSymbolicReferenceExpression(value); } exports.isMetadataGlobalReferenceExpression = isMetadataGlobalReferenceExpression; function isMetadataModuleReferenceExpression(value) { return value && value.module && !value.name && !value.default && isMetadataSymbolicReferenceExpression(value); } exports.isMetadataModuleReferenceExpression = isMetadataModuleReferenceExpression; function isMetadataImportedSymbolReferenceExpression(value) { return value && value.module && !!value.name && isMetadataSymbolicReferenceExpression(value); } exports.isMetadataImportedSymbolReferenceExpression = isMetadataImportedSymbolReferenceExpression; function isMetadataImportDefaultReference(value) { return value && value.module && value.default && isMetadataSymbolicReferenceExpression(value); } exports.isMetadataImportDefaultReference = isMetadataImportDefaultReference; function isMetadataSymbolicReferenceExpression(value) { return value && value.__symbolic === 'reference'; } exports.isMetadataSymbolicReferenceExpression = isMetadataSymbolicReferenceExpression; function isMetadataSymbolicSelectExpression(value) { return value && value.__symbolic === 'select'; } exports.isMetadataSymbolicSelectExpression = isMetadataSymbolicSelectExpression; function isMetadataSymbolicSpreadExpression(value) { return value && value.__symbolic === 'spread'; } exports.isMetadataSymbolicSpreadExpression = isMetadataSymbolicSpreadExpression; function isMetadataError(value) { return value && value.__symbolic === 'error'; } exports.isMetadataError = isMetadataError; }); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2NoZW1hLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvY29tcGlsZXItY2xpL3NyYy9tZXRhZGF0YS9zY2hlbWEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HOzs7Ozs7Ozs7Ozs7O0lBRUgsa0JBQWtCO0lBRWxCLG1HQUFtRztJQUVuRyxrR0FBa0c7SUFDbEcsaUdBQWlHO0lBQ2pHLGtHQUFrRztJQUNsRywrRkFBK0Y7SUFDL0YsWUFBWTtJQUVDLFFBQUEsZ0JBQWdCLEdBQUcsQ0FBQyxDQUFDO0lBWWxDLFNBQWdCLGdCQUFnQixDQUFDLEtBQVU7UUFDekMsT0FBTyxLQUFLLElBQUksS0FBSyxDQUFDLFVBQVUsS0FBSyxRQUFRLENBQUM7SUFDaEQsQ0FBQztJQUZELDRDQUVDO0lBZUQsU0FBZ0IsZUFBZSxDQUFDLEtBQVU7UUFDeEMsT0FBTyxLQUFLLElBQUksS0FBSyxDQUFDLFVBQVUsS0FBSyxPQUFPLENBQUM7SUFDL0MsQ0FBQztJQUZELDBDQUVDO0lBS0QsU0FBZ0IsbUJBQW1CLENBQUMsS0FBVTtRQUM1QyxPQUFPLEtBQUssSUFBSS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