I'm working with the following code:
interface Process<T> {
first: () => T[];
second: (d: T) => void;
}
const PROCESSES: Process<T>[] = [
{
first: () => [{car: "car1"}],
second: (car: {car: string}) => {},
},
{
first: () => [{person: "person1"}],
second: (person: {car: string}) => {}, // => How can I make TypeScript identify this as an error because it's not a persona type?
},
];
I'm facing an issue where TypeScript is throwing the error: Cannot find name 'T'.