updux/foo.ts

7 lines
106 B
TypeScript
Raw Normal View History

2023-03-02 16:10:25 +00:00
const foo = <A, B>(x: Partial<{ a: A; b: B }>) => x as B;
const y = foo({
a: 'potato',
b: 2,
});