updux/index.test-d.ts

18 lines
318 B
TypeScript
Raw Normal View History

2019-10-23 16:47:11 +00:00
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" } }) );