[6a3a178] | 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 | export declare function dashCaseToCamelCase(input: string): string;
|
---|
| 9 | export declare function splitAtColon(input: string, defaultValues: string[]): string[];
|
---|
| 10 | export declare function splitAtPeriod(input: string, defaultValues: string[]): string[];
|
---|
| 11 | export declare function visitValue(value: any, visitor: ValueVisitor, context: any): any;
|
---|
| 12 | export declare function isDefined(val: any): boolean;
|
---|
| 13 | export declare function noUndefined<T>(val: T | undefined): T;
|
---|
| 14 | export interface ValueVisitor {
|
---|
| 15 | visitArray(arr: any[], context: any): any;
|
---|
| 16 | visitStringMap(map: {
|
---|
| 17 | [key: string]: any;
|
---|
| 18 | }, context: any): any;
|
---|
| 19 | visitPrimitive(value: any, context: any): any;
|
---|
| 20 | visitOther(value: any, context: any): any;
|
---|
| 21 | }
|
---|
| 22 | export declare class ValueTransformer implements ValueVisitor {
|
---|
| 23 | visitArray(arr: any[], context: any): any;
|
---|
| 24 | visitStringMap(map: {
|
---|
| 25 | [key: string]: any;
|
---|
| 26 | }, context: any): any;
|
---|
| 27 | visitPrimitive(value: any, context: any): any;
|
---|
| 28 | visitOther(value: any, context: any): any;
|
---|
| 29 | }
|
---|
| 30 | export declare type SyncAsync<T> = T | Promise<T>;
|
---|
| 31 | export declare const SyncAsync: {
|
---|
| 32 | assertSync: <T>(value: SyncAsync<T>) => T;
|
---|
| 33 | then: <T_1, R>(value: SyncAsync<T_1>, cb: (value: T_1) => SyncAsync<R>) => SyncAsync<R>;
|
---|
| 34 | all: <T_2>(syncAsyncValues: SyncAsync<T_2>[]) => SyncAsync<T_2[]>;
|
---|
| 35 | };
|
---|
| 36 | export declare function error(msg: string): never;
|
---|
| 37 | export declare function escapeRegExp(s: string): string;
|
---|
| 38 | export declare type Byte = number;
|
---|
| 39 | export declare function utf8Encode(str: string): Byte[];
|
---|
| 40 | export declare function stringify(token: any): string;
|
---|
| 41 | /**
|
---|
| 42 | * Lazily retrieves the reference value from a forwardRef.
|
---|
| 43 | */
|
---|
| 44 | export declare function resolveForwardRef(type: any): any;
|
---|
| 45 | /**
|
---|
| 46 | * Determine if the argument is shaped like a Promise
|
---|
| 47 | */
|
---|
| 48 | export declare function isPromise<T = any>(obj: any): obj is Promise<T>;
|
---|
| 49 | export declare class Version {
|
---|
| 50 | full: string;
|
---|
| 51 | readonly major: string;
|
---|
| 52 | readonly minor: string;
|
---|
| 53 | readonly patch: string;
|
---|
| 54 | constructor(full: string);
|
---|
| 55 | }
|
---|
| 56 | export interface Console {
|
---|
| 57 | log(message: string): void;
|
---|
| 58 | warn(message: string): void;
|
---|
| 59 | }
|
---|
| 60 | declare const _global: {
|
---|
| 61 | [name: string]: any;
|
---|
| 62 | };
|
---|
| 63 | export { _global as global };
|
---|
| 64 | export declare function newArray<T = any>(size: number): T[];
|
---|
| 65 | export declare function newArray<T>(size: number, value: T): T[];
|
---|
| 66 | /**
|
---|
| 67 | * Partitions a given array into 2 arrays, based on a boolean value returned by the condition
|
---|
| 68 | * function.
|
---|
| 69 | *
|
---|
| 70 | * @param arr Input array that should be partitioned
|
---|
| 71 | * @param conditionFn Condition function that is called for each item in a given array and returns a
|
---|
| 72 | * boolean value.
|
---|
| 73 | */
|
---|
| 74 | export declare function partitionArray<T, F = T>(arr: (T | F)[], conditionFn: (value: T | F) => boolean): [T[], F[]];
|
---|