Skip to content

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.

Constructors

Name Description
new TypeQLiteScopeProvider() Created with the language’s services by TypeQLiteModule.

Methods

Name Description
getScope() The scope of a reference.

new TypeQLiteScopeProvider(services): TypeQLiteScopeProvider

Defined in: libs/language/src/typeqlite-scope.ts:57

Created with the language’s services by TypeQLiteModule.

LangiumServices

Langium’s services.

TypeQLiteScopeProvider

DefaultScopeProvider.constructor

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.

ReferenceInfo

Scope

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.