PeculiarVentures / webcrypto-core

A input validation layer for WebCrypto polyfills.
MIT License
29 stars 13 forks source link

Incompatible with TypeScript 4.4 #38

Closed ffflorian closed 3 years ago

ffflorian commented 3 years ago

When using webcrypto-core with TypeScript 4.4, I get the following errors:

node_modules/webcrypto-core/build/types/aes/cmac.d.ts:6:37 - error TS2304: Cannot find name 'AesCmacParams'.

6     checkAlgorithmParams(algorithm: AesCmacParams): void;
                                      ~~~~~~~~~~~~~

node_modules/webcrypto-core/build/types/aes/cmac.d.ts:7:32 - error TS2304: Cannot find name 'AesCmacParams'.

7     abstract onSign(algorithm: AesCmacParams, key: CryptoKey, data: ArrayBuffer, ...args: any[]): Promise<ArrayBuffer>;
                                 ~~~~~~~~~~~~~

node_modules/webcrypto-core/build/types/aes/cmac.d.ts:8:34 - error TS2304: Cannot find name 'AesCmacParams'.

8     abstract onVerify(algorithm: AesCmacParams, key: CryptoKey, signature: ArrayBuffer, data: ArrayBuffer, ...args: any[]): Promise<boolean>;

In my tsconfig.json, the required libs are added already:

...
    "lib": ["dom", "esnext"],
...
microshine commented 3 years ago

Fixed in webcrypto-core@1.2.1. Please try it

ffflorian commented 3 years ago

It works, thanks!