CitationLocation
type CitationLocation = | { type: "documentChar"; documentIndex: number; start: number; end: number;} | { type: "documentPage"; documentIndex: number; start: number; end: number;} | { type: "documentChunk"; documentIndex: number; start: number; end: number;} | { type: "searchResult"; searchResultIndex: number; start: number; end: number;} | { type: "web"; url: string; domain?: string;};Defined in: src/types/citations.ts:14
Discriminated union of citation location types.
Each variant uses a type field to identify the location kind.
Type Declaration
Section titled “Type Declaration”{ type: "documentChar"; documentIndex: number; start: number; end: number;}| Name | Type | Description | Defined in |
|---|---|---|---|
type | "documentChar" | Location referencing character positions within a document. | src/types/citations.ts:19 |
documentIndex | number | Index of the source document. | src/types/citations.ts:24 |
start | number | Start character position. | src/types/citations.ts:29 |
end | number | End character position. | src/types/citations.ts:34 |
{ type: "documentPage"; documentIndex: number; start: number; end: number;}| Name | Type | Description | Defined in |
|---|---|---|---|
type | "documentPage" | Location referencing page positions within a document. | src/types/citations.ts:40 |
documentIndex | number | Index of the source document. | src/types/citations.ts:45 |
start | number | Start page number. | src/types/citations.ts:50 |
end | number | End page number. | src/types/citations.ts:55 |
{ type: "documentChunk"; documentIndex: number; start: number; end: number;}| Name | Type | Description | Defined in |
|---|---|---|---|
type | "documentChunk" | Location referencing chunk positions within a document. | src/types/citations.ts:61 |
documentIndex | number | Index of the source document. | src/types/citations.ts:66 |
start | number | Start chunk index. | src/types/citations.ts:71 |
end | number | End chunk index. | src/types/citations.ts:76 |
{ type: "searchResult"; searchResultIndex: number; start: number; end: number;}| Name | Type | Description | Defined in |
|---|---|---|---|
type | "searchResult" | Location referencing a search result. | src/types/citations.ts:82 |
searchResultIndex | number | Index of the search result. | src/types/citations.ts:87 |
start | number | Start position within the search result. | src/types/citations.ts:92 |
end | number | End position within the search result. | src/types/citations.ts:97 |
{ type: "web"; url: string; domain?: string;}| Name | Type | Description | Defined in |
|---|---|---|---|
type | "web" | Location referencing a web URL. | src/types/citations.ts:103 |
url | string | The URL of the web source. | src/types/citations.ts:108 |
domain? | string | The domain of the web source. | src/types/citations.ts:113 |