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[]; } } export = WebCrypto;