warehouse
warehouse copied to clipboard
Replace typescript
One of the reasons why warehouse is hardly maintained is that it doesn't understand the type. However, the warehouse package is too complex to be typed with DefinitelyTyped, and it is quite possible to make typing errors.
@segayuu
IMHO we should release warehouse v3.0
and upgrade hexo's dependency v3.0
before migrate to TypeScript.
I just added warehouse@3 as part of hexo v4 milestone.
@segayuu
What point of view should we check? Just migrate js to ts?
For example, some instance member can specify private
. Should we review such code?
The purpose of this PR is to set noImplicityAny
to true, and strict typing from that achievement is an arbitrary position. If the private
attribute is added, it is necessary to modify the test file implementation.
Do we have updates on this pr?
For now I think that hexo-warehouse is the best json db for tiny apps :p Waiting for ts updates.
I think the same @YuJianghao
@hexojs/core I have been trying to migrate to TypeScript since last week.
I think maybe we can migrate it just a little bit more.
But, some tests have errors. I assume it causes by rfdc
in src/model.ts
. (Maybe deepcopy does not works well)
https://github.com/hexojs/warehouse/pull/60/files#diff-6bfea2ec3c1d21c90d6e1ecd704f380a6eeb44521e1da1a87b6a48ea691b6a43R2-R3
Dose someone would you help?
Thank you :)
P.S: solved
@hexojs/core Now all tests are green.
@hexojs/core Now ready for review. Does someone would you please review?
I think we can improve our code more type safely and robustly. However, I think we need more time to do it. Also, I will fix if the current PR has a critical problem. But, IMHO I want to merge this PR once and improve our code step by step.
Thank you :)
Updated: Merge the master
branch to this PR branch.
@hexojs/core Can we merge this? or need more review?