Skip to content

Scope

export type Scope<Constructors = typeof(Fusion)> = {unknown} & Constructors

A table collecting all objects created as part of an independent unit of code, with optional Constructors as methods which can be called.

Scopes are not unique

Fusion can recycle old unused scopes. This helps make scopes more lightweight, but it also means they don't uniquely belong to any part of your program.

As a result, you shouldn't hold on to scopes after they've been cleaned up, and you shouldn't use them as unique identifiers anywhere.


Learn More

Back to top