Open 2wheeh opened 3 weeks ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
lexical | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Apr 23, 2024 10:33am |
lexical-playground | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Apr 23, 2024 10:33am |
I tried to improve readability and type safety.
Changes
eqeqeq
eslint rule toalways
, which forces===
,!==
instead of==
,!=
.invariant
.Further steps
undefined
andnull
where one of both would suffice.Developing a general method to infer correct types from arrays or objects considering when index or key is not valid.->--noUncheckedIndexedAccess
introduced in TS4.1 is for this.__lexical**
fields on the global namespace (mostly with@ts-expect-error: internal field
), similar to the way in devtools.