mwg API
    Preparing search index...

    Interface ShareDecodeOptions<T>

    interface ShareDecodeOptions<T> {
        accept?: (type: string, id: string) => boolean;
        maxChars?: number;
        maxPayloadBytes?: number;
        validate?: (payload: unknown, envelope: { id: string; type: string }) => T;
    }

    Type Parameters

    • T
    Index
    accept?: (type: string, id: string) => boolean

    refuses a link of another type or from another version of the package (return false)

    maxChars?: number

    the longest link accepted, in characters; 4093 when omitted

    maxPayloadBytes?: number

    the largest inflated body in bytes; 256 KiB when omitted

    validate?: (payload: unknown, envelope: { id: string; type: string }) => T

    checks the payload against the game's schema and returns it typed; throw to refuse