Skip to content

Require

[<Interface>]
type Require =
    abstract member cache: Dict<Module> with get, set
    abstract member extensions: RequireExtensions with get, set
    abstract member main: Module option with get, set
    abstract member resolve: RequireResolve with get, set
    abstract member Invoke (id: string) : obj
AssemblyXantham.Fable.Node

Properties

abstract member cache: Dict<Module> with get, set

Modules are cached in this object when they are required. By deleting a key value from this object, the next require will reload the module. This does not apply to native addons, for which reloading will result in an error.

@since v0.3.0

abstract member extensions: RequireExtensions with get, set

Instruct require on how to handle certain file extensions.

@since v0.3.0

abstract member main: Module option with get, set

The Module object representing the entry script loaded when the Node.js process launched, or undefined if the entry point of the program is not a CommonJS module.

@since v0.1.17

abstract member resolve: RequireResolve with get, set

@since v0.3.0

Methods

abstract member Invoke (id: string) : obj

@since v0.1.13