@angular-ru/cdk/typings
@Component({})
class MyComponent {
@Input() public list: Nullable<string[]>; // equals ~ @Input() public list: string[] | null | undefined;
}let time: Timestamp = new Date().toISOString();
// or
time = new Date().getTime();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();
}
}const a: PlainObject = {a: 1, b: '2'};
const b: PlainObjectOf<number> = {a: 1, b: 2};Last updated