Zilong Yao
Zilong Yao
> npm 链接 https://www.npmjs.com/package/javascript-algorithms-and-data-structures > > 我用纱线添加这个库 > > ``` > yarn add javascript-algorithms-and-data-structures > ``` > > 但我不能使用导入或需要这个库 > > o(╥﹏╥)o This library may help you. https://github.com/ZLY201/js-sdsl
Should add iterator and other functions.
Related issues: - https://github.com/luin/ioredis/issues/1649 - https://github.com/sidorares/node-mysql2/issues/1629
@noname0310 Are you interested in this question and have time to solve it? This requires us to support single module loading.
> Are we supposed to load only the packages that the user wants to use `require`? Yes, my idea is to implement `const xxx = require("js-sdsl/xxx");`.
Because require cannot be typed. `require` uses commonjs and it's default type is any. `const Vector = require("js-sdsl/dist/cjs/container/SequentialContainer/Vector").default as typeof import("js-sdsl/dist/cjs/container/SequentialContainer/Vector").default; ` We do not recommend import by this way....
Yes, one of the way is to publish independent package. But this is a bit troublesome because I didn't think about it when I first wrote. Do we have a...
Some packages like `ioredis` just use `tsc` to do compile.
https://github.com/js-sdsl/js-sdsl/actions/runs/3163428534/jobs/5150981144 It seems that github actions doesn't support local `ts-node` command even it is installed. I will fix it next version and publish isolate packages tonight locally.
All isolate packages published. I'll do a test for them later.