import { freeze } from '../util/object-utils.js' ; import { OperationNode } from './operation-node.js' ; import { RawNode } from './raw-node.js' ; export type GeneratedNodeParams = Omit < GeneratedNode , 'kind' | 'expression' > ; export interface GeneratedNode extends OperationNode { readonly kind : 'GeneratedNode' ; readonly byDefault ? : boolean ; readonly always ? : boolean ; readonly identity ? : boolean ; readonly stored ? : boolean ; readonly expression ? : RawNode ; } internal export const GeneratedNode = freeze ( { is ( node ) { return node . kind === 'GeneratedNode' ; } , create ( params ) { return freeze ( { kind : 'GeneratedNode' , ... params , } ) ; } , createWithExpression ( expression ) { return freeze ( { kind : 'GeneratedNode' , always : true , expression , } ) ; } , cloneWith ( node , params ) { return freeze ( { ... node , ... params , } ) ; } , } ) ;