Charles Pick
Charles Pick
@cowwoc multiple `@fail` tags could be supported, just like `@throws`: ``` js /** * Make a request * * @promise {Object} the result of the request * @fail {ConnectionError} if...
@cowwoc that's really horrible IMHO, it's not DRY it's confusing and way too easy to omit or miss the `@typedef`. What happens if the function throws synchronously as well?
@hegemonic still think this is _way_ too verbose and no one will use it as a consequence. Your proposal is _completely_ impractical for code which makes heavy use of promises....
@jamiehodge this is the top of my list, unfortunately other work commitments are in the way so it's hard to say when it'll happen. I'd gladly accept a PR.
> (Flow looks for @flow, not ^@flow$, and @flow-runtime satisfies the regex). nasty!
@bwestergard maybe I'm missing something, but it seems like you could accomplish this with something like: ```js function parseUser(input: string): User { return JSON.parse(input); } ``` Or is the issue...
I spent a long time looking into this a couple of months ago, what I wanted (and still do want) is to be able to take a Flow (runtime) type,...
Yes I think so, this seems to be a consequence of using decorators for this. I think at this point we should switch to doing this work in the constructor...
@jedwards1211 yeah it's a little bit tricky / messy, this particular transform happens in https://github.com/codemix/flow-runtime/blob/master/packages/babel-plugin-flow-runtime/src/transformVisitors.js#L789
marking as low priority because Flow already catches this.