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

Implement subtraction and rest type once TS 2.1 lands #2

Open
niieani opened this issue Sep 26, 2016 · 3 comments
Open

Implement subtraction and rest type once TS 2.1 lands #2

niieani opened this issue Sep 26, 2016 · 3 comments

Comments

@niieani
Copy link

niieani commented Sep 26, 2016

Some nice new features are coming soon to TS which will help with typing of certain rethinkdb commands: microsoft/TypeScript#10727

@blakeembrey
Copy link
Contributor

blakeembrey commented Oct 26, 2016

@niieani Can you elaborate on the features it would enable?

Here's two other upcoming features that'll be super awesome:

  1. Use keyof for bracket APIs to ensure the selection is valid (Keysof type operator microsoft/TypeScript#10425)
  2. Use partial types for update calls to allow partial updates to a document (Partial Types microsoft/TypeScript#11233)
  3. Use dynamic keys to get type information of child properties (Static types for dynamically named properties microsoft/TypeScript#11929)

@niieani
Copy link
Author

niieani commented Oct 27, 2016

Can't remember about rest type right now, but I'll write back here when I dig back into it (once the feature ships).
Subtraction might be good for example when using .without().

The most important feature that will ease the typing will be microsoft/TypeScript#1295.
Having that it will be easier to infer types via rethinkdb's operators, especially in cases like .getField() or .pluck. Right now we need to re-supply the generics for each such operation.

Another useful thing for inference with .group().ungroup() : microsoft/TypeScript#6223

@niieani
Copy link
Author

niieani commented Nov 9, 2016

This is going to be very useful too: microsoft/TypeScript#12114

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants