Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.d.ts 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. // Minimum TypeScript Version: 3.0
  2. import {Node, Parent} from 'unist'
  3. export = toMarkdown
  4. declare namespace toMarkdown {
  5. interface SafeOptions {
  6. before: string
  7. after: string
  8. }
  9. type Handle = (
  10. node: Node,
  11. parent: Parent | null | undefined,
  12. context: Context,
  13. safeOptions: SafeOptions
  14. ) => string
  15. interface Context {
  16. stack: string[]
  17. enter: (type: string) => () => void
  18. options: Options
  19. unsafe: Unsafe[]
  20. join: Join[]
  21. handle: Handle
  22. }
  23. interface Handlers {
  24. [key: string]: Handler
  25. }
  26. interface Handler {
  27. peek?: Handle
  28. (
  29. node: Node,
  30. parent: Parent | null | undefined,
  31. context: Context,
  32. safeOptions: SafeOptions
  33. ): string
  34. }
  35. interface Unsafe {
  36. character: string
  37. inConstruct?: string | string[]
  38. notInConstruct?: string | string[]
  39. after?: string
  40. before?: string
  41. atBreak?: boolean
  42. }
  43. type Join = (
  44. left: Node,
  45. right: Node,
  46. parent: Parent,
  47. context: Context
  48. ) => boolean | null | void
  49. interface Options {
  50. bullet?: '-' | '*' | '+'
  51. closeAtx?: boolean
  52. emphasis?: '_' | '*'
  53. fence?: '~' | '`'
  54. fences?: boolean
  55. incrementListMarker?: boolean
  56. listItemIndent?: 'tab' | 'one' | 'mixed'
  57. quote?: '"' | "'"
  58. resourceLink?: boolean
  59. rule?: '-' | '_' | '*'
  60. ruleRepetition?: number
  61. ruleSpaces?: boolean
  62. setext?: boolean
  63. strong?: '_' | '*'
  64. tightDefinitions?: boolean
  65. extensions?: Options[]
  66. handlers?: Handlers
  67. join?: Join[]
  68. unsafe?: Unsafe[]
  69. }
  70. }
  71. declare function toMarkdown(node: Node, options?: toMarkdown.Options): string