We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
Hello, I would want to create a tuple with the given object types. For example
let o:{ i:number, j:string } = { i:1, j:'a' } type X = ObjectTypes<o> // X is [number, string]
ObjectTypes utility function
type X = { i: number j: string } let f = (...a:ObjectTypes<X>) => ...
What do you want to use this for? Avoid repeating too much code (identifiers and types)
What shortcomings exist with current approaches? Repeating too much code (identifiers and types)
What workarounds are you using in the meantime? Repeating too much code (identifiers and types)
The text was updated successfully, but these errors were encountered:
#39522 (comment)
Sorry, something went wrong.
Chalk up another vote for #55746
I believe there is no guarantees about properties (in this case related values types) order, so you can't get tuple out object with fixed order.
No branches or pull requests
π Search Terms
Hello, I would want to create a tuple with the given object types.
For example
β Viability Checklist
β Suggestion
ObjectTypes utility function
π Motivating Example
π» Use Cases
What do you want to use this for?
Avoid repeating too much code (identifiers and types)
What shortcomings exist with current approaches?
Repeating too much code (identifiers and types)
What workarounds are you using in the meantime?
Repeating too much code (identifiers and types)
The text was updated successfully, but these errors were encountered: