1. Introduction
  2. Editor Integration
  3. Common Configurations
  4. 1. Editor Frontends
    1. 1.1. VS Cod(e,ium)
    2. 1.2. Neovim
    3. 1.3. Emacs
    4. 1.4. Sublime Text
    5. 1.5. Helix
    6. 1.6. Zed
  5. Features
  6. 2. Command line interface
  7. 3. Code Documentation
  8. 4. Code Completion
  9. 5. Exporting Documents
  10. 6. Document Preview
  11. 7. Testing
  12. 8. Linting
  13. 9. Other Features
  14. Service Overview
  15. Overview of Service
  16. 10. Principles
  17. 11. Commands System
  18. 12. LSP Inputs
  19. 13. Type System
  20. Service Development
  21. 14. Crate Docs
  22. 15. LSP and CLI
  23. 16. Language Queries
  24. 17. Document Preview

Tinymist Docs

The underlying techniques are not easy to understand, but there are some links:

  • bidirectional type checking: https://jaked.org/blog/2021-09-15-Reconstructing-TypeScript-part-1
  • type system borrowed here: https://github.com/hkust-taco/mlscript

Some tricks are taken for help reducing the complexity of code:

First, the array literals are identified as tuple type, that each cell of the array has type individually.

Second, the and the type are reused frequently.

  • the type is notated as , and the type is a special tuple type .

  • the type is imported from mlscript, notated as .

  • the type consists of:

    • a positional argument list, in type.
    • a named argument list, in type.
    • an optional rest argument, in type.
    • an optional body, in any type.

    notated as

  • the is a without rest and body.

With aboving constructors, we soonly get typst's type checker.

  • it checks array or dictionary literals by converting them with a corresponding and .
  • it performs the getting element operation by calls a corresponding .
  • the closure is converted into a typed lambda, in type.
  • the pattern destructing are converted to array and dictionary constrains.