export function isTransferable(object) {
    return (object instanceof ArrayBuffer ||
        object instanceof ReadableStream ||
        object instanceof TransformStream ||
        object instanceof WritableStream);
}
export function listTransferable(object) {
    if (!object)
        return [];
    if (Array.isArray(object)) {
        return object.flatMap(listTransferable);
    }
    if (isTransferable(object)) {
        return [object];
    }
    if (typeof object !== "object") {
        return [];
    }
    return Object.values(object).flatMap(listTransferable);
}
//# sourceMappingURL=transferrable.js.map