I recently tried to use your library for a project, but encountered issues while compiling with strict-mode on:
node_modules/simple-crypto-js/src/SimpleCrypto.ts:9:22 - error TS7006: Parameter 'secret' implicitly has an 'any' type.
9 public constructor(secret) {
~~~~~~
node_modules/simple-crypto-js/src/SimpleCrypto.ts:23:11 - error TS2322: Type 'string | null' is not assignable to type 'string'.
Type 'null' is not assignable to type 'string'.
23 const string: string = typeof data == "object" ? JSON.stringify(data) : typeof data == "string" || typeof data == "number" || typeof data == 'boolean' ? data.toString() : null;
~~~~~~
node_modules/simple-crypto-js/src/SimpleCrypto.ts:31:77 - error TS2345: Argument of type '{ iv: string | WordArray; padding: Padding; mode: Mode; }' is not assignable to parameter of type 'CipherOption'.
Types of property 'iv' are incompatible.
Type 'string | WordArray' is not assignable to type 'string | undefined'.
Type 'WordArray' is not assignable to type 'string'.
31 const encrypted: CryptoJS.WordArray = CryptoJS.AES.encrypt(string, key, {
~
32 iv: initialVector,
~~~~~~~~~~~~~~~~~~~~~~~~
...
34 mode: CryptoJS.mode.CBC
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
35 });
~~~~~
I have created a MR to fix these issues, and other small issues :)
Hi,
I recently tried to use your library for a project, but encountered issues while compiling with strict-mode on:
I have created a MR to fix these issues, and other small issues :)