source: trip-planner-front/node_modules/type-fest/source/stringified.d.ts@ eed0bf8

Last change on this file since eed0bf8 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 416 bytes
Line 
1/**
2Create a type with the keys of the given type changed to `string` type.
3
4Use-case: Changing interface values to strings in order to use them in a form model.
5
6@example
7```
8import {Stringified} from 'type-fest';
9
10type Car {
11 model: string;
12 speed: number;
13}
14
15const carForm: Stringified<Car> = {
16 model: 'Foo',
17 speed: '101'
18};
19```
20*/
21export type Stringified<ObjectType> = {[KeyType in keyof ObjectType]: string};
Note: See TracBrowser for help on using the repository browser.