Skip to content

How to get better error reporting with typst.ts? #485

Discussion options

You must be logged in to vote

Sorry about late, I was on vacation.

My understanding is correct, Span(xyz) does exactly that.

You are correct, we currently have full information about diagnostics. But typst.ts still doesn't provide a way to access that information. It needs carefully design.

For design of processing diagnostics, there are three different directions.

  1. typst-preview uses rust API of typst.ts, so there is no problem for exporting diagnostics information. typst-preview can use the typst crate's SourceDiagnostics directly, and it can convert Span inside of SourceDiagnostics by World api easily.

  2. I experiment a bit on typst.node for API design of js binding, it can raise an error that stores raw spans, a…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@justpankajdotcom
Comment options

Answer selected by justpankajdotcom
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants