From 6af89134f0c36d295b4090cabf83219a912a73a1 Mon Sep 17 00:00:00 2001 From: microshine Date: Thu, 14 Feb 2019 13:58:38 +0300 Subject: [PATCH] Update d.ts --- index.d.ts | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) 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[]; +}