TypeQLiteScopeProvider
Defined in: libs/language/src/typeqlite-scope.ts:48
Scoping for TypeQLite: role references, and the order in which one workspace’s schema is searched.
A role reference’s scope is exactly the relates traits of the relation named alongside it. That makes “a plays
names a role its relation actually relates” a resolution rule, which Langium reports with a position, rather than
a validator.
When the relation itself does not resolve, the role scope is empty rather than global. The unresolved-relation error is the real one; offering role completions from an unknown relation would only add noise on top of it.
Extends
Section titled “Extends”Member summary
Section titled “Member summary”Constructors
| Name | Description |
|---|---|
| new TypeQLiteScopeProvider() | Created with the language’s services by TypeQLiteModule. |
Methods
| Name | Description |
|---|---|
| getScope() | The scope of a reference. |
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new TypeQLiteScopeProvider(
services):TypeQLiteScopeProvider
Defined in: libs/language/src/typeqlite-scope.ts:57
Created with the language’s services by TypeQLiteModule.
Parameters
Section titled “Parameters”services
Section titled “services”Langium’s services.
Returns
Section titled “Returns”TypeQLiteScopeProvider
Overrides
Section titled “Overrides”DefaultScopeProvider.constructor
Methods
Section titled “Methods”getScope()
Section titled “getScope()”getScope(
context):Scope
Defined in: libs/language/src/typeqlite-scope.ts:68
The scope of a reference. A role’s is the relates traits of the relation named beside it, those added by
re-opens included, and is empty when the relation does not resolve. Any other reference gets Langium’s scope,
with the current document’s definitions before the rest of the workspace’s.
Parameters
Section titled “Parameters”context
Section titled “context”Returns
Section titled “Returns”Overrides
Section titled “Overrides”DefaultScopeProvider.getScope
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.