Skip to main content
Module

x/scaffold/src/deps/types.ts>Stringified

scaffold your next project with style and 💗
Latest
type alias Stringified
import { type Stringified } from "https://deno.land/x/scaffold@0.3.0/src/deps/types.ts";

Create a type with the keys of the given type changed to string type.

Use-case: Changing interface values to strings in order to use them in a form model.

Examples

Example 1

import type {Stringified} from 'type-fest';

type Car {
	model: string;
	speed: number;
}

const carForm: Stringified<Car> = {
	model: 'Foo',
	speed: '101'
};

Type Parameters

ObjectType
definition: [KeyType in keyof ObjectType]: string