7,416 karma · joined October 23, 2009
Email: charles@codemix.com
const [post, comments] = await query(({ get }) => {
get.post.with.slug = 'new-pricing';
get.comments;
});
there is simply no way to make that type safe without wrapping or forking TypeScript, and consumers really don't want that. Why make that tradeoff? Especially when it's so easy to accomplish with a more normal syntax: const [post, comments] = await query(({ get }) => [
get('post').with({slug: 'new-pricing'}),
get('comments')
]);[WASM/C++ 18:07:24] Getting waveforms from istft [WASM/C++ 18:07:25] Copying waveforms
What I'm saying is that if instead we said that all type annotations must follow existing JS grammar rules, with perhaps a couple of small additions, then we'd be able to support all sorts of complex type annotations in JS directly, using existing syntax. This would mean that TS's grammar would end up changing a bit, but that's a small price to pay for ongoing interoperability.
For example, instead of
type UserProperties = keyof typeof User;
which is tied to TS's arbitrary syntax, and not supported in Flow, use type UserProperties = keyOf(typeOf(User));In general though this idea that people should talk openly about their mental health problems is good for society and terrible for the individuals concerned. People will absolutely change their opinion of you and treat you differently, and they will never disclose why.