GlispGlisp
Home
Guide
Playground
  • Overview
  • Syntax
  • Types
  • Evaluation
  • Host API
API
  • English
  • 日本語
GitHub
Home
Guide
Playground
  • Overview
  • Syntax
  • Types
  • Evaluation
  • Host API
API
  • English
  • 日本語
GitHub
  • API

    • glisp
    • build
    • check
    • eval
    • expand
    • expectedType
    • infer
    • lex
    • parse
    • print
    • session
    • types

glisp


glisp / expectedType

expectedType

Functions

expectedTypeAt()

expectedTypeAt(parent, slot, env): TypeValue | null

Defined in: expectedType.ts:44

Return the TypeValue that a host editor should expect at slot inside parent. Used by GUI hosts to drive type-aware completion, placeholder rendering, and “what would fit here?” hints.

Slot encoding (see file header): a number is a positional index for call / vec; a string is either a record / kwarg field name, or one of the fn slot tags ('return', 'param:N').

Returns null when no type information can be derived (an empty record, an untyped call head, an out-of-range slot, etc.).

Parameters

ParameterType
parentAST
slotstring | number
envEnv

Returns

TypeValue | null

Edit this page
Prev
expand
Next
infer