Discover Packages
github.com/type-rb/type-rb
internal
playground
package
Version:
v0.1.9
Opens a new window with list of versions in this module.
Published: Aug 7, 2026
License: MIT
Opens a new window with license information.
Imports: 24
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Rendered for
linux/amd64
windows/amd64
darwin/amd64
js/wasm
Package playground serves the local TypeRB playground and guided tour.
Compilation and evaluation use the same compiler and typed IR as the CLI.
ValidateTour compiles and evaluates every lesson in every output mode. It is
intentionally exposed through `trb tour --check` rather than run as part of
every ordinary project build.
type Config struct {
Transport string `json:"transport"`
Mode string `json:"mode"`
Modes []string `json:"modes"`
Page string `json:"page,omitempty"`
Version string `json:"version"`
}
type Diagnostic struct {
Severity string `json:"severity"`
Message string `json:"message"`
Line int `json:"line,omitempty"`
Column int `json:"column,omitempty"`
EndLine int `json:"endLine,omitempty"`
EndColumn int `json:"endColumn,omitempty"`
}
type Lesson struct {
ID string `json:"id"`
Chapter string `json:"chapter"`
Title string `json:"title"`
Eyebrow string `json:"eyebrow"`
Description string `json:"description"`
Source string `json:"source"`
Expected string `json:"expected"`
Hint string `json:"hint"`
}
type Request struct {
Source string `json:"source"`
Mode string `json:"mode"`
}
type Response struct {
OK bool `json:"ok"`
Output string `json:"output,omitempty"`
Generated string `json:"generated,omitempty"`
Formatted string `json:"formatted,omitempty"`
Diagnostics []Diagnostic `json:"diagnostics,omitempty"`
DurationMS int64 `json:"durationMs"`
}
type StaticOptions struct {
OutputDir string
Version string
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.