class property generic type typescript code example
Example 1: typescript generic type interface
interface IProcessor<T>
{
result:T;
process(a: T, b: T) => T;
}
Example 2: typescript generic type
function identity<T>(arg: T): T {
return arg;
}Try