span.d.ts 533 B

123456789101112131415
  1. export type SpanAttrs = {
  2. [key: string]: string;
  3. };
  4. export declare class Span {
  5. speech: string;
  6. attributes: SpanAttrs;
  7. constructor(speech: string, attributes: SpanAttrs);
  8. static empty(): Span;
  9. static stringEmpty(str: string): Span;
  10. static stringAttr(str: string, attr: SpanAttrs): Span;
  11. static singleton(str: string, def?: SpanAttrs): Span[];
  12. static node(str: string, node: Element, def?: SpanAttrs): Span;
  13. static attributeList: string[];
  14. static getAttributes(node: Element): SpanAttrs;
  15. }