Wk-notes-11-21-Add-Typescript
Attempt to add typescript progressively into a js project
Add
.d.ts
, in the js file, using@typedef
and JSDocimport
to refer to the interface/type you defined
Use
@extends
to infer a class, and now you have the type for props and state
Last updated
Was this helpful?