If you're using @AtomEditor without https://nuclide.io and @flowtype, you're doing it wrong.
$ apm install nuclide
go
-
-
Also. Typescript can't be used to define complex types such as this.pic.twitter.com/rBsPWbIIHN
-
Is this a Higher Kinded Type? What is it being used for here exactly? Hard to tell just by looking at it.
-
This is just the definition. It takes a nullable type and gives you a non-nullable type. used it for Array<?T>.filter(Boolean)
-
in TS, I do things like: function unwrap<T>(v: Option<T>): T { if (v === null) throw new Error("null!"); else return v; }
-
for context: type Option<T> = T | null; type Maybe<T> = Option<T> | undefined;
-
That works for normal functions. Doesn’t work for methods like Array.filter
-
What are the semantics of A.p.f that you're trying to capture?
-
class Array<T>{ filter(fn: typeof Boolean): Array<$NonNull<T>>; }
- 20 more replies
New conversation -
-
-
*large typescript project.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
and those language features are a pretty big concern when coming to a typescript code base.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
typescript does a lot for syntax. And adds many language features. But it's type system is not as strong as Flow's
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
one example is higher order components for react. Can be done with flow can't be done with typescript.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.

Just kidding, we know you write perfect code 