Module typir-langium

Typir-Langium: Typir integration for Langium

Typir-Langium is a framework for type checking of languages developed with Langium, the language workbench for developing textual domain-specific languages (DSLs) in the web.

Typir-Langium depends on Typir, the stand-alone library for type systems and type checking for software languages in the web, independent from any language workbench. Typir-Langium is a dedicated binding of Typir for DSLs which are developed with Langium.

npm install typir-langium

For an overview about the core features of Typir with a simple application example, see the root README.md of the Typir project.

Important design decision for Typir-Langium: Typir-Langium does not depend on langium/lsp, i.e. Typir-Langium can be used even for Langium-based DSLs which don't use LSP.

Integrate Typir as additional Langium service into your DSL.

export type MyDSLAddedServices = {
// ...
typir: LangiumServicesForTypirBinding,
// ...
}

In case of a multi-language project, this approach enables you to manage multiple type systems in parallel by having typir1: LangiumServicesForTypirBinding, typir2: LangiumServicesForTypirBinding and so on.

Look at the examples in the examples/ folder of the repo (here). There we have some demo projects for you to get started.

MIT License

Classes

AbstractLangiumTypeCreator
DefaultLangiumTypirValidator
LangiumLanguageNodeInferenceCaching
LangiumProblemPrinter
PlaceholderLangiumTypeCreator

Interfaces

LangiumTypeCreator
LangiumTypirValidator

Type Aliases

LangiumServicesForTypirBinding
PartialTypirLangiumServices
TypirLangiumServices

Functions

createDefaultTypirLangiumServices
createLangiumModuleForTypirBinding
createLangiumSpecificTypirServicesModule
deleteAllDocuments
getDocumentKey
getDocumentKeyForDocument
getDocumentKeyForURI
initializeLangiumTypirServices
registerTypirValidationChecks