@angular-ru/cdk/typings
Nullable
@Component({})
class MyComponent {
@Input() public list: Nullable<string[]>; // equals ~ @Input() public list: string[] | null | undefined;
}Timestamp- alias for timestamp type.
let time: Timestamp = new Date().toISOString();
// or
time = new Date().getTime();NonEmptyArray
import {NonEmptyArray} from '@angular-ru/cdk/typings';
export function assertIsEmptyList(arr: string[]): asserts arr is NonEmptyArray<string> {
if (!Array.isArray(arr) || arr.length === 0) {
throw new EmptyArrayList();
}
}PlainObject,PlainObjectOf<T>
const a: PlainObject = {a: 1, b: '2'};
const b: PlainObjectOf<number> = {a: 1, b: 2};Fn<T, U>
DeepPartial<T>
PrimaryKey
Immutable<T>, Mutable<T>
ClassType
KeyValueComparator
Couple<T>
KeyOfList<T>
DeepKeyOfList<T>
Leaves<T>
Leaves<T>[] === DeepKeyOfList<T>
Paths<T>
also, you can:
KeysOfType<T, Type>
NgCssClasses
DateIntervalDescriptor
Tuple
InfiniteTuple
LastOfTuple
TupleItem
Last updated