Open kumaheiyama opened 2 years ago
I tried forking the repo and updating to webcrypto-core 1.2.1
, and the build works. However I'm getting the following error message when trying with the latest 1.4.0
:
src/lib.ts → build/index.js, build/index.es.js...
[!] (plugin rpt2) Error: C:/Source/webcrypto-liner/src/subtle.ts(223,26): semantic error TS2339: Property 'apply' does not exist on type '((algorithm: AlgorithmIdentifier, data: BufferSource, ...args: any[]) => Promise<ArrayBuffer>) | ProviderStorage | ... 10 more ... | ((format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier, unwrappedKeyAlgorithm: AlgorithmIdentifier, extractable: boolean, keyUsag...'.
Property 'apply' does not exist on type 'ProviderStorage'.
src\subtle.ts
Error: C:/Source/webcrypto-liner/src/subtle.ts(223,26): semantic error TS2339: Property 'apply' does not exist on type '((algorithm: AlgorithmIdentifier, data: BufferSource, ...args: any[]) => Promise<ArrayBuffer>) | ProviderStorage | ... 10 more ... | ((format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier, unwrappedKeyAlgorithm: AlgorithmIdentifier, extractable: boolean, keyUsag...'. Property 'apply' does not exist on type 'ProviderStorage'.
at error (C:\Source\webcrypto-liner\node_modules\rollup\dist\shared\rollup.js:5239:30)
@kumaheiyama I've published the fixed version webcrypto-liner@1.3.0
. Please try it
Sorry for late response, seems to be working with @1.3.1
!
Thanks @microshine
When using webcrypto-liner with typescript >4.2.4 I get the same error as discussed in this webcrypto-core issue.
Looking at the webcrypto-liner
package.json
it is still using"webcrypto-core": "^1.2.0"