Module
[<Interface>]
type Module =
abstract member children: Module array with get, set
abstract member exports: obj with get, set
abstract member filename: string with get, set
abstract member id: string with get, set
abstract member isPreloading: bool with get, set
abstract member loaded: bool with get, set
abstract member parent: Module option with get, set
abstract member path: string with get, set
abstract member paths: string array with get, set
static member Create (children: Module array, exports: obj, filename: string, id: string, isPreloading: bool, loaded: bool, path: string, paths: string array, require: string -> obj, ?parent: Module) : Module
abstract member require (id: string) : obj| Assembly | Xantham.Fable.Node |
| Attributes | [<Interface>] |
Properties
abstract member children: Module array with get, set
abstract member children: Module array with get, setThe module objects required for the first time by this one.
@since v0.1.16
abstract member exports: obj with get, set
abstract member exports: obj with get, setThe module.exports object is created by the Module system. Sometimes this is not acceptable; many want their module to be an instance of some class. To do this, assign the desired export object to module.exports.
@since v0.1.16
abstract member filename: string with get, set
abstract member filename: string with get, setThe fully resolved filename of the module.
@since v0.1.16
abstract member id: string with get, set
abstract member id: string with get, setThe identifier for the module. Typically this is the fully resolved filename.
@since v0.1.16
abstract member isPreloading: bool with get, set
abstract member isPreloading: bool with get, settrue if the module is running during the Node.js preload phase.
@since v15.4.0, v14.17.0
abstract member loaded: bool with get, set
abstract member loaded: bool with get, setWhether or not the module is done loading, or is in the process of loading.
@since v0.1.16
abstract member parent: Module option with get, set
abstract member parent: Module option with get, setThe module that first required this one, or null if the current module is the entry point of the current process, or undefined if the module was loaded by something that is not a CommonJS module (e.g. REPL or import).
@since v0.1.16
abstract member path: string with get, set
abstract member path: string with get, setThe directory name of the module. This is usually the same as the path.dirname() of the module.id.
@since v11.14.0