-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path3.1.spec.ts
25 lines (24 loc) · 927 Bytes
/
3.1.spec.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
describe('3.1', (): void => {
describe('mapped types on tuples and arrays', (): void => {
// type MapToPromise<T> = {
// [K in keyof T]: Promise<T[K]>
// };
type Coordinate = [number, number];
// type PromiseCoordinate = MapToPromise<Coordinate>; // [Promise<number>, Promise<number>]
it('when type T is a tuple, only numeric properties are converted', (): void => {
const point: Coordinate = [10, 20];
// tslint:disable-next-line no-console
console.log(`what's the ${point}`);
// const promPoint =
});
});
describe('property declarations on functions', (): void => {
it('allow setting default props on React functions', (): void => {
const FooComponent = ({ name }: { name: string }): void => {
// tslint:disable-next-line no-console
console.log(name);
};
FooComponent.defaultProps = { name: '(anonymous)' };
});
});
});