TS2314
error TS2314: Generic type ‘
Omit
‘ requires 2 type argument(s).
Broken Code ❌
1 |
|
Fixed Code ✔️
When using the Omit
utility type, you have to list property overwrites with a pipe (|
):
1 |
|
TS2314: Generic type ‘
ReadonlyArray
‘ requires 1 type argument(s).
Broken Code ❌
1 |
|
Fixed Code ✔️
When using a generic (in this case ReadonlyArray<T>
), then you have to pass a type argument to it:
1 |
|