Type alias Located<CTX>

Located<CTX>: {
    col: number;
    context: unknown;
    row: number;
}

The location and context of an error.

Note: Rows and columns are counted like a text editor. The beginning is row=1 and col=1. The col increments as characters are chomped. When a \n is chomped, row is incremented and col starts over again at 1.

Remark

Note that the context is actually untyped! This was a contious decision to help improve type inference. Use the getContext function to retreive the context with the appropriate type!

See

Type Parameters

  • CTX

Type declaration

  • col: number
  • context: unknown
  • row: number