TypeQLiteLabels
Defined in: libs/language/src/typeqlite-labels.ts:109
Labels that are plain IDs: every position where TypeQLite names a type without a
cross-reference (ADR-008 D5). That covers pipelines (isa, has, links, role players, type
patterns), a re-open’s label, and undefine and redefine targets.
Member summary
Section titled “Member summary”Constructors
| Name | Description |
|---|---|
| new TypeQLiteLabels() | Created with the language’s services by TypeQLiteModule. |
Methods
| Name | Description |
|---|---|
| candidates() | Every definition a label of this kind could name: what completion offers (ADR-008 D5). |
| resolve() | The definitions a label names. |
| siteAt() | The label site under an offset, if there is one. |
| sitesIn() | Every label site in a document. |
| sitesOfNode() | The label sites one AST node holds. |
| usesOf() | Every label site in the definition’s schema that names it: the workspace’s, or its notebook’s. |
| workspaceHasSchema() | Whether the schema defines any type at all. |
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new TypeQLiteLabels(
services):TypeQLiteLabels
Defined in: libs/language/src/typeqlite-labels.ts:119
Created with the language’s services by TypeQLiteModule.
Parameters
Section titled “Parameters”services
Section titled “services”Langium’s services.
Returns
Section titled “Returns”TypeQLiteLabels
Methods
Section titled “Methods”candidates()
Section titled “candidates()”candidates(
kind,relation?,context?):AstNode[]
Defined in: libs/language/src/typeqlite-labels.ts:171
Every definition a label of this kind could name: what completion offers (ADR-008 D5). A role whose relation is known offers that relation’s roles, inherited ones included.
Parameters
Section titled “Parameters”relation?
Section titled “relation?”string
context?
Section titled “context?”string | URI
Returns
Section titled “Returns”AstNode[]
resolve()
Section titled “resolve()”resolve(
site):AstNode[]
Defined in: libs/language/src/typeqlite-labels.ts:155
The definitions a label names. Empty when nothing in the workspace defines it.
Parameters
Section titled “Parameters”Pick<LabelSite, "name" | "relation" | "kind"> & object
Returns
Section titled “Returns”AstNode[]
siteAt()
Section titled “siteAt()”siteAt(
document,offset):LabelSite|undefined
Defined in: libs/language/src/typeqlite-labels.ts:138
The label site under an offset, if there is one.
Parameters
Section titled “Parameters”document
Section titled “document”offset
Section titled “offset”number
Returns
Section titled “Returns”LabelSite | undefined
sitesIn()
Section titled “sitesIn()”sitesIn(
document):LabelSite[]
Defined in: libs/language/src/typeqlite-labels.ts:126
Every label site in a document.
Parameters
Section titled “Parameters”document
Section titled “document”Returns
Section titled “Returns”sitesOfNode()
Section titled “sitesOfNode()”sitesOfNode(
document,node):LabelSite[]
Defined in: libs/language/src/typeqlite-labels.ts:133
The label sites one AST node holds.
Parameters
Section titled “Parameters”document
Section titled “document”Returns
Section titled “Returns”usesOf()
Section titled “usesOf()”usesOf(
target):LabelSite[]
Defined in: libs/language/src/typeqlite-labels.ts:182
Every label site in the definition’s schema that names it: the workspace’s, or its notebook’s.
Parameters
Section titled “Parameters”target
Section titled “target”Returns
Section titled “Returns”workspaceHasSchema()
Section titled “workspaceHasSchema()”workspaceHasSchema(
context?):boolean
Defined in: libs/language/src/typeqlite-labels.ts:149
Whether the schema defines any type at all. Without one, nothing can be unknown (ADR-008 D6). The schema is the workspace’s, or, given a notebook cell’s URI, that notebook’s (ADR-012 N4).
Parameters
Section titled “Parameters”context?
Section titled “context?”string | URI
Returns
Section titled “Returns”boolean
TypeDBLite is an independent open-source project, built on TypeDB with thanks. It is not affiliated with, sponsored by, or endorsed by TypeDB Ltd. Released under the MPL-2.0 license.