---
title: "TypeshadePosition: interface in Editor, TypeShade API"
description: "TypeshadePosition, an interface in Editor. Zero-based editor position: line and character both start at 0, following the Language Server Protocol convention."
url: https://typeshade.dev/api/typeshadeposition/
language: en
---

# `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 af54ddad5.

## Syntax

```ts
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

**`line` read only `number`**

Zero-based line number.

**`character` read only `number`**

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

## Source

[`src/language-service.ts`, line 18](https://github.com/typeshade/typeshade/blob/af54ddad5/src/language-service.ts#L18), at commit af54ddad5
