typescript multiple annotations code example
Example 1: typescript extends multiple types
interface You {
name: string;
value: number;
}
interface FooYou {
name: 'foo';
}
interface ConcreteFooYou extends You, FooYou {
concrete: boolean;
}
Example 2: typescript annotate return type
function add(x: number, y: number): number {
return x + y;
}