Possible mis-documentation example
kieran-osgood opened this issue · 2 comments
kieran-osgood commented
Hey - was just checking out this lib and wondered, in this example:
### Testing definitions
expectType<number>(add(1, 2));
expectType<TypeEqual<boolean, ReturnType<typeof add>>>(true);
expectType<TypeEqual<[number, number], Parameters<typeof add>>>(true);
Should the middle line actually read:
expectType<TypeEqual<number, ReturnType<typeof add>>>(true);
// ^ changing this to a number
As add returns a number not a boolean?
blakeembrey commented
Your fix looks correct to me, did you want to open a PR?
kieran-osgood commented
Your fix looks correct to me, did you want to open a PR?
Will do just that when I'm home!