Flow

578 posts

Flow banner
Flow

Flow

@flowtype

A typed dialect of JavaScript.

Katılım Kasım 2014
13 Takip Edilen10.8K Takipçiler
Flow
Flow@flowtype·
The Rust port is just the start. Flow in 2026 isn't like you remember: flow.org
English
0
1
4
709
Flow
Flow@flowtype·
Most of the Rust port was done by a single engineer over ~8 months, while the rest of the team kept shipping features: no code freeze. Read the full story: medium.com/flow-type/flow…
English
6
5
81
24K
Flow
Flow@flowtype·
Flow is now written in Rust 🦀 The migration from OCaml to Rust brought up to 2x faster type-checking on large codebases.
Flow tweet media
English
28
67
617
247.1K
Flow
Flow@flowtype·
@justboriss Yes, you can fix it by changing the code. If only there was a tool that would point out the problem in the first place - so you knew you had to make the fix 🤔
English
0
0
2
698
just-boris
just-boris@justboriss·
@flowtype Fixed the typescript code. It is an error as well now: #code/C4TwDgpgBAMg9gcxgSwHbQLxQM7AE5oJQA+UAonnnHgNwBQdAZgK6oDGwycqUAhgCb8A6rzypCAHgAqUCAA9gEVP2zlK1EjnyEAfAAoANogBcUAIKVeIaToCUUAN50oUIwgB0YZtgAWe9ADualR4egBE-MjYANZ8BgC2cLhQLAYGYba29AC+DGzcyfEQ2Ni8CMWmFnhWErgEqAg6UFgA2gC69ALCouINekUlZcVZDAOl5dgtAAxt7sBwAKpgkHgAwrzYEHpZQA" target="_blank" rel="nofollow noopener">typescriptlang.org/play/?#code/C4…
just-boris tweet media
English
1
0
2
1.1K
Flow
Flow@flowtype·
Crashes at runtime - but TypeScript accepts it: zero errors under strict. Can you spot the bug?
Flow tweet media
English
17
4
97
29.4K
Flow
Flow@flowtype·
@vpetryniak Doesn't seem like a good assumption 😬
English
0
0
2
774
Valerii Petryniak
Valerii Petryniak@vpetryniak·
@flowtype Typescript implicit assumes the data is immutable. The way to use it to prevent such things is with const/Readonly types, but ecosystem is not adopted for it unfortunately. So if you try to use Readonly for everything there will be type errors with libraries code
English
1
0
6
998
Flow
Flow@flowtype·
@jaydenfyi Exactly, better to have your type-checker actually enforce you're doing the right thing and prevent your app from crashing! The actual Flow error message is longer and describes: - Either make `Array<string>` and `Array<LogLine>` the same - Or make array a `ReadonlyArray`
English
0
0
4
839
Jayden Carey
Jayden Carey@jaydenfyi·
@flowtype In fairness, functions that mutate args like that are usually a code smell.
English
1
0
10
1.1K
Flow
Flow@flowtype·
Flow catches the crash before you ship it. More examples where Flow is safer: #toc-variance" target="_blank" rel="nofollow noopener">flow.org/en/docs/flow-v…
English
0
2
12
3.6K
Flow
Flow@flowtype·
TypeScript lets you pass Array<string> where Array<string | Error> is expected, so the function pushes an Error to your string array. Flow rejects it. TS Playground, 0 errors: #code/C4TwDgpgBAMg9gcxgSwHbQLxQM7AE5oJQA+UAonnnHgNwBQdAZgK6oDGwycqUAhgCb8A6rzypCACgA2iAFxQAgpV4gAPPCRoIAPgCUUAN50oUGQgB0YZtgAWE9AHdylahIBE-ZNgDWfKQFs4XCgWKSk3XV16AF8GNm5g-whsbF4EZPklPBVVXAJUBG0oLABtAF16AWFRcQKJJJS05KiGBtT07BKABjLzYDgAVTBIPABhXmwICSigA" target="_blank" rel="nofollow noopener">typescriptlang.org/play/?#code/C4… Flow Playground, rejects with an error: #1N4Igxg9gdgZglgcxALlAIwIZoKYBsD6uEEAztvhgE6UYCe+JADpdhgCYowa5kA0I2KAFcAtiRQAXSkOz9sAD0bZKcEYIncAdJCgkJ+RlQxjO3PgMXLV6rRJINaUDfMnTZIFhjATN0p9ZQQDCEJCBEMCTgwEH4hMnwhKABrKAgAdyh8OEywCLAAC3wANyo4LFxscWQuHnc2bCL8aFxaTQlaJXwWZlNa-nrmbFyJbDYAWnalXvMSJOwJAtox4VxcafdZ+cXl0RxKddioMAqqCY7sA5BEqCHKkiol7JKVDCdL69uSe8oliEZI6DcMYFDDZd66DAwbBjBDzEaUEhjMgSeFVGrmRJxUZjZhhOBkS4KJQqNROLQYL7KfR-ZQRCD7apmbAAX34kHqgUm2AABAAZCAIXnZHkAXm5ehUUAQ3IAPtyAKLUekAbgAOlB1TBEt44NBuew2AB1KhQbIIAAURAQyG5AEFqHQADz8wXCgB8AEpucB1dzuVbNIw4vlzTc0gqlZRzaqQGx8Ul9bgRKQJNytasYx6PWqoMz1eqdHpuWovhhYSQbfaaLRHRKzW7uWKANoAXRzBuNlFNUvNJfu5ez+agfbLlSbAAYW20IABVRjEgDCFOw5uzMRARWUJF1UECRXHmgAzABGAAcmnHIGZQA" target="_blank" rel="nofollow noopener">flow.org/try/#1N4Igxg9g
Flow tweet media
English
3
0
18
4.7K
Flow
Flow@flowtype·
Flow for TypeScript Users in 2026: 20+ side-by-side comparisons, verified against TypeScript 6.0.3 with 'strict' enabled: flow.org/en/docs/flow-v…
English
2
3
13
1.3K
Flow
Flow@flowtype·
Another: TypeScript only validates the signature of a type-guard, not the body. Flow validates the body and rejects predicates that lie about what they check.
Flow tweet media
English
2
1
11
1.4K
Flow
Flow@flowtype·
If your "Flow vs TypeScript" take is from 2021, it's out of date. Flow looks like TypeScript now - but it has pattern matching and React component syntax, while catching runtime crashes TypeScript waves through. Examples below. 👇
English
2
10
47
7.3K
Flow
Flow@flowtype·
Flow now supports Mapped Types, inspired by TypeScript. Read more about them in our new blog post: medium.com/flow-type/anno…
English
0
7
22
11.2K