We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I don't know how common or how useful this would be, but it might be a companion to the Get/Set types.
const event = { user: { id: 123, name: 'giorgio' }, action: 'delete' } as const; const id = get('user.id', event); // ^? number, typed via Get get('user.state', event); // ^? Error, typed via advanced Get
This would also enable/export a "dot-notation keyof":
type DeepKeys = DeepKeyOf<typeof event>; // ^? ['user', 'user.id', 'user.name', 'action']
Real-life example:
https://github.com/pixiebrix/pixiebrix-app/blob/d30a53fe6f9e8baecc0b86356b4eab844e16d296/pixiebrix-app/src/pages/queryRegistry/exportQueryResult.ts#L8-L14
The text was updated successfully, but these errors were encountered:
Duplicate of #213
Sorry, something went wrong.
Oh good. I couldn't find it
Shouldn't #432 also be closed?
Maybe, but it has more info.
No branches or pull requests
I don't know how common or how useful this would be, but it might be a companion to the Get/Set types.
This would also enable/export a "dot-notation keyof":
Real-life example:
https://github.com/pixiebrix/pixiebrix-app/blob/d30a53fe6f9e8baecc0b86356b4eab844e16d296/pixiebrix-app/src/pages/queryRegistry/exportQueryResult.ts#L8-L14
Upvote & Fund
The text was updated successfully, but these errors were encountered: