This directory holds TypeScript implementations of Go packages that do not
transpile to working code: standard-library packages such as sync, os, and
reflect, and third-party packages under github.com/ and golang.org/.
builtin/ is the runtime that every generated file imports as
@goscript/builtin.
Each directory mirrors a Go import path. When a compiled package imports a path
that has a directory here, the compiler copies the handwritten package into the
output instead of transpiling the Go source. --gs-path adds more directories
with the same layout.
A package directory contains:
index.ts, which exports the package API, and the.tsfiles behind it.meta.json, when the compiler needs facts it cannot read from TypeScript:dependencieslists other overrides the package imports, andasyncFunctionsandasyncMethodsmark calls that suspend, such asMutex.Lock. The compiler awaits those calls and colors their callers async.callbackAsyncFunctionsmarks functions such asslices.IndexFuncthat suspend only when a function argument does, so the compiler awaits only those calls.syncInterfacesnames interfaces, such asreflect.Type, whose override values suspend only whereasyncMethodssays; every override that hands out such a value must keep that promise (see OVERRIDES.md).godoc.txt, where present, the upstreamgo docoutput kept for reference.parity.json, where present, which records each upstream symbol asreal,deferred, orblockedwith a reason.