Moving to TS
Why
-
Fewer Bugs
-
Better DX
-
Edge improvements
Fever bugs


Possible bug
Fix, after it brakes on test or prod
API removal/rename

There is no foo method anymore.
And we could have like 30+ places like this in a project



Things like a simple typo
Better
Developer Experience



JSX api help


JSX api help (custom component)


// Before
if (foo && foo.bar && foo.bar.baz) {
// ...
}
// After-ish
if (foo?.bar?.baz) {
// ...
}
Optional Chaining


VSCode
IntelliSense works using TypeScript, even in projects without TypeScript
IntelliSense - code completion, parameter info, quick info, and member lists
Edge engine improvements
Edge engine docgen version
- data missing (reducers)
- server widgets
- it's dangerous to refactor widget scheme
- scheme shape duplication
- using server props, without declaring them
- hard to maintain big projects
- the build is slow, as we use Docgen library
- scene generation is too complicated to improve (abstract syntax trees)
- no access to components.json before the main src build, no way to get default values for widgets
TS version
- data filled with a default value
- server widgets
- easy to refactor widget schema
- no scheme shape duplication
- no way, of using server props, without declaring them
- easy to maintain
- Webpack build doesn't need to parse statsĀ
- scene generation is simple
- access to components.json before the main src build










Using widget string

Using widget repeater

Using auto generated interface

Using several widgets together

Updatgin schema
Go to vs code
deck
By Semyon Radionov
deck
- 309