Char2sGu / blogs

0 stars 0 forks source link

`const`类型断言 | Just Blogs #13

Open Char2sGu opened 3 years ago

Char2sGu commented 3 years ago

https://thenightmarex.github.io/blogs/2021/06/07/const-type-assertion/

as const 将原类型断言为不可变类型(只读类型),在一些特定场景下需要用到。