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
How can I use the classic Omit functionality applied to an array type instead of a type?
For example, I've the following type
type Car = { a: number, b: string, c: Record<string, unknown> | null } type Cars = Car[]
I would like to create similar types without c: Record<string, unknown> | null.
c: Record<string, unknown> | null
For example I could declare.
type Voiture = Omit<Car, 'c'> type Voitures = Omit<Cars, 'c'> // obviously not working
For code constraints, I ca't use Omit<Car, 'c'>[].
Omit<Car, 'c'>[]
Is there a solution for this?
Thanks
The text was updated successfully, but these errors were encountered:
Apply the Omit before making it an array, or wait for #576
Omit
Sorry, something went wrong.
Oh, I found out type Voitures = Omit<Cars[number], 'c'>[]
type Voitures = Omit<Cars[number], 'c'>[]
Thanks anyway
No branches or pull requests
How can I use the classic Omit functionality applied to an array type instead of a type?
For example, I've the following type
I would like to create similar types without
c: Record<string, unknown> | null
.For example I could declare.
For code constraints, I ca't use
Omit<Car, 'c'>[]
.Is there a solution for this?
Thanks
Upvote & Fund
The text was updated successfully, but these errors were encountered: