updux/index.test-d.ts
2019-10-23 12:47:11 -04:00

18 lines
318 B
TypeScript

import { expectType, expectError } from 'tsd';
import buildInitial from './src/buildInitial';
expectType<{}>(buildInitial());
type MyState = {
foo: {
bar: number
},
baz: string,
}
expectType<MyState>(buildInitial<MyState>());
expectError( buildInitial<MyState>({ foo: { bar: "potato" } }) );