Dominik Brack retweeted
TypeScript: .map() only works for Arrays, not for tuples.
Solution:
function mapPair<S, T>(pair: readonly [S, S], mapFunc: (value: S, index: number) => T): [T, T] {
return [
mapFunc(pair[0], 0),
mapFunc(pair[1], 1),
];
}
typescriptlang.org/play?ssl=…
Dominik Brack retweeted
Thank you, “unlock with Watch when facemask is on” engineers and designers. – at San Francisco, CA
Dominik Brack retweeted
Fixing memory leaks in web applications: bit.ly/fixing-memory ~ a guide to common causes of JavaScript memory leaks, how to identify and fix them 🌊🔧
Dominik Brack retweeted
How to update and extract data from large immutable data structures in TypeScript using the lens pattern.
📄 The Lens Pattern in TypeScript
✍️ by Simon Vie
🏷 #TypeScript #JavaScript
functional.christmas/2019/6
Dominik Brack retweeted
TypeScript 3.7 is finally here!
✔ Optional Chaining & Coalescing
✔ Assertion Functions
✔ .d.ts Emit From .js Files
✔ Smarter Control Flow Analysis
✔ Flatter Error Messages
and more! Check out the blog post today! devblogs.microsoft.com/types…
Dominik Brack retweeted
This is huge: nominal types are coming to TypeScript🥳
🙋♂️ Motivation: github.com/microsoft/TypeScr…
👨🏭 Pull request: github.com/microsoft/TypeScr…
Dominik Brack retweeted
ES proposal: optional chaining
2ality.com/2019/07/optional-…
Dominik Brack retweeted
Now that @CreditSuisse is going to support Apple Pay as the first of the big financial institutions in Switzerland, it's time to reconsider. What are you going to do @zkb_ch, @UBS, @PostFinance?
Dominik Brack retweeted
Cheat sheet: creating Arrays
2ality.com/2018/12/creating-…
Dominik Brack retweeted
The United States Partitioned by Closest National Park redd.it/a5pkwm #MapPorn
Dominik Brack retweeted
JSON hijacking allows an attacker to extract data from a JSON API you serve. The solution? Start the JSON response with a for loop (!). #security dev.to/antogarand/why-facebo…
Dominik Brack retweeted
Love how the side-effects of global window listeners can be totally encapsulated with hooks.
For example, this is used like: const {x, y} = useCoordinates();
The consumer doesn't have to care or worry about the details of window event listening. 😍
Dominik Brack retweeted
We wrote about how we collaborate using physical Kanban boards, have a look!
blog.interactivethings.com/p…
Dominik Brack retweeted
Variadic functions are coming to #TypeScript! ”Took us four years to get expressive enough to fix this one!” — @ahejlsberg
github.com/Microsoft/TypeScr…
Dominik Brack retweeted
After using TypeScript on this app, I never want to go back to either JS or Flow
Dominik Brack retweeted
HTTP Headers FTW
commitstrip.com/2018/08/24/h…
Dominik Brack retweeted
Jest 23.5 now supports .each statements: lay out multiple scenarios in a tabular format! Much more concise and readable than copy/pasting tests for each scenario.
Example with 4 scenarios:
Before: 68 lines, copy/pasted 👎
After: 12 lines 👍
More info: buff.ly/2ODRnJk



























