Matheus Cardoso ๐Ÿ‡บ๐Ÿ‡ฆ's Avatar

Matheus Cardoso ๐Ÿ‡บ๐Ÿ‡ฆ

@cardo.so.bsky.social

https://github.com/cardoso https://linkedin.com/in/cardosodev

45 Followers  |  224 Following  |  28 Posts  |  Joined: 07.02.2024  |  2.3748

Latest posts by cardo.so on Bluesky

A TypeScript function that is one big switch statement, each case clause seemingly doing the same thing.

A TypeScript function that is one big switch statement, each case clause seemingly doing the same thing.

I take no joy reporting that this optimization boosts our type validation code performance by up to 2x.

28.11.2024 22:59 โ€” ๐Ÿ‘ 105    ๐Ÿ” 13    ๐Ÿ’ฌ 10    ๐Ÿ“Œ 3
Post image

Pro tip: Don't write your #TypeScript union types by hand, use a Type Catalog instead!

Why are Type Catalogs better?

Find out in the thread ๐Ÿงต ๐Ÿ‘‡

22.02.2025 17:02 โ€” ๐Ÿ‘ 27    ๐Ÿ” 4    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0
Video thumbnail

Here is another reason I like Type Catalogs.

They can easily be transformed with Mapped Types!

Full code snippet in thread ๐Ÿงต๐Ÿ‘‡

23.02.2025 16:26 โ€” ๐Ÿ‘ 18    ๐Ÿ” 3    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Dev / Build (Vite / Rolldown)
โ€ข Test / Bench (Vitest)
โ€ข Lint / Format (Oxc)
โ€ข Documentation (Vitepress)
โ€ข Run TypeScript directly in Nodejs
โ€ข Project scaffolding / code generation
โ€ข Monorepo task orchestration / caching

Dev / Build (Vite / Rolldown) โ€ข Test / Bench (Vitest) โ€ข Lint / Format (Oxc) โ€ข Documentation (Vitepress) โ€ข Run TypeScript directly in Nodejs โ€ข Project scaffolding / code generation โ€ข Monorepo task orchestration / caching

Dang if @vite.dev Plus has all this, canโ€™t wait for Vite Plus Pro Max

14.03.2025 13:52 โ€” ๐Ÿ‘ 116    ๐Ÿ” 9    ๐Ÿ’ฌ 6    ๐Ÿ“Œ 1
Displaying a graphic of how it's not just people with permanent needs that can benefit from inclusive design, there are also temporary and situational needs. For example, someone who's deaf, vs has an ear infection, vs in a loud bar

The full list, with little characters representing each is:

Touch: one arm, arm injury, new parent holding a baby
See: Blind, Cataract, distracted driver
Hear: Deaf, ear infection, bartender 
Speak: non-verbal, laryngitis, heavy accent (a picture of a Viking)

Displaying a graphic of how it's not just people with permanent needs that can benefit from inclusive design, there are also temporary and situational needs. For example, someone who's deaf, vs has an ear infection, vs in a loud bar The full list, with little characters representing each is: Touch: one arm, arm injury, new parent holding a baby See: Blind, Cataract, distracted driver Hear: Deaf, ear infection, bartender Speak: non-verbal, laryngitis, heavy accent (a picture of a Viking)

Accessibility doesn't only help a small group of people. Accessibility helps everyone

24.01.2025 13:44 โ€” ๐Ÿ‘ 774    ๐Ÿ” 235    ๐Ÿ’ฌ 23    ๐Ÿ“Œ 19

Just a timeout

08.03.2025 13:41 โ€” ๐Ÿ‘ 7    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Preview
Sponsor @43081j on GitHub Sponsors Maintainer of chai, parse5, various eslint plugins, & more. One of the e18e.dev leads. Core contributor to lit and modernweb.

I setup my GitHub sponsors not long ago but didn't really mention it anywhere. If you appreciate what I do, these sponsorships do help a lot ๐Ÿ™
My focus this year is all over like every year ๐Ÿ˜… (e18e, chai, tinylibs, chokidar, vueuse, and much more). But I will keep on top of them all

04.03.2025 17:07 โ€” ๐Ÿ‘ 35    ๐Ÿ” 13    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 1

Can't give much right now but love the work you're doing!

07.03.2025 18:09 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

I appreciate it very much. I'm also curious about how to get listed as a maintainer. I'm in the package.json (linked below), but still "no maintainers found": socket.dev/npm/package/...

06.03.2025 23:13 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Post image

@socket.dev how can I fix this? ๐Ÿ˜ฎโ€๐Ÿ’จ

It's literally vite's convention for plugins: vite.dev/guide/api-pl...

06.03.2025 16:59 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

I stand with Ukraine and the truth that Russia is an invader.

02.03.2025 14:16 โ€” ๐Ÿ‘ 69    ๐Ÿ” 3    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 6

ะกะปะฐะฒะฐ ะฃะบั€ะฐั—ะฝั–

28.02.2025 22:47 โ€” ๐Ÿ‘ 26    ๐Ÿ” 6    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Setting hover state in React components is so 2013. You can set hover state with CSS variables and can skip all those JS re-renders. ๐Ÿค“

28.02.2025 12:28 โ€” ๐Ÿ‘ 15    ๐Ÿ” 1    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0

All the many other problems aside, CoderByte doesn't do any sanitization of logs before it hits their "in-browser" console. Not even HTML. Yes, it will display anything, buttons, iframes, you name it, and sometimes it will crash and burn. It's funny, but sad that it's used to evaluate candidates.

27.02.2025 21:57 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
End-to-End Encrypted Chat with the Web Crypto API When transmitting or storing user data, especially private conversations, it's essential to consider...

I was a big fan of dev.to ~4 years ago. I wrote and read great articles, tons of meaningful engagements, deep discussions that would help me learn and improve my writing (example linked).

I can barely find any good content there anymore, which also makes me not want to write. Also, the bugs.

26.02.2025 13:01 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

This is nice, we should add something like this to Lit!

I wonder if there's an opportunity for a WCCG community protocol to use common performance markers?

25.02.2025 02:28 โ€” ๐Ÿ‘ 1    ๐Ÿ” 1    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0

Oh thatโ€™s a good point . I think there is plenty of opportunity. The lifecycle is the same (in theory) for web components frameworks. And as you can imagine, naming was the โ€œhard partโ€ about doing theses markers haha, I think weโ€™re still going to rename them.

25.02.2025 13:30 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
two men in suits are talking and the words we need to go deeper are on the screen ALT: two men in suits are talking and the words we need to go deeper are on the screen

This makes me want to go deeper and start contributing to Chrome DevTools itself. Time to dig through what @addyosmani.bsky.social and team are cooking :)

24.02.2025 17:56 โ€” ๐Ÿ‘ 3    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
A page from the salesforce platform with chrome developer tools opened in the performance tab showing detailed metrics for lightning web components

A page from the salesforce platform with chrome developer tools opened in the performance tab showing detailed metrics for lightning web components

This is why I love contributing to Open Source: My PR adding support for Chrome DevTools's Performance Panel Extensions is now GA in the Salesforce platform. โค๏ธโšก๏ธ

github.com/salesforce/l...

24.02.2025 17:56 โ€” ๐Ÿ‘ 5    ๐Ÿ” 1    ๐Ÿ’ฌ 3    ๐Ÿ“Œ 0
Preview
a man in a pink costume is peeking out from behind a wall . Alt: Pink guy says hey boss
22.02.2025 21:46 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Helping bring Node-API to React Native ๐Ÿซก

22.02.2025 15:41 โ€” ๐Ÿ‘ 13    ๐Ÿ” 2    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Yeah, similar thing, this story was Vienna to Paris, checkin was weirder and confusing at the time due to covid. I really took a chance flying to the other airport in Paris and taking a train to CDG, getting tested there in time. Boarding gate attendants look at me like I was a ghost.

22.02.2025 14:44 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Yeah, it varies a lot by airline and region, but in general at least calling the airline directly seems to yield the best results than talking to people at the airport. Best to try both anyway. Glad you got the refund! Enjoy Barcelona ๐Ÿ™

22.02.2025 14:38 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

People at the airport kept telling me I was screwed, would need to pay full price and wait days, so I had to try my luck and it worked perfectly. Lots of perplexed โ€œhow are you here?โ€ looks at the second leg made me feel like a wizard.

22.02.2025 14:32 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

If you miss the first leg of a flight you get all others cancelled, but if you manage to get a low-cost flight to get to the second leg in time, call the airline and they will uncancel them. At least itโ€™s true for AirFrance. Dont ask any other way but by phone though.

22.02.2025 14:26 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0

My first time missing any flight at all was from Kyiv to Sรฃo Paulo. Paid 350 euros to reschedule, no money, slept 3 days at the airport. I cried like a baby. It made me so good at not missing flights and finding alternatives when I inevitably did it again ๐Ÿ˜…

22.02.2025 14:21 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Preview
publint Lint npm packages to ensure the widest compatibility across environments

Got docs set up for publint today! A bit hard to get documentation frameworks to support SPA fallback, and I had to mix Svelte in Vue, but it kinda works. publint.dev/docs/

21.02.2025 07:48 โ€” ๐Ÿ‘ 41    ๐Ÿ” 3    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
GitHub - publint/publint: Lint packaging errors Lint packaging errors. Contribute to publint/publint development by creating an account on GitHub.

Just randomly discovered this gem by @bluwy.me . It's exactly what I was most missing in my workflow. I can't give much right now, but I had to become a sponsor. Thank you!

21.02.2025 18:03 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

I believe @pnpm.io is leading the pack in terms of out-of-the-box dependency management in monorepositories and more recently supply chain risk management. Are people getting the same benefits from modern yarn or npm? How do you set those up?

20.02.2025 15:53 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Yeah, I believe it does the right thing. I donโ€™t remember if thereโ€™s a lint for it, probably. Also, my understanding is that code running at the top-level of the file is also kind of a describe block with similar pitfalls, but not this one in particular since you canโ€™t .skip easily

20.02.2025 15:33 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

@cardo.so is following 20 prominent accounts