refactor(compiler): split compiler and core (#18683)
After this, neither @angular/compiler nor @angular/comnpiler-cli depend on @angular/core. This add a duplication of some interfaces and enums which is stored in @angular/compiler/src/core.ts BREAKING CHANGE: - `@angular/platform-server` now additionally depends on `@angular/platform-browser-dynamic` as a peer dependency. PR Close #18683
This commit is contained in:

committed by
Miško Hevery

parent
a0ca01d580
commit
0cc77b4a69
@ -6,11 +6,8 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {isDevMode} from '@angular/core';
|
||||
|
||||
|
||||
export function assertArrayOfStrings(identifier: string, value: any) {
|
||||
if (!isDevMode() || value == null) {
|
||||
if (value == null) {
|
||||
return;
|
||||
}
|
||||
if (!Array.isArray(value)) {
|
||||
@ -34,7 +31,7 @@ const INTERPOLATION_BLACKLIST_REGEXPS = [
|
||||
export function assertInterpolationSymbols(identifier: string, value: any): void {
|
||||
if (value != null && !(Array.isArray(value) && value.length == 2)) {
|
||||
throw new Error(`Expected '${identifier}' to be an array, [start, end].`);
|
||||
} else if (isDevMode() && value != null) {
|
||||
} else if (value != null) {
|
||||
const start = value[0] as string;
|
||||
const end = value[1] as string;
|
||||
// black list checking
|
||||
|
Reference in New Issue
Block a user