/** * @typedef {Object} DecodedJwt * @property {Record} header * @property {Record} payload * @property {Buffer} signature */ /** * @param {string} token * @returns {DecodedJwt} */ export function decode(token: string): DecodedJwt; /** * @param {string} token * @returns {Record} */ export function decodeProtectedHeader(token: string): Record; /** * Split a compact JWT into its three base64url segments. Exported for * internal reuse by `verify` and `peek`. * * @param {string} token * @returns {{ encHeader: string, encPayload: string, encSig: string }} */ export function _splitCompact(token: string): { encHeader: string; encPayload: string; encSig: string; }; export type DecodedJwt = { header: Record; payload: Record; signature: Buffer; };