Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible with TypeScript 4.4 #89

Open
kumaheiyama opened this issue Dec 6, 2021 · 3 comments
Open

Incompatible with TypeScript 4.4 #89

kumaheiyama opened this issue Dec 6, 2021 · 3 comments
Assignees

Comments

@kumaheiyama
Copy link

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"

@kumaheiyama
Copy link
Author

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)

@microshine
Copy link
Contributor

@kumaheiyama I've published the fixed version [email protected]. Please try it

@kumaheiyama
Copy link
Author

Sorry for late response, seems to be working with @1.3.1!
Thanks @microshine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants