Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Stringified type #95

Merged
merged 9 commits into from Apr 5, 2020
Merged

Add Stringified type #95

merged 9 commits into from Apr 5, 2020

Conversation

kainiedziela
Copy link
Contributor

Fixes #87

Create a type with all of the inputed types keys transformed into strings.

Use case: changing an interfaces values to strings in order to use it as a form model.

Example

import {Stringified} from 'type-fest';

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

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

@sindresorhus sindresorhus merged commit b9a23df into sindresorhus:master Apr 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Stringified type
2 participants