Skip to content

Typelib

A module's typelib: its declarations as check reads them, without its source.

Checking units against a typelib checks them against the module's declarations, but not the module's own bodies. A typelib is read only by the version of Do that wrote it.

Example

let lib = compile "lib.dol" $lib_source module: lib typecheck: true
let result = check [lib] typelibs: true
let typelib = Typelib $result.typelib(lib)
echo $typelib.module

Constructor

Typelib bytes

Reads a typelib.

Parameters

NameTypeDescription
bytes Bin Bytes from Checked.typelib.

Errors

DataError if bytes is malformed, or from another version of Do.

Fields

module @ Str [get]

The module's name.

path @ Str [get]

The path of the module's source when the typelib was written.