Skip to content
Classcorev0.13.0

FolderExports

Registers the values that the files in one folder export, and keeps them registered while you edit those files under seedcord dev. is picks which exports count.

A value that two files export, like a class and the barrel that re-exports it, registers once and unregisters once neither file exports it.

Call load() from your plugin's init() and handle() from its onHmr().

class FolderExports<TUnit>

Member visibility

Filter class members by access level.

constructor

Constructs a new instance of the FolderExports class

FolderExports(options: FolderExportsOptions<TUnit>)

Showing members with Protected visibility and higher.

TUnit

TUnit

handle()

Unloads or reloads the files in this folder that an HmrUpdateEvent affects. When that unloads something, it also retries every file whose register threw earlier.

public async handle(event: HmrUpdateEvent): Promise<void>

load()

Imports every file in the folder and registers each unit once.

public async load(): Promise<void>

Throws:

A SeedcordError when a file throws while it imports.

Throws:

Whatever register throws.