export function withMeta(result) {
    if (!result.fallback && !result.error)
        return result.data;
    if (typeof result.data === 'object' && result.data !== null) {
        return {
            ...result.data,
            ...(result.fallback ? { _fallback: true } : {}),
            ...(result.error ? { _error: result.error } : {}),
        };
    }
    return result.data;
}
//# sourceMappingURL=_meta.js.map