3b39be09cd3532ba30b413bb8d92554d9ce66d2b4ffd3bbc64d2d87ef9d2911cb3743307940acb21cfb35c281ca5b1de7401c4511692b7b8bdd679d52066d3 416 B

123456789101112131415161718192021
  1. /**
  2. Create a type with the keys of the given type changed to `string` type.
  3. Use-case: Changing interface values to strings in order to use them in a form model.
  4. @example
  5. ```
  6. import {Stringified} from 'type-fest';
  7. type Car {
  8. model: string;
  9. speed: number;
  10. }
  11. const carForm: Stringified<Car> = {
  12. model: 'Foo',
  13. speed: '101'
  14. };
  15. ```
  16. */
  17. export type Stringified<ObjectType> = {[KeyType in keyof ObjectType]: string};