Update d.ts
This commit is contained in:
parent
95ac3d7a9e
commit
6af89134f0
|
@ -1,21 +1,13 @@
|
||||||
type NativeCrypto = Crypto;
|
import * as core from "webcrypto-core";
|
||||||
type NativeSubtleCrypto = SubtleCrypto;
|
|
||||||
type NativeCryptoKey = CryptoKey;
|
|
||||||
|
|
||||||
declare namespace WebCrypto {
|
|
||||||
|
|
||||||
class Crypto implements NativeCrypto {
|
|
||||||
public subtle: SubtleCrypto;
|
|
||||||
public getRandomValues<T extends Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | null>(array: T): T;
|
|
||||||
}
|
|
||||||
|
|
||||||
class CryptoKey implements NativeCryptoKey {
|
|
||||||
public algorithm: KeyAlgorithm;
|
|
||||||
public extractable: boolean;
|
|
||||||
public type: KeyType;
|
|
||||||
public usages: KeyUsage[];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
export declare class Crypto implements core.NativeCrypto {
|
||||||
|
public subtle: SubtleCrypto;
|
||||||
|
public getRandomValues<T extends Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | null>(array: T): T;
|
||||||
}
|
}
|
||||||
|
|
||||||
export = WebCrypto;
|
export declare class CryptoKey implements core.NativeCryptoKey {
|
||||||
|
public algorithm: KeyAlgorithm;
|
||||||
|
public extractable: boolean;
|
||||||
|
public type: KeyType;
|
||||||
|
public usages: KeyUsage[];
|
||||||
|
}
|
||||||
|
|
Reference in New Issue