版博士V2.0程序
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

createNode.d.ts 669 B

1234567891011121314151617
  1. import { Node } from '../nodes/Node.js';
  2. import type { Schema } from '../schema/Schema.js';
  3. import type { CollectionTag, ScalarTag } from '../schema/types.js';
  4. import type { Replacer } from './Document.js';
  5. export interface CreateNodeContext {
  6. aliasDuplicateObjects: boolean;
  7. keepUndefined: boolean;
  8. onAnchor: (source: unknown) => string;
  9. onTagObj?: (tagObj: ScalarTag | CollectionTag) => void;
  10. sourceObjects: Map<unknown, {
  11. anchor: string | null;
  12. node: Node | null;
  13. }>;
  14. replacer?: Replacer;
  15. schema: Schema;
  16. }
  17. export declare function createNode(value: unknown, tagName: string | undefined, ctx: CreateNodeContext): Node;