Appearance
twine / moduleFn
Function: moduleFn() โ
moduleFn(
owner,name,opts?): (dp) =>FunctionRef
Defined in: twine/src/core/module-fn.ts:22
A handle to the function <owner's folder>/<name>: the owner builds it, any module calls it.
export const lightCampfire = moduleFn(CampfireModule, "light"); lightCampfire(dp).build(...); // in CampfireModule.register ctx.call(lightCampfire(dp)); // anywhere else
Every call returns the same function, created on first use, so module order doesn't matter.
Parameters โ
owner โ
name โ
string
opts? โ
public? โ
boolean
Returns โ
(dp) => FunctionRef