-
Notifications
You must be signed in to change notification settings - Fork 0
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
Autocomplete when typing lens #2
Comments
Hi, The only way I can imagine implementing this would be to create a type definition from However, if I implement type checking on type Model = { a: number, b: [ {c: number}, {d: number} ] }
type Query = Lens<['b', unknown], Model>
// ~~~~~~~~~~~~~
// Type '["b", unknown]' does not satisfy the constraint '["b", 0] | ["b", 1]' I would not need to go deeper than one level after |
Hum I actually tried a dummy interface with an exhaustive union of paths and you wouldn't get auto-completion with this. You would get suggestions in a very noisy tooltip but not an interactive list, at least in VS Code. I don't think this is something under my control. Programming with a whole would be a little more helpful: you can start with |
Hi, |
You may be interested in |
I know that this solution is already based on a likely tricky implementation of free types, but is it possible to have autocomplete when typing lens directly inside a focusing generic i.e.
Get
?That is if MyType already has MyType['have']['autocomplete']['here']... it could be autocompleted when using needle in the
Get
generic.The text was updated successfully, but these errors were encountered: