Skip to content

@typedblite/language: Functions

Functions that @typedblite/language exports.

Name Description
bindingsOf What the patterns of a match bind, read from the AST alone: the variables a select may name, the things with what their patterns say of them, and the variables that only play roles.
categoryOf CardAnnotation → card: the category is the node’s own type name.
createTypeQLiteServices Creates the TypeQLite language services: Langium’s defaults, the generated modules and the hand-written ones, composed, with the validation checks registered.
docCommentOf TypeDB’s doc comment: #! This represents a person on the line or lines directly above a definition.
editDistance Levenshtein distance: how many single-character edits turn one label into the other.
expressionVariables The variables an expression reads, in order of appearance.
grammarKeywords The keywords of a Langium grammar, collected as langium-cli’s own TextMate generator collects them: every keyword in a reachable parser or infix rule.
isAbstractAnnotation Whether item is an AbstractAnnotation node, as a type guard.
isAnnotation Whether item is an Annotation node, as a type guard.
isAnnotationKeyword Whether item is one of the keywords of the grammar rule AnnotationKeyword, as a type guard.
isAnonRelationPattern Whether item is an AnonRelationPattern node, as a type guard.
isAttributeDef Whether item is an AttributeDef node, as a type guard.
isBinaryExpression Whether item is a BinaryExpression node, as a type guard.
isBooleanLiteral Whether item is a BooleanLiteral node, as a type guard.
isCallComparisonPattern Whether item is a CallComparisonPattern node, as a type guard.
isCapability Whether item is a Capability node, as a type guard.
isCapabilityOwns Whether item is a CapabilityOwns node, as a type guard.
isCapabilityPlays Whether item is a CapabilityPlays node, as a type guard.
isCapabilityRelates Whether item is a CapabilityRelates node, as a type guard.
isCapabilitySub Whether item is a CapabilitySub node, as a type guard.
isCapabilityValue Whether item is a CapabilityValue node, as a type guard.
isCardAnnotation Whether item is a CardAnnotation node, as a type guard.
isCascadeAnnotation Whether item is a CascadeAnnotation node, as a type guard.
isClause Whether item is a Clause node, as a type guard.
isComparator Whether item is one of the keywords of the grammar rule Comparator, as a type guard.
isComparisonPattern Whether item is a ComparisonPattern node, as a type guard.
isDateLiteral Whether item is a DateLiteral node, as a type guard.
isDatetimeLiteral Whether item is a DatetimeLiteral node, as a type guard.
isDatetimeTzLiteral Whether item is a DatetimeTzLiteral node, as a type guard.
isDecimalLiteral Whether item is a DecimalLiteral node, as a type guard.
isDefineClause Whether item is a DefineClause node, as a type guard.
isDefinition Whether item is a Definition node, as a type guard.
isDeleteStage Whether item is a DeleteStage node, as a type guard.
isDeletion Whether item is a Deletion node, as a type guard.
isDisjunctionPattern Whether item is a DisjunctionPattern node, as a type guard.
isDistinctAnnotation Whether item is a DistinctAnnotation node, as a type guard.
isDistinctStage Whether item is a DistinctStage node, as a type guard.
isDocAnnotation Whether item is a DocAnnotation node, as a type guard.
isDoubleLiteral Whether item is a DoubleLiteral node, as a type guard.
isDurationLiteral Whether item is a DurationLiteral node, as a type guard.
isEntityDef Whether item is an EntityDef node, as a type guard.
isExpression Whether item is an Expression node, as a type guard.
isFetchAllAttributes Whether item is a FetchAllAttributes node, as a type guard.
isFetchAttribute Whether item is a FetchAttribute node, as a type guard.
isFetchEntry Whether item is a FetchEntry node, as a type guard.
isFetchExpression Whether item is a FetchExpression node, as a type guard.
isFetchKeyValue Whether item is a FetchKeyValue node, as a type guard.
isFetchList Whether item is a FetchList node, as a type guard.
isFetchObject Whether item is a FetchObject node, as a type guard.
isFetchSingle Whether item is a FetchSingle node, as a type guard.
isFetchStage Whether item is a FetchStage node, as a type guard.
isFetchValue Whether item is a FetchValue node, as a type guard.
isFunctionBody Whether item is a FunctionBody node, as a type guard.
isFunctionDefinition Whether item is a FunctionDefinition node, as a type guard.
isFunctionExpression Whether item is a FunctionExpression node, as a type guard.
isFunctionName Whether item is a value of the grammar rule FunctionName, which is plain text.
isFunctionOutput Whether item is a FunctionOutput node, as a type guard.
isFunctionOutputType Whether item is a FunctionOutputType node, as a type guard.
isFunctionParameter Whether item is a FunctionParameter node, as a type guard.
isGivenDeclaration Whether item is a GivenDeclaration node, as a type guard.
isGivenStage Whether item is a GivenStage node, as a type guard.
isHasProperty Whether item is a HasProperty node, as a type guard.
isIidProperty Whether item is an IidProperty node, as a type guard.
isIndependentAnnotation Whether item is an IndependentAnnotation node, as a type guard.
isInsertStage Whether item is an InsertStage node, as a type guard.
isIntLiteral Whether item is an IntLiteral node, as a type guard.
isIsaProperty Whether item is an IsaProperty node, as a type guard.
isIsPattern Whether item is an IsPattern node, as a type guard.
isKeyAnnotation Whether item is a KeyAnnotation node, as a type guard.
isKind Whether item is one of the keywords of the grammar rule Kind, as a type guard.
isKindLabelPattern Whether item is a KindLabelPattern node, as a type guard.
isKindPattern Whether item is a KindPattern node, as a type guard.
isLabelExpression Whether item is a LabelExpression node, as a type guard.
isLabelProperty Whether item is a LabelProperty node, as a type guard.
isLeadStage Whether item is a LeadStage node, as a type guard.
isLetPattern Whether item is a LetPattern node, as a type guard.
isLimitStage Whether item is a LimitStage node, as a type guard.
isLinksProperty Whether item is a LinksProperty node, as a type guard.
isLiteral Whether item is a Literal node, as a type guard.
isLiteralExpression Whether item is a LiteralExpression node, as a type guard.
isMatchStage Whether item is a MatchStage node, as a type guard.
isMetaAnnotation Whether item is a MetaAnnotation node, as a type guard.
isNegationExpression Whether item is a NegationExpression node, as a type guard.
isNegationPattern Whether item is a NegationPattern node, as a type guard.
isOffsetStage Whether item is an OffsetStage node, as a type guard.
isOptionalPattern Whether item is an OptionalPattern node, as a type guard.
isOwnsProperty Whether item is an OwnsProperty node, as a type guard.
isOwnsTrait Whether item is an OwnsTrait node, as a type guard.
isPattern Whether item is a Pattern node, as a type guard.
isPatternBlock Whether item is a PatternBlock node, as a type guard.
isPipeline Whether item is a Pipeline node, as a type guard.
isPlaysProperty Whether item is a PlaysProperty node, as a type guard.
isPlaysTrait Whether item is a PlaysTrait node, as a type guard.
isProperty Whether item is a Property node, as a type guard.
isPutStage Whether item is a PutStage node, as a type guard.
isRangeAnnotation Whether item is a RangeAnnotation node, as a type guard.
isRedefineAnnotations Whether item is a RedefineAnnotations node, as a type guard.
isRedefineChange Whether item is a RedefineChange node, as a type guard.
isRedefineClause Whether item is a RedefineClause node, as a type guard.
isRedefineLabel Whether item is a RedefineLabel node, as a type guard.
isRedefineRoleLabel Whether item is a RedefineRoleLabel node, as a type guard.
isRedefineSub Whether item is a RedefineSub node, as a type guard.
isRedefineTrait Whether item is a RedefineTrait node, as a type guard.
isRedefineType Whether item is a RedefineType node, as a type guard.
isRedefineValue Whether item is a RedefineValue node, as a type guard.
isRedefinition Whether item is a Redefinition node, as a type guard.
isReduceStage Whether item is a ReduceStage node, as a type guard.
isReduction Whether item is a Reduction node, as a type guard.
isRegexAnnotation Whether item is a RegexAnnotation node, as a type guard.
isRelatesProperty Whether item is a RelatesProperty node, as a type guard.
isRelatesTrait Whether item is a RelatesTrait node, as a type guard.
isRelationDef Whether item is a RelationDef node, as a type guard.
isRequireStage Whether item is a RequireStage node, as a type guard.
isReservedKeyword Whether TypeDB refuses word as an identifier with [DEX31] — see RESERVED.
isReturnReduction Whether item is a ReturnReduction node, as a type guard.
isReturnStage Whether item is a ReturnStage node, as a type guard.
isRoleName Whether item is a RoleName node, as a type guard.
isRolePlayer Whether item is a RolePlayer node, as a type guard.
isRolePlayers Whether item is a RolePlayers node, as a type guard.
isRoleRef Whether item is a RoleRef node, as a type guard.
isScopedLabel Whether item is a value of the grammar rule ScopedLabel, which is plain text.
isSelectStage Whether item is a SelectStage node, as a type guard.
isSortKey Whether item is a SortKey node, as a type guard.
isSortStage Whether item is a SortStage node, as a type guard.
isStage Whether item is a Stage node, as a type guard.
isStringLiteral Whether item is a StringLiteral node, as a type guard.
isStructDef Whether item is a StructDef node, as a type guard.
isStructField Whether item is a StructField node, as a type guard.
isSubProperty Whether item is a SubProperty node, as a type guard.
isThingPattern Whether item is a ThingPattern node, as a type guard.
isTrait Whether item is a Trait node, as a type guard.
isTypeDefinition Whether a definition is a type’s: what every schema rule about types reads.
isTypeExtensionDef Whether item is a TypeExtensionDef node, as a type guard.
isTypePattern Whether item is a TypePattern node, as a type guard.
isTypeQLiteFile Whether item is a TypeQLiteFile node, as a type guard.
isUndefineAnnotation Whether item is an UndefineAnnotation node, as a type guard.
isUndefineClause Whether item is an UndefineClause node, as a type guard.
isUndefineFrom Whether item is an UndefineFrom node, as a type guard.
isUndefineOwns Whether item is an UndefineOwns node, as a type guard.
isUndefinePlays Whether item is an UndefinePlays node, as a type guard.
isUndefineRelates Whether item is an UndefineRelates node, as a type guard.
isUndefineSpecialize Whether item is an UndefineSpecialize node, as a type guard.
isUndefineSub Whether item is an UndefineSub node, as a type guard.
isUndefineTarget Whether item is an UndefineTarget node, as a type guard.
isUndefineType Whether item is an UndefineType node, as a type guard.
isUndefineValue Whether item is an UndefineValue node, as a type guard.
isUndefinition Whether item is an Undefinition node, as a type guard.
isUniqueAnnotation Whether item is an UniqueAnnotation node, as a type guard.
isUpdateStage Whether item is an UpdateStage node, as a type guard.
isValueProperty Whether item is a ValueProperty node, as a type guard.
isValuesAnnotation Whether item is a ValuesAnnotation node, as a type guard.
isValueType Whether item is a value of the grammar rule ValueType: one of its keywords, or other text.
isVariableExpression Whether item is a VariableExpression node, as a type guard.
isWriteStage Whether item is a WriteStage node, as a type guard.
keywordOf CardAnnotation → @card, for messages.
kindOf The word that introduces a definition: the outline’s detail, and hover’s heading.
literalFits Whether a literal can constrain a value type — @values(0.1) cannot constrain an integer, @regex("A") nothing but a string, @range("A".."B") nothing but a string.
literalKind What a literal is, for a message: a string, an integer, …
registerValidationChecks Validation for what the grammar accepts but the runtime does not implement.
relationBefore The relation a role being typed belongs to, read from the text before the cursor.
reservedKeywordMessage The [DEX31] refusal, worded once for the validator and for the engine’s parse step.
sameSchema Whether two documents are part of the same schema.
schemaOwnerOf The key of the schema a document belongs to: its notebook for a cell, the workspace for anything else.
subjectsAdmitting The subjects that admit a category — named in the refusal, so it says where the annotation goes.
TypeQLiteGrammar The TypeQLite grammar as a Langium Grammar, loaded from its JSON the first time it is asked for.
typeqliteTextMate The grammar for these keywords.
validateSync Run the registered validation checks over an AST, synchronously.

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.