fgnass@indieweb.social banner
fgnass@indieweb.social

@fgnass

Author of Capri, node-dev, oazapfts, typed-rpc, react-api-query, classname-variants and lots of other small modules.

Hamburg Katılım Haziran 2008
686 Takip Edilen1.2K Takipçiler
Matthew Phillips
Matthew Phillips@matthewcp·
In TypeScript, having both required and optional type params seems to break inference. Am I doing something wrong here or is there another way to do this? #code/JYOwLgpgTgZghgYwgAgEoFcQmsg3gKGSOSkwAoBKALmQDcB7YAEwG58BffMATwAcUMWaABU+KALx5CxbAHdKNQdigd8XMWggJ6UJgGcAPAElkEAB6QQ+zdt0G9YKKADmAGjSZlo-gD4fySQJiZABtAGtkUGQwiG56GGQjAF0aI3CktnY2fBhMBDBgehBkBCgIOEhhAAsXA2kiAFVXeuRhUwsIKz0PIShvCR6vMWbg1HbLa1QtHSZ7Rxd3JRExf0kp21mHJxA3QeXffB8yFoBbbn6aYRHiMo29RXxqGxnDVH8gm4gwdChi3HZkHBunAQNxMmoePxkAAFaB6IoBPBZfDaEAOZBnfqIhAAGyB3Q+RFIIEo-1UKLxem6AHlsFJgsTSZxOCiiuiwDUdtiyhUINVarCoPCQEdMcN6cRaRAOBRshyXEA" target="_blank" rel="nofollow noopener">typescriptlang.org/play/?#code/JY…
English
2
0
2
1.2K
fgnass@indieweb.social
[email protected]@fgnass·
@_developit what happened to the reverse transpiler project you used to work on? It sounded so promising!
English
1
0
0
48
David Peek
David Peek@dpeekdotcom·
@fgnass Where are Number and String defined?
English
1
0
0
43
fgnass@indieweb.social
[email protected]@fgnass·
🧙‍♂️ My new favorite method for checking types at both runtime and compile time:
fgnass@indieweb.social tweet media
English
2
0
6
678
fgnass@indieweb.social
[email protected]@fgnass·
@housecor In situations where it's only important to check runtime types and not constraints as min/max, I can highly recommend type-assurance. It's < 1kB and has a neat way to define schemas:
fgnass@indieweb.social tweet media
English
0
0
5
441
Cory House
Cory House@housecor·
Problem: TypeScript can't validate runtime data. Solution: Use Zod to validate runtime data. 6 things I validate at runtime via Zod: ✅ URL ✅ Cookie ✅ Form inputs ✅ Environment variables ✅ localStorage/sessionStorage ✅ JSON in REST API responses Examples:
Cory House tweet media
English
41
98
983
174.3K
fgnass@indieweb.social
[email protected]@fgnass·
I really dig the new API for aborting requests:
fgnass@indieweb.social tweet media
English
0
0
1
240
Shayan
Shayan@ImSh4yy·
What's your favorite less-known npm package? I'll go first, I've been loving `simple-statistics` these days.
English
26
2
51
19K
Dylel
Dylel@DylanZemek·
Anyone know how to narrow this type at runtime, can't use array.every? #typescript
Dylel tweet media
English
2
0
1
67
fgnass@indieweb.social
[email protected]@fgnass·
Did you ever hesitate to add a library like zod to your project because you didn't want to add 13kb to your bundle size for a bunch of runtime checks? With github.com/fgnass/type-as… you get a lot of the features in just 443 bytes 😱
fgnass@indieweb.social tweet media
English
1
2
10
1.1K
jser
jser@JSer_ZANP·
@fgnass why don't we just use zod?
English
1
0
0
97
[email protected] retweetledi
Adam Argyle
Adam Argyle@argyleink·
View Transition powered drag n' drop! just drag events then swappin DOM, #CSS view transitions doin all the animation work (which it's GREAT AT) 🤯 that animated emoji don't miss a beat try it! codepen.io/argyleink/pen/…
Adam Argyle@argyleink

I can't stop seeing #CSS View Transitions! here I'm animating new `node.textContent`, letting the browser handle the morph while bringing in custom animations (and stagger) for stage enter and stage exit 🥲 try it codepen.io/argyleink/pen/…

English
20
233
2K
351.6K
fgnass@indieweb.social
[email protected]@fgnass·
@FronteersConf Oh no! If I had known that the event was in jeopardy, I would have bought a ticket, even though I already attended @Future_Frontend this year. I have fond memories of my last Fronteers and this year's lineup sounded fantastic. 😢
English
1
0
1
316
Fronteers Conference
Fronteers Conference@FronteersConf·
+++ Fronteers Conference 2023 cancelled 😭+++ Despite a big marketing push in the last few weeks, we didn't manage to sell enough tickets to make it possible for us to hold this year's conference. The financial risk would have been too big. More info at fronteersconf.org
Fronteers Conference tweet media
English
22
4
36
49.5K
[email protected] retweetledi
Thai Pangsakulyanont
Thai Pangsakulyanont@dtinth·
Today I learned: By using an HDR <video>, a website can display a very bright white, like ~7 times brighter than #FFFFFF, on an iPhone/iPad. This can be used to e.g. show a bright QR code for easy scanning despite user’s low brightness settings. notes.dt.in.th/HDRQRCode
Thai Pangsakulyanont tweet media
English
99
745
6.6K
1.4M
fgnass@indieweb.social
[email protected]@fgnass·
Will frontend development become obsolete any time soon? Great panel discussion here at #FutureFrontend about AI 🤖
fgnass@indieweb.social tweet media
Helsinki, Finland 🇫🇮 English
0
0
3
283
fgnass@indieweb.social
[email protected]@fgnass·
The historic Helsinki Stock Exchange is such a great venue for #FutureFrontend. Just look at these amazing control panels here on stage 🤩
fgnass@indieweb.social tweet media
Helsinki, Finland 🇫🇮 English
0
1
8
674