You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
node_modules/@peculiar/webcrypto/index.d.ts:4:10 - error TS2416: Property 'randomUUID' in type 'Crypto' is not assignable to the same property in base type 'Crypto'.
Type '() => string' is not assignable to type '() => `${string}-${string}-${string}-${string}-${string}`'.
Type 'string' is not assignable to type '`${string}-${string}-${string}-${string}-${string}`'.
4 public randomUUID(): string;
~~~~~~~~~~
Found 1 error in node_modules/@peculiar/webcrypto/index.d.ts:
And this is how the base Crypto interface is defined in TS 5:
interfaceCrypto{/** Available only in secure contexts. */readonlysubtle: SubtleCrypto;getRandomValues<TextendsArrayBufferView|null>(array: T): T;/** Available only in secure contexts. */randomUUID(): `${string}-${string}-${string}-${string}-${string}`;}
It all works after downgrading to TS 4.
The only fix I can think of would be using ${string}-${string}-${string}-${string}-${string} from now on, but that'd then break on TS 4, so it'd be a breaking change.
The text was updated successfully, but these errors were encountered:
gnarea
added a commit
to relaycorp/webcrypto-kms-js
that referenced
this issue
Mar 22, 2023
And this is how the base
Crypto
interface is defined in TS 5:It all works after downgrading to TS 4.
The only fix I can think of would be using
${string}-${string}-${string}-${string}-${string}
from now on, but that'd then break on TS 4, so it'd be a breaking change.The text was updated successfully, but these errors were encountered: