终于可以方便的给 dva 的 dispatch 写类型声明.呜呜
https://github.com/microsoft/TypeScript/pull/40336
type TempStr<T extends string> = `test${T}` type SuffixStr = "abc" const str : TempStr<SuffixStr> = "testabc";
可以这样写声明了 好期待什么时候正式发布 4.1
![]() | 1 doublelam 2020-09-01 16:37:49 +08:00 哇,期待期待,很早就想有这种方式写类型了,要是支持正则就更好了 |
![]() | 2 myCupOfTea OP @doublelam 感觉以后会支持.. |
![]() | 3 yuanfnadi 2020-09-02 09:43:57 +08:00 我用 dva-model-creator |