mirror of
https://github.com/danbulant/jose
synced 2026-05-19 04:18:52 +00:00
style: lint .d.ts files
This commit is contained in:
parent
b02902ef88
commit
e6e789c8dd
17 changed files with 65 additions and 56 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,6 +1,6 @@
|
|||
# crypto runtime copies
|
||||
src/runtime/*.ts
|
||||
+src/runtime/*.d.ts
|
||||
!src/runtime/*.d.ts
|
||||
|
||||
# cjs clone of the test suite
|
||||
test/cjs
|
||||
|
|
|
|||
6
src/runtime/aesgcmkw.d.ts
vendored
6
src/runtime/aesgcmkw.d.ts
vendored
|
|
@ -1,3 +1,3 @@
|
|||
import type { AesGcmKwUnwrapFunction, AesGcmKwWrapFunction } from './interfaces.d';
|
||||
export declare const wrap: AesGcmKwWrapFunction;
|
||||
export declare const unwrap: AesGcmKwUnwrapFunction;
|
||||
import type { AesGcmKwUnwrapFunction, AesGcmKwWrapFunction } from './interfaces.d'
|
||||
export declare const wrap: AesGcmKwWrapFunction
|
||||
export declare const unwrap: AesGcmKwUnwrapFunction
|
||||
|
|
|
|||
6
src/runtime/aeskw.d.ts
vendored
6
src/runtime/aeskw.d.ts
vendored
|
|
@ -1,3 +1,3 @@
|
|||
import type { AesKwUnwrapFunction, AesKwWrapFunction } from './interfaces.d';
|
||||
export declare const wrap: AesKwWrapFunction;
|
||||
export declare const unwrap: AesKwUnwrapFunction;
|
||||
import type { AesKwUnwrapFunction, AesKwWrapFunction } from './interfaces.d'
|
||||
export declare const wrap: AesKwWrapFunction
|
||||
export declare const unwrap: AesKwUnwrapFunction
|
||||
|
|
|
|||
6
src/runtime/base64url.d.ts
vendored
6
src/runtime/base64url.d.ts
vendored
|
|
@ -1,3 +1,3 @@
|
|||
import type { Base64UrlDecode, Base64UrlEncode } from './interfaces.d';
|
||||
export declare const encode: Base64UrlEncode;
|
||||
export declare const decode: Base64UrlDecode;
|
||||
import type { Base64UrlDecode, Base64UrlEncode } from './interfaces.d'
|
||||
export declare const encode: Base64UrlEncode
|
||||
export declare const decode: Base64UrlDecode
|
||||
|
|
|
|||
6
src/runtime/decrypt.d.ts
vendored
6
src/runtime/decrypt.d.ts
vendored
|
|
@ -1,3 +1,3 @@
|
|||
import type { DecryptFunction } from './interfaces.d';
|
||||
declare const decrypt: DecryptFunction;
|
||||
export default decrypt;
|
||||
import type { DecryptFunction } from './interfaces.d'
|
||||
declare const decrypt: DecryptFunction
|
||||
export default decrypt
|
||||
|
|
|
|||
4
src/runtime/digest.d.ts
vendored
4
src/runtime/digest.d.ts
vendored
|
|
@ -1,3 +1,3 @@
|
|||
import type { AsyncOrSync } from '../types.i.d'
|
||||
declare const _default: (digest: string, data: Uint8Array) => AsyncOrSync<Uint8Array>;
|
||||
export default _default;
|
||||
declare const _default: (digest: string, data: Uint8Array) => AsyncOrSync<Uint8Array>
|
||||
export default _default
|
||||
|
|
|
|||
18
src/runtime/ecdhes.d.ts
vendored
18
src/runtime/ecdhes.d.ts
vendored
|
|
@ -1,6 +1,12 @@
|
|||
import type { EcdhAllowedFunction, EcdhESDeriveKeyFunction, EphemeralKeyToPublicJwkFunction, GenerateEpkFunction, PublicJwkToEphemeralKeyFunction } from './interfaces.d';
|
||||
export declare const deriveKey: EcdhESDeriveKeyFunction;
|
||||
export declare const ephemeralKeyToPublicJWK: EphemeralKeyToPublicJwkFunction;
|
||||
export declare const generateEpk: GenerateEpkFunction;
|
||||
export declare const publicJwkToEphemeralKey: PublicJwkToEphemeralKeyFunction;
|
||||
export declare const ecdhAllowed: EcdhAllowedFunction;
|
||||
import type {
|
||||
EcdhAllowedFunction,
|
||||
EcdhESDeriveKeyFunction,
|
||||
EphemeralKeyToPublicJwkFunction,
|
||||
GenerateEpkFunction,
|
||||
PublicJwkToEphemeralKeyFunction,
|
||||
} from './interfaces.d'
|
||||
export declare const deriveKey: EcdhESDeriveKeyFunction
|
||||
export declare const ephemeralKeyToPublicJWK: EphemeralKeyToPublicJwkFunction
|
||||
export declare const generateEpk: GenerateEpkFunction
|
||||
export declare const publicJwkToEphemeralKey: PublicJwkToEphemeralKeyFunction
|
||||
export declare const ecdhAllowed: EcdhAllowedFunction
|
||||
|
|
|
|||
6
src/runtime/encrypt.d.ts
vendored
6
src/runtime/encrypt.d.ts
vendored
|
|
@ -1,3 +1,3 @@
|
|||
import type { EncryptFunction } from './interfaces.d';
|
||||
declare const encrypt: EncryptFunction;
|
||||
export default encrypt;
|
||||
import type { EncryptFunction } from './interfaces.d'
|
||||
declare const encrypt: EncryptFunction
|
||||
export default encrypt
|
||||
|
|
|
|||
4
src/runtime/fetch.d.ts
vendored
4
src/runtime/fetch.d.ts
vendored
|
|
@ -1,2 +1,2 @@
|
|||
declare const _default: (url: URL, timeout: number) => Promise<any>;
|
||||
export default _default;
|
||||
declare const _default: (url: URL, timeout: number) => Promise<any>
|
||||
export default _default
|
||||
|
|
|
|||
21
src/runtime/generate.d.ts
vendored
21
src/runtime/generate.d.ts
vendored
|
|
@ -1,11 +1,14 @@
|
|||
import type { KeyObject } from 'crypto';
|
||||
import type { KeyLike } from '../types.d';
|
||||
export declare function generateSecret(alg: string): Promise<KeyLike>;
|
||||
import type { KeyObject } from 'crypto'
|
||||
import type { KeyLike } from '../types.d'
|
||||
export declare function generateSecret(alg: string): Promise<KeyLike>
|
||||
interface Options {
|
||||
crv?: string;
|
||||
crv?: string
|
||||
}
|
||||
export declare function generateKeyPair(alg: string, options?: Options): Promise<{
|
||||
privateKey: CryptoKey | KeyObject,
|
||||
publicKey: CryptoKey | KeyObject
|
||||
}>;
|
||||
export {};
|
||||
export declare function generateKeyPair(
|
||||
alg: string,
|
||||
options?: Options,
|
||||
): Promise<{
|
||||
privateKey: CryptoKey | KeyObject
|
||||
publicKey: CryptoKey | KeyObject
|
||||
}>
|
||||
export {}
|
||||
|
|
|
|||
6
src/runtime/jwk_to_key.d.ts
vendored
6
src/runtime/jwk_to_key.d.ts
vendored
|
|
@ -1,3 +1,3 @@
|
|||
import type { KeyLike, JWK } from '../types.d';
|
||||
declare const _default: (jwk: JWK) => Promise<KeyLike>;
|
||||
export default _default;
|
||||
import type { KeyLike, JWK } from '../types.d'
|
||||
declare const _default: (jwk: JWK) => Promise<KeyLike>
|
||||
export default _default
|
||||
|
|
|
|||
6
src/runtime/pbes2kw.d.ts
vendored
6
src/runtime/pbes2kw.d.ts
vendored
|
|
@ -1,3 +1,3 @@
|
|||
import type { Pbes2KWDecryptFunction, Pbes2KWEncryptFunction } from './interfaces.d';
|
||||
export declare const encrypt: Pbes2KWEncryptFunction;
|
||||
export declare const decrypt: Pbes2KWDecryptFunction;
|
||||
import type { Pbes2KWDecryptFunction, Pbes2KWEncryptFunction } from './interfaces.d'
|
||||
export declare const encrypt: Pbes2KWEncryptFunction
|
||||
export declare const decrypt: Pbes2KWDecryptFunction
|
||||
|
|
|
|||
6
src/runtime/random.d.ts
vendored
6
src/runtime/random.d.ts
vendored
|
|
@ -1,3 +1,3 @@
|
|||
import type { GetRandomValuesFunction } from './interfaces.d';
|
||||
declare const random: GetRandomValuesFunction;
|
||||
export default random;
|
||||
import type { GetRandomValuesFunction } from './interfaces.d'
|
||||
declare const random: GetRandomValuesFunction
|
||||
export default random
|
||||
|
|
|
|||
6
src/runtime/rsaes.d.ts
vendored
6
src/runtime/rsaes.d.ts
vendored
|
|
@ -1,3 +1,3 @@
|
|||
import type { RsaEsDecryptFunction, RsaEsEncryptFunction } from './interfaces.d';
|
||||
export declare const encrypt: RsaEsEncryptFunction;
|
||||
export declare const decrypt: RsaEsDecryptFunction;
|
||||
import type { RsaEsDecryptFunction, RsaEsEncryptFunction } from './interfaces.d'
|
||||
export declare const encrypt: RsaEsEncryptFunction
|
||||
export declare const decrypt: RsaEsDecryptFunction
|
||||
|
|
|
|||
6
src/runtime/sign.d.ts
vendored
6
src/runtime/sign.d.ts
vendored
|
|
@ -1,3 +1,3 @@
|
|||
import type { SignFunction } from './interfaces.d';
|
||||
declare const sign: SignFunction;
|
||||
export default sign;
|
||||
import type { SignFunction } from './interfaces.d'
|
||||
declare const sign: SignFunction
|
||||
export default sign
|
||||
|
|
|
|||
6
src/runtime/verify.d.ts
vendored
6
src/runtime/verify.d.ts
vendored
|
|
@ -1,3 +1,3 @@
|
|||
import type { VerifyFunction } from './interfaces.d';
|
||||
declare const verify: VerifyFunction;
|
||||
export default verify;
|
||||
import type { VerifyFunction } from './interfaces.d'
|
||||
declare const verify: VerifyFunction
|
||||
export default verify
|
||||
|
|
|
|||
6
src/runtime/zlib.d.ts
vendored
6
src/runtime/zlib.d.ts
vendored
|
|
@ -1,3 +1,3 @@
|
|||
import type { InflateFunction, DeflateFunction } from '../types.d';
|
||||
export declare const inflate: InflateFunction;
|
||||
export declare const deflate: DeflateFunction;
|
||||
import type { InflateFunction, DeflateFunction } from '../types.d'
|
||||
export declare const inflate: InflateFunction
|
||||
export declare const deflate: DeflateFunction
|
||||
|
|
|
|||
Loading…
Reference in a new issue