This is a follow-up on AKASHAorg/easy-web-crypto#7 in an effort to typescriptify secure-webstore (this project), so it can be used in TypeScript projects like Angular.
In store.ts I also made some code changes outside of just TypeScriptifying it. It makes a bit more use of async-await. This makes the code-flow a bit nicer in my view and it was easier to make it compile in TypeScript this way. Of course the tests still run, but maybe it needs some special attention during review.
Also I renamed src/index.js to src/secure-webstore.ts, so WebPack also names the TypeScript definition output file secure-webstore.d.ts. There's also a generated file called dist/store.d.ts. But since WebPack adds the TypeScript compile output from store.ts to dist/secure-webstore.js too, the store.d.ts file is probably useless for users of this lib. But since this seems only an auxiliary file I think this doesn't matter too much.
Issues that will be closed
6
Testing
Tested with existing tests. They all still succeed.
Description
This is a follow-up on AKASHAorg/easy-web-crypto#7 in an effort to typescriptify secure-webstore (this project), so it can be used in TypeScript projects like Angular.
In store.ts I also made some code changes outside of just TypeScriptifying it. It makes a bit more use of async-await. This makes the code-flow a bit nicer in my view and it was easier to make it compile in TypeScript this way. Of course the tests still run, but maybe it needs some special attention during review.
Also I renamed src/index.js to src/secure-webstore.ts, so WebPack also names the TypeScript definition output file secure-webstore.d.ts. There's also a generated file called dist/store.d.ts. But since WebPack adds the TypeScript compile output from store.ts to dist/secure-webstore.js too, the store.d.ts file is probably useless for users of this lib. But since this seems only an auxiliary file I think this doesn't matter too much.
Issues that will be closed
6
Testing
Tested with existing tests. They all still succeed.