different type of function in typescript code example
Example 1: typescript function type
interface Date {
toString(): string;
setTime(time: number): number;
// ...
}
Example 2: types function typescript
interface Alternate_Syntax_4_Advanced {
title: string;
callback<T extends unknown[], R = unknown>(...args?: T): R;
}