import{_ as e,c as t,o as a,N as r}from"./chunks/framework.0799945b.js";const b=JSON.parse('{"title":"Module: features/reset","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/modules/features/reset.md","lastUpdated":null}'),s={name:"api/modules/features/reset.md"},o=r('

Module: features/reset

Interfaces

BaseReset

BaseReset: Object

The properties that are added onto a processed ResetOptions to create an Reset.

NameTypeDescription
idstringAn auto-generated ID for identifying which reset is being performed. Will not persist between refreshes or updates.
resetVoidFunctionTrigger the reset.
typetypeof ResetTypeA symbol that helps identify features of the same type.

Defined in

profectus/src/features/reset.ts:30


ResetOptions

ResetOptions: Object

An object that configures a Clickable.

NameTypeDescription
onReset?VoidFunctionA function that is called when the reset is performed.
thingsToResetComputable<Record<string, unknown>[]>List of things to reset. Can include objects which will be recursed over for persistent values.

Defined in

profectus/src/features/reset.ts:20

Type Aliases

GenericReset

Ƭ GenericReset: Reset<ResetOptions>

A type that matches any valid Reset object.

Defined in

profectus/src/features/reset.ts:48


Reset

Ƭ Reset<T>: Replace<T & BaseReset, { thingsToReset: GetComputableType<T["thingsToReset"]> }>

An object that represents a reset mechanic, which resets progress back to its initial state.

Type parameters

NameType
Textends ResetOptions

Defined in

profectus/src/features/reset.ts:40

Variables

ResetType

Const ResetType: typeof ResetType

A symbol used to identify Reset features.

Defined in

profectus/src/features/reset.ts:15

Functions

createReset

createReset<T>(optionsFunc): Reset<T>

Lazily creates a reset with the given options.

Type parameters
NameType
Textends ResetOptions
Parameters
NameTypeDescription
optionsFuncOptionsFunc<T, BaseReset, GenericReset>Reset options.
Returns

Reset<T>

Defined in

profectus/src/features/reset.ts:54


trackResetTime

trackResetTime(layer, reset): Persistent<default>

Track the time since the specified reset last occured.

Parameters
NameTypeDescription
layerBaseLayerThe layer the reset is attached to
resetGenericResetThe reset mechanic to track the time since
Returns

Persistent<default>

Defined in

profectus/src/features/reset.ts:92

',57),d=[o];function i(n,l,c,h,f,p){return a(),t("div",null,d)}const g=e(s,[["render",i]]);export{b as __pageData,g as default};