diff --git a/index.d.ts b/index.d.ts index 5687371..a347040 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,21 +1,13 @@ -type NativeCrypto = Crypto; -type NativeSubtleCrypto = SubtleCrypto; -type NativeCryptoKey = CryptoKey; - -declare namespace WebCrypto { - - class Crypto implements NativeCrypto { - public subtle: SubtleCrypto; - public getRandomValues(array: T): T; - } - - class CryptoKey implements NativeCryptoKey { - public algorithm: KeyAlgorithm; - public extractable: boolean; - public type: KeyType; - public usages: KeyUsage[]; - } +import * as core from "webcrypto-core"; +export declare class Crypto implements core.NativeCrypto { + public subtle: SubtleCrypto; + public getRandomValues(array: T): T; } -export = WebCrypto; +export declare class CryptoKey implements core.NativeCryptoKey { + public algorithm: KeyAlgorithm; + public extractable: boolean; + public type: KeyType; + public usages: KeyUsage[]; +}