Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

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-c...



view as:

Legal | privacy