diff --git a/src/key/import.ts b/src/key/import.ts index 12d49d8367..f27f6e9029 100644 --- a/src/key/import.ts +++ b/src/key/import.ts @@ -130,7 +130,7 @@ export async function importSPKI( spki: string, alg: string, options?: PEMImportOptions, -): Promise> { +): Promise { if (typeof spki !== 'string' || spki.indexOf('-----BEGIN PUBLIC KEY-----') !== 0) { throw new TypeError('"spki" must be SPKI formatted string') } @@ -180,7 +180,7 @@ export async function importX509( x509: string, alg: string, options?: PEMImportOptions, -): Promise> { +): Promise { if (typeof x509 !== 'string' || x509.indexOf('-----BEGIN CERTIFICATE-----') !== 0) { throw new TypeError('"x509" must be X.509 formatted string') } @@ -226,7 +226,7 @@ export async function importPKCS8( pkcs8: string, alg: string, options?: PEMImportOptions, -): Promise> { +): Promise { if (typeof pkcs8 !== 'string' || pkcs8.indexOf('-----BEGIN PRIVATE KEY-----') !== 0) { throw new TypeError('"pkcs8" must be PCKS8 formatted string') } diff --git a/src/runtime/interfaces.d.ts b/src/runtime/interfaces.d.ts index 65e21495a8..615973ac4a 100644 --- a/src/runtime/interfaces.d.ts +++ b/src/runtime/interfaces.d.ts @@ -98,7 +98,7 @@ export interface JWKImportFunction { (jwk: JWK): AsyncOrSync } export interface PEMImportFunction { - (pem: string, alg: string, options?: PEMImportOptions): AsyncOrSync> + (pem: string, alg: string, options?: PEMImportOptions): AsyncOrSync } interface ExportFunction { (key: unknown): AsyncOrSync