TS2314
Generic type 'Omit' requires 2 type argument(s).
Broken Code ❌
export interface SerializedBatchedCandle extends Omit<BatchedCandle, 'close', 'open'> {
open: string;
close: string;
}Fixed Code ✔️
When using the Omit utility type, you have to list property overwrites with a pipe (|):
export interface SerializedBatchedCandle extends Omit<BatchedCandle, 'close' | 'closeAsk'> {
close: string;
closeAsk: string;
}Generic type 'ReadonlyArray` ' requires 1 type argument(s).
Broken Code ❌
const array: ReadonlyArray = [1, 2, 3] as const;Fixed Code ✔️
When using a generic (in this case ReadonlyArray<T>), then you have to pass a type argument to it:
const array: ReadonlyArray<number> = [1, 2, 3] as const;