Skip to content

API reference / @docmentis/udoc-node / WordprocessingBindingEntry

Type Alias: WordprocessingBindingEntry ​

ts
type WordprocessingBindingEntry = 
  | {
  place: {
     bindingPlace: WordprocessingBindingPlaceRef;
     text: string;
     binding: Binding;
     path?: string;
     error?: BindingError;
     options?: WordprocessingBindingOption[];
     otherwise?: WordprocessingBindingOtherwiseRef;
  };
}
  | {
  tag: {
     location?: SearchMatchLocation;
     text: string;
     binding?: Binding;
     path?: string;
     error?: BindingError;
  };
};

One entry of a document's [BindingReport]: a binding place, or a tag in a plain document's text — each with the binding as written, braces and all, its path, and what is wrong with it.

path is the binding's path, resolved in the scope of the repeats around it in its story, from the data's root: its names joined by ., an array's item [] after the array — funds[].name for {{fund.name}} inside {{#fund in funds}}. None for an option's tag, which binds no path of its own, and for a tag that doesn't read.