/** * @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 */ import { ViewEncapsulation } from './core'; import { noUndefined } from './util'; export class CompilerConfig { constructor({ defaultEncapsulation = ViewEncapsulation.Emulated, useJit = true, missingTranslation = null, preserveWhitespaces, strictInjectionParameters } = {}) { this.defaultEncapsulation = defaultEncapsulation; this.useJit = !!useJit; this.missingTranslation = missingTranslation; this.preserveWhitespaces = preserveWhitespacesDefault(noUndefined(preserveWhitespaces)); this.strictInjectionParameters = strictInjectionParameters === true; } } export function preserveWhitespacesDefault(preserveWhitespacesOption, defaultSetting = false) { return preserveWhitespacesOption === null ? defaultSetting : preserveWhitespacesOption; } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvY29tcGlsZXIvc3JjL2NvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUc7QUFFSCxPQUFPLEVBQTZCLGlCQUFpQixFQUFDLE1BQU0sUUFBUSxDQUFDO0FBQ3JFLE9BQU8sRUFBQyxXQUFXLEVBQUMsTUFBTSxRQUFRLENBQUM7QUFFbkMsTUFBTSxPQUFPLGNBQWM7SUFPekIsWUFBWSxFQUNWLG9CQUFvQixHQUFHLGlCQUFpQixDQUFDLFFBQVEsRUFDakQsTUFBTSxHQUFHLElBQUksRUFDYixrQkFBa0IsR0FBRyxJQUFJLEVBQ3pCLG1CQUFtQixFQUNuQix5QkFBeUIsS0FPdkIsRUFBRTtRQUNKLElBQUksQ0FBQyxvQkFBb0IsR0FBRyxvQkFBb0IsQ0FBQztRQUNqRCxJQUFJLENBQUMsTUFBTSxHQUFHLENBQUMsQ0FBQyxNQUFNLENBQUM7UUFDdkIsSUFBSSxDQUFDLGtCQUFrQixHQUFH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