4 ms·
1. Its unclear how you can declare new generic types using @type Here is an example type of a map function in TypeScript: declare var map: <T, U>(f: (t:T) =>
by spion 10y ago
1. Its unclear how you can declare new generic types using @type
Here is an example type of a map function in TypeScript:
declare var map: <T, U>(f: (t:T) => U, t:T[]) => U[]
I cannot figure out the equivalent @type annotation in Closure using these docs: https://developers.google.com/closure/compiler/docs/js-for-compiler#declaring-a-generic-type https://developers.google.com/closure/compiler/docs/js-for-c...