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
StringKeyof
keyof object could include number type. (It is intended.)
keyof
However, sometimes we want to get only string keys. (https://github.com/sindresorhus/type-fest/blob/main/source/get.d.ts#L68-L70)
How about provide StringKeyof type for this use cases?
type StringKeyof<BaseType> = `${Extract<keyof BaseType, string | number>}`
See also:
The text was updated successfully, but these errors were encountered:
I would argue that you almost always want only the string keys, so this sounds useful indeed.
Sorry, something went wrong.
StringKeyOf
Successfully merging a pull request may close this issue.
keyof
object could include number type. (It is intended.)However, sometimes we want to get only string keys. (https://github.com/sindresorhus/type-fest/blob/main/source/get.d.ts#L68-L70)
How about provide
StringKeyof
type for this use cases?See also:
The text was updated successfully, but these errors were encountered: