Skip to content
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

Address concerns around count typings #3249

Merged
merged 4 commits into from Jun 6, 2019

Conversation

Projects
None yet
3 participants
@lorefnon
Copy link
Contributor

commented Jun 3, 2019

Fixes: #3247

@jpike88

This comment has been minimized.

Copy link

commented Jun 5, 2019

#3260
#3259

^ these might be fixed too by this

lorefnon added some commits Jun 5, 2019

Use an alias instead of interface for DeferredKeySelection
This prevents typescript from complaining when it has to be used in an exported signature without us having to expose internal type as public

Closes #3259

@lorefnon lorefnon force-pushed the lorefnon:aggr-typings branch from 1eaaab8 to 8c0496e Jun 5, 2019

@lorefnon lorefnon changed the title Restore number | string -> any in count typings [WIP] Restore number | string -> any in count typings Jun 5, 2019

@kibertoad

This comment has been minimized.

Copy link
Collaborator

commented Jun 5, 2019

@lorefnon Could you also backport this to 0.17 branch? This fix would definitely warrant one more release in that branch.

@lorefnon lorefnon changed the title [WIP] Restore number | string -> any in count typings Address concerns around count typings Jun 5, 2019

@lorefnon lorefnon force-pushed the lorefnon:aggr-typings branch from 273d199 to 5e58256 Jun 5, 2019

@lorefnon

This comment has been minimized.

Copy link
Contributor Author

commented Jun 5, 2019

should we disable linting rule for "interface-over-type-literal"?

Yeah, done.

@lorefnon Could you also backport this to 0.17 branch? This fix would definitely warrant one more release in that branch.

Yes, I tried cherry picking the commits on that branch and there weren't any conflicts. Do you want me to create another PR against that branch ?

@kibertoad

This comment has been minimized.

Copy link
Collaborator

commented Jun 5, 2019

Yup, would be perfect.

@kibertoad

This comment has been minimized.

Copy link
Collaborator

commented Jun 5, 2019

@lorefnon Should this be WIP or can it be merged already? Also maybe it makes sense to add TypeScript section to knex documentation to explain the registry functionality? Probably most people won't check sources for it.

@lorefnon

This comment has been minimized.

Copy link
Contributor Author

commented Jun 6, 2019

I think this can be merged. I'll add a pr for ts specific docs in the documentation repo by end of the week.

@kibertoad kibertoad merged commit 501d58a into tgriesser:master Jun 6, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 88.017%
Details

lorefnon added a commit to lorefnon/knex that referenced this pull request Jun 8, 2019

Address concerns around count typings (tgriesser#3249)
* Use number instead of number | string for return type of count

Closes tgriesser#3247

* Use an alias instead of interface for DeferredKeySelection

This prevents typescript from complaining when it has to be used in an exported signature without us having to expose internal type as public

Closes tgriesser#3259

* Make count result type overridable

* Disable interface-over-type-literal rule
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.