-
-
Notifications
You must be signed in to change notification settings - Fork 129
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
InitObject is typed wrong #778
Comments
Technically it should return the same value it was fed, not some alternative value. I think that works with TypeScript?
|
Hm, I see what you're doing. It feels a little bit to me like the entire
And for the init case, Which (i think) makes it very clear (and forces?) you to return the first argument. |
But it's not a generic function, surely adding a generic just overcomplicates things? |
V5 changes the type to |
I think:
graphile-engine/packages/graphile-build/src/SchemaBuilder.d.ts
Line 40 in 1bc8cfe
instead of never, I think should be an-empty-object. It matters a little, because when you provide a hook function, now you need to trick typescript into thinking the function doesn't return. (But in fact, the function needs to return a true-y value)
The text was updated successfully, but these errors were encountered: