---
title: "TypeshadeTextSpan: interface in Editor, TypeShade API"
description: "TypeshadeTextSpan, an interface in Editor. UTF-16 source span used to map Typeshade information back into an editor."
url: https://typeshade.dev/api/typeshadetextspan/
language: en
---

# `TypeshadeTextSpan`

Interface in Editor

UTF-16 source span used to map Typeshade information back into an editor.

`import type { TypeshadeTextSpan } from 'typeshade'`

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

## Syntax

```ts
interface TypeshadeTextSpan {
  readonly start: number;
  readonly length: number;
}
```

## Instance properties

**`start` read only `number`**

UTF-16 offset where the span begins.

**`length` read only `number`**

Length of the span, in UTF-16 code units.

## Source

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