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
the new types in 6.0.0-alpha.3 (thanks!) don't handle cases where the DT types allowed ReadonlyArray, e.g. random.arrayElement.
ReadonlyArray
random.arrayElement
import faker from '@faker-js/faker' const items = ['one', 'two', 'three'] as const const pick = faker.random.arrayElement(items)
also note, that the other way around would be fine:
https://www.typescriptlang.org/play?#code/CYUwxgNghgTiAEAzArgOzAFwJYHtX1higE8BRCEAWxFQwB4AVAPgAosMqBnALngEEYRYoyYBKXgwBQksHk4Z4cKMDwRiAofAC88ANoByPCH0AaePowB3HKfMYAFnGMBdAp3izU86YRLkqNBgsSiqoahokotIA9NHwALSJ0qCQsAgo6Nh4iiDKquqCfhTUtCJsHJQ88ABKuaHhhcLM4vBSMnIKvsTaeoaoxmYW1rYWjiAu0iH5EWTFgSxdokA
No response
The text was updated successfully, but these errors were encountered:
clarkerican
Successfully merging a pull request may close this issue.
Describe the bug
the new types in 6.0.0-alpha.3 (thanks!) don't handle cases where the DT types allowed
ReadonlyArray
, e.g.random.arrayElement
.Reproduction
also note, that the other way around would be fine:
https://www.typescriptlang.org/play?#code/CYUwxgNghgTiAEAzArgOzAFwJYHtX1higE8BRCEAWxFQwB4AVAPgAosMqBnALngEEYRYoyYBKXgwBQksHk4Z4cKMDwRiAofAC88ANoByPCH0AaePowB3HKfMYAFnGMBdAp3izU86YRLkqNBgsSiqoahokotIA9NHwALSJ0qCQsAgo6Nh4iiDKquqCfhTUtCJsHJQ88ABKuaHhhcLM4vBSMnIKvsTaeoaoxmYW1rYWjiAu0iH5EWTFgSxdokA
Additional Info
No response
The text was updated successfully, but these errors were encountered: