MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/javascript/comments/75nibr/javascripts_promise_is_memory_unsafe/do87y7j/?context=3
r/javascript • u/alexelcu • Oct 11 '17
77 comments sorted by
View all comments
1
type Task<A> = () => Promise<A> interface List<A> class Cons<A> implements List<A> { constructor( public readonly head: A, public readonly tail: Task<List<A>>) {} } class Nil implements List<A> { constructor(public readonly error?: any) {} }
Is that javascript?
2 u/alexelcu Oct 12 '17 It's TypeScript, could be Flow, the syntax isn't relevant, I just wanted to make clear what the types are.Having a static typing background, that's how I think even when working with plain JavaScript.
2
It's TypeScript, could be Flow, the syntax isn't relevant, I just wanted to make clear what the types are.
Having a static typing background, that's how I think even when working with plain JavaScript.
1
u/Skhmt Oct 11 '17
Is that javascript?