サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
GWの過ごし方
wolfgirl.dev
I saw a post by qntm and remembered I had a playground with a similar idea. I then expanded that playground into a (probably non-exhaustive) list of ways to cast between arbitrary1 types in Typescript: Convention: The as Operator Ah, good ol' as: const cast = <A, B,>(a: A): B => a as unknown as B; We can't just directly do a as B because Typescript is smart enough to warn us about that, at least.
このページを最初にブックマークしてみませんか?
『wolfgirl.dev』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く