Piotr Lewandowski

@piotrlnet.bsky.social

Sharing experiences on TypeScript and Angular. Team Captain @dynatrace Core UI

Ever year or two I decide to go away from Notion to Obsydian, run the export and I'm reminding myself how hard it is to navigate for what actually "Current" is. Then I go back to Notion boards views splitted by current/done.

One of the most common traps of TypeScript. Record<string, *> is so convenient for map-like structures but can't be trusted. Falsely assumes that any string will **always** return a defined value, which breaks in runtime easily. My go-to replacement: Always wrap it with Partial<>

Code of TypeScript, representing the issue

Today I found myself at GPT :D I got a question I couldn't answer about Angular fakeAsync. A colleague then asked BingGPT, and it answered correctly. Turned out it connected the dots from StackOverflow post and my blog.

Bild

🇪🇺 European Commision is right about chargers. Hardware I've bought in **last three years** requires: 1️⃣USB-2 to Micro-USB 2️⃣USB-2 to USB-C 3️⃣USB-2 to Lighting 4️⃣USB-C to USB-C 5️⃣USB-C to Magnetic watch charger 6️⃣USB-2 to Magnetic watch charger 7️⃣USB-C to Macbook MagSafe

Similar issue is with updating: Jest 26 -> Jest 27 for 20k Angular Tests: ⚡ Jest 26: 2.5min ⛈️ Jest 27: 1h+ and timeouts but here it's known issue TypeScript compilation caching, and team is working on migration to swc to make it smoother https://github.com/kulshekhar/ts-jest/issues/1967

Piotr Lewandowski@piotrlnet.bsky.social · 4y ago

We're doing migration Angular project from TSLint to ESLint. 15k files and times are not looking good. 🌩️⛈️ TSLint: 6min for whole project ESLint: 70min for whole project

Work on the app for 4 years. Decide to switch technology. Work for rewrite for 3 years. Decide to switch technology. Work for another rewrite for 2 years. Decide you need to support everything, everywhere, backport features to all previous tech. Hello World.