panva / jose

JWA, JWS, JWE, JWT, JWK, JWKS for Node.js, Browser, Cloudflare Workers, Deno, Bun, and other Web-interoperable runtimes
MIT License
5.62k stars 315 forks source link

Type "GetKeyFunction" is present in "types.d.ts" but not exported in "index.d.ts" #591

Closed flaviostutz closed 1 year ago

flaviostutz commented 1 year ago

What happened?

Our project can't use type GetKeyFunction because it is not exported by the lib

Version

4.15.3

Runtime

Node.js

Runtime Details

node 16; macbook

Code to reproduce

import {
  GetKeyFunction,
} from 'jose';

Required

panva commented 1 year ago

Because there's a more narrow type of get key suitable for each getkey-able operation already exported.

JWTVerifyGetKey
JWTDecryptGetKey 
GeneralVerifyGetKey 
FlattenedVerifyGetKey 
CompactVerifyGetKey 
GeneralDecryptGetKey 
FlattenedDecryptGetKey 
CompactDecryptGetKey