Files
evento/node_modules/kysely/dist/esm/operation-node/output-node.js
2026-03-18 14:55:56 -03:00

25 lines
620 B
JavaScript

/// <reference types="./output-node.d.ts" />
import { freeze } from '../util/object-utils.js';
/**
* @internal
*/
export const OutputNode = freeze({
is(node) {
return node.kind === 'OutputNode';
},
create(selections) {
return freeze({
kind: 'OutputNode',
selections: freeze(selections),
});
},
cloneWithSelections(output, selections) {
return freeze({
...output,
selections: output.selections
? freeze([...output.selections, ...selections])
: freeze(selections),
});
},
});