TypeshadePosition
On this page

TypeshadePosition

Interface in Editor

Zero-based editor position: line and character both start at 0, following the Language Server Protocol convention.

import type { TypeshadePosition } from 'typeshade'

The signature, the description and the examples come from the compiler's own source at commit 26de7be8.

Syntax

interface TypeshadePosition {
readonly line: number;
readonly character: number;
}

Description

Monaco adapters add 1 to each of these before displaying or accepting a position, since Monaco’s own API is one-based.

Instance properties

lineread only number

Zero-based line number.

characterread only number

Zero-based UTF-16 character offset within the line.

Source

src/language-service.ts, line 18, at commit 26de7be8

Edit this page Report a problem