UNPKG

1.64 kBTypeScriptView Raw
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 */
8export declare function dashCaseToCamelCase(input: string): string;
9export declare function splitAtColon(input: string, defaultValues: string[]): string[];
10export declare function splitAtPeriod(input: string, defaultValues: string[]): string[];
11export declare function noUndefined<T>(val: T | undefined): T;
12export declare function error(msg: string): never;
13export declare function escapeRegExp(s: string): string;
14export declare type Byte = number;
15export declare function utf8Encode(str: string): Byte[];
16export declare function stringify(token: any): string;
17export declare class Version {
18 full: string;
19 readonly major: string;
20 readonly minor: string;
21 readonly patch: string;
22 constructor(full: string);
23}
24export interface Console {
25 log(message: string): void;
26 warn(message: string): void;
27}
28declare const _global: {
29 [name: string]: any;
30};
31export { _global as global };
32export declare function newArray<T = any>(size: number): T[];
33export declare function newArray<T>(size: number, value: T): T[];
34/**
35 * Partitions a given array into 2 arrays, based on a boolean value returned by the condition
36 * function.
37 *
38 * @param arr Input array that should be partitioned
39 * @param conditionFn Condition function that is called for each item in a given array and returns a
40 * boolean value.
41 */
42export declare function partitionArray<T, F = T>(arr: (T | F)[], conditionFn: (value: T | F) => boolean): [T[], F[]];