Skip to content

validateSync

validateSync(services, root): readonly SyncDiagnostic[]

Defined in: libs/language/src/typeqlite-validate-sync.ts:93

Run the registered validation checks over an AST, synchronously.

It is Langium’s own driver with the await removed. The loop is DefaultDocumentValidator.validateAstNodes — streamAst, then getChecks(node.$type) per node — and getChecks is public API for exactly this. What is not re-implemented is any rule: they stay in TypeQLiteValidator, registered once, and serve the language server and the engine alike.

A check that returns a promise is refused, not awaited: every check in TypeQLiteValidator is synchronous, and silently ignoring an async one would leave a rule that appears registered and never runs.

TypeQLiteServices

AstNode

readonly SyncDiagnostic[]

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.