Question

After looking into https://developers.google.com/closure/compiler/docs/js-for-compiler I remain confused on what is the difference between the two.

Just what is the difference between them? Is it like, backwards compatibility with an older version?

I would like some examples on what they differ and when to use one or the other.

Thank you!

Was it helpful?

Solution

@type says what type a variable is. @typedef creates an alias to a type that you can use elsewhere.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top