Skip to main content

Module typechecker

Module typechecker 

Source

Structs§

BindingTypeInfo
Semantic type inferred or declared for one plain local binding.
InlayHintInfo
An inlay hint produced during type checking.
NamespaceImportBinding
Static info for one import * as alias from "path" binding.
PredicateModelRoute
PredicateQuestionSpec
One checked question. labels are the criteria keys of a choice or the ordered levels of a score, and are empty for a boolean.
PredicateSite
A checked source site. Consumers hash the canonical type and question set at their artifact boundary; this record never contains runtime input values.
RelatedDiagnostic
TypeCheckFacts
Typed facts produced by one complete checker walk.
TypeChecker
The static type checker.
TypeDiagnostic
A diagnostic produced by the type checker.

Enums§

DiagnosticDetails
Optional structured companion data on a TypeDiagnostic. The variants map one-to-one with diagnostics that have specific tooling-consumable state beyond the human-readable message; each variant is attached only by the sites that produce its corresponding diagnostic, so a consumer can pattern-match on the variant without parsing the error string.
DiagnosticSeverity
PredicateQuestionKind
PredicateSiteKind
Which entry point declared a site. Both evaluate one question set through one evaluator; they differ only in the outcome they project.

Functions§

block_definitely_exits
Check whether a block definitely exits (contains a terminating statement).
canonical_predicate_type
A deterministic structural identity, independent of field/union ordering and source spans. This is material for an artifact/cache digest, not a hash.
format_type
Pretty-print a type expression for display in error messages.
shape_mismatch_detail
Produce a detail string describing why a Shape type is incompatible with another Shape type — e.g. “missing field ‘age’ (int)” or “field ‘name’ has type int, expected string”. Returns None if both types are not shapes.
stmt_definitely_exits
Check whether a single statement definitely exits (return/throw/break/continue or an if/else / match where every reachable branch exits).
substitute_type_expr
Substitute generic bindings with the same open-row folding used by type inference. Schema compilation calls this instead of carrying a second type expression rewriter.