passage.d.ts 909 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. export interface PassageBase {
  2. /**
  3. * The tags of the passage.
  4. * @since 2.0.0
  5. */
  6. tags: string[];
  7. /**
  8. * The raw text of the passage.
  9. * @since 2.0.0
  10. */
  11. text: string;
  12. /**
  13. * The title of the passage.
  14. * @since 2.0.0
  15. */
  16. title: string;
  17. }
  18. export interface Passage extends PassageBase {
  19. /**
  20. * The DOM ID of the passage (created from the slugified passage title).
  21. * @since 2.0.0
  22. */
  23. domId: string;
  24. /**
  25. * Returns the description of the passage (created from either an excerpt of the passage or the
  26. * Config.passages.descriptions object).
  27. * @since 2.0.0
  28. */
  29. description(): string;
  30. /**
  31. * Returns the text of the Passage object (similar to <Passage>.text) after applying nobr tag and image passage
  32. * processing to it.
  33. * @since 2.0.0
  34. */
  35. processText(): string;
  36. }
  37. export {};