index.d.ts 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /**
  2. * Parse destinations.
  3. *
  4. * ###### Examples
  5. *
  6. * ```markdown
  7. * <a>
  8. * <a\>b>
  9. * <a b>
  10. * <a)>
  11. * a
  12. * a\)b
  13. * a(b)c
  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 for whole (`<a>` or `b`).
  25. * @param {TokenType} literalType
  26. * Type when enclosed (`<a>`).
  27. * @param {TokenType} literalMarkerType
  28. * Type for enclosing (`<` and `>`).
  29. * @param {TokenType} rawType
  30. * Type when not enclosed (`b`).
  31. * @param {TokenType} stringType
  32. * Type for the value (`a` or `b`).
  33. * @param {number | undefined} [max=Infinity]
  34. * Depth of nested parens (inclusive).
  35. * @returns {State}
  36. * Start state.
  37. */
  38. export function factoryDestination(
  39. effects: Effects,
  40. ok: State,
  41. nok: State,
  42. type: TokenType,
  43. literalType: TokenType,
  44. literalMarkerType: TokenType,
  45. rawType: TokenType,
  46. stringType: TokenType,
  47. max?: number | undefined
  48. ): State
  49. export type Effects = import('micromark-util-types').Effects
  50. export type State = import('micromark-util-types').State
  51. export type TokenType = import('micromark-util-types').TokenType