Skip to content

GramIO API Reference / @gramio/scenes/dist / SceneEnterHandler

Interface: SceneEnterHandler()

Defined in: scenes/index.d.ts:309

enter(scene, params?) typed via two overloads so each case is checked cleanly without relying on a conditional-rest-args dance (which expect- type's toBeCallableWith can't fully resolve under generic constraints):

• If the Scene declares Params = never (never called .params<T>()), enter(scene) is valid with no second argument. • If the Scene declares params, enter(scene, params) is required and the params shape is enforced against the declared type.

Call Signature

SceneEnterHandler<S>(scene): Promise<void>

Defined in: scenes/index.d.ts:310

enter(scene, params?) typed via two overloads so each case is checked cleanly without relying on a conditional-rest-args dance (which expect- type's toBeCallableWith can't fully resolve under generic constraints):

• If the Scene declares Params = never (never called .params<T>()), enter(scene) is valid with no second argument. • If the Scene declares params, enter(scene, params) is required and the params shape is enforced against the declared type.

Type Parameters

Type Parameter
S extends Scene<never, any, any, any>

Parameters

ParameterType
sceneS

Returns

Promise<void>

Call Signature

SceneEnterHandler<S>(scene, params): Promise<void>

Defined in: scenes/index.d.ts:311

enter(scene, params?) typed via two overloads so each case is checked cleanly without relying on a conditional-rest-args dance (which expect- type's toBeCallableWith can't fully resolve under generic constraints):

• If the Scene declares Params = never (never called .params<T>()), enter(scene) is valid with no second argument. • If the Scene declares params, enter(scene, params) is required and the params shape is enforced against the declared type.

Type Parameters

Type Parameter
S extends AnyScene

Parameters

ParameterType
sceneS
paramsSceneParamsOf<S>

Returns

Promise<void>