index.d.ts 959 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /**
  2. * Parse titles.
  3. *
  4. * ###### Examples
  5. *
  6. * ```markdown
  7. * "a"
  8. * 'b'
  9. * (c)
  10. * "a
  11. * b"
  12. * 'a
  13. * b'
  14. * (a\)b)
  15. * ```
  16. *
  17. * @param {Effects} effects
  18. * Context.
  19. * @param {State} ok
  20. * State switched to when successful.
  21. * @param {State} nok
  22. * State switched to when unsuccessful.
  23. * @param {TokenType} type
  24. * Type of the whole title (`"a"`, `'b'`, `(c)`).
  25. * @param {TokenType} markerType
  26. * Type for the markers (`"`, `'`, `(`, and `)`).
  27. * @param {TokenType} stringType
  28. * Type for the value (`a`).
  29. * @returns {State}
  30. * Start state.
  31. */
  32. export function factoryTitle(
  33. effects: Effects,
  34. ok: State,
  35. nok: State,
  36. type: TokenType,
  37. markerType: TokenType,
  38. stringType: TokenType
  39. ): State
  40. export type Code = import('micromark-util-types').Code
  41. export type Effects = import('micromark-util-types').Effects
  42. export type State = import('micromark-util-types').State
  43. export type TokenType = import('micromark-util-types').TokenType