Skip to content

@vttforge/core / moduleApi

Function: moduleApi()

moduleApi<T>(moduleId): T | undefined

The api another module publishes, or undefined.

The type argument is the caller's claim about the shape. Nothing checks it, because the other module's types are not ours to import: write down what you use and treat it the way you would any other value crossing a boundary.

Type Parameters

T

T = PackageApi

Parameters

moduleId

string

Returns

T | undefined

MIT licensed.