Skip to content

decodeExtension ​

decodeExtension ​

Decode a single extension using a custom ExtensionDecoder.

ts
function decodeExtension<TValue>(
	extensions: readonly ParsedExtension[],
	decoder: ExtensionDecoder<TValue>,
): TValue | undefined

Parameters

Returns — The decoded value, or undefined if the extension is absent.

Released under the MIT License.