@sandustry-modding/types 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -12
- package/docs/Changelog.md +46 -0
- package/docs/README.md +62 -0
- package/package.json +11 -10
- package/src/sandkit/api/blueprints.d.ts +33 -0
- package/src/sandkit/api/effects.d.ts +127 -0
- package/src/sandkit/api/elements.d.ts +385 -0
- package/src/sandkit/api/entities.d.ts +79 -0
- package/src/sandkit/api/events.d.ts +137 -0
- package/src/sandkit/api/excavation.d.ts +58 -0
- package/src/sandkit/api/factory.d.ts +38 -0
- package/src/sandkit/api/fire.d.ts +33 -0
- package/src/sandkit/api/game.d.ts +22 -0
- package/src/sandkit/api/grid.d.ts +180 -0
- package/src/sandkit/api/hooks.d.ts +357 -0
- package/{sandkit → src/sandkit}/api/i18n.d.ts +80 -4
- package/{sandkit → src/sandkit}/api/index.d.ts +6 -0
- package/src/sandkit/api/lights.d.ts +101 -0
- package/{sandkit → src/sandkit}/api/maps.d.ts +15 -0
- package/src/sandkit/api/pickups.d.ts +89 -0
- package/src/sandkit/api/pipes.d.ts +54 -0
- package/src/sandkit/api/player.d.ts +141 -0
- package/{sandkit → src/sandkit}/api/rendering.d.ts +8 -0
- package/{sandkit → src/sandkit}/api/sandkit-api.d.ts +19 -2
- package/src/sandkit/api/shared.d.ts +41 -0
- package/{sandkit → src/sandkit}/api/sound.d.ts +32 -2
- package/{sandkit → src/sandkit}/api/structures.d.ts +171 -18
- package/{sandkit → src/sandkit}/api/tech.d.ts +54 -1
- package/src/sandkit/api/terrains.d.ts +147 -0
- package/{sandkit → src/sandkit}/api/upgrades.d.ts +9 -0
- package/{sandkit → src/sandkit}/api/utils.d.ts +19 -2
- package/src/sandkit/api/world.d.ts +105 -0
- package/{sandkit → src/sandkit}/enums/index.d.ts +14 -0
- package/{shared → src/shared}/api/elements.d.ts +84 -12
- package/{shared/api/world.d.ts → src/shared/api/grid.d.ts} +29 -3
- package/{shared → src/shared}/api/player.d.ts +12 -0
- package/{shared → src/shared}/api/shared.d.ts +5 -3
- package/{shared → src/shared}/api/structures.d.ts +46 -0
- package/src/shared/api/terrains.d.ts +231 -0
- package/src/shared/api/world.d.ts +43 -0
- package/{shared → src/shared}/index.d.ts +2 -0
- package/src/worker/api/effects.d.ts +52 -0
- package/src/worker/api/elements.d.ts +266 -0
- package/src/worker/api/events.d.ts +75 -0
- package/src/worker/api/fire.d.ts +29 -0
- package/src/worker/api/grid.d.ts +45 -0
- package/src/worker/api/hooks.d.ts +111 -0
- package/src/worker/api/lights.d.ts +43 -0
- package/{worker → src/worker}/api/shared.d.ts +8 -3
- package/{worker → src/worker}/index.d.ts +8 -5
- package/{worker → src/worker}/sandkit-api.d.ts +12 -3
- package/CHANGELOG.md +0 -19
- package/sandkit/api/effects.d.ts +0 -76
- package/sandkit/api/elements.d.ts +0 -237
- package/sandkit/api/events.d.ts +0 -53
- package/sandkit/api/excavation.d.ts +0 -34
- package/sandkit/api/fire.d.ts +0 -26
- package/sandkit/api/grid.d.ts +0 -26
- package/sandkit/api/hooks.d.ts +0 -52
- package/sandkit/api/lights.d.ts +0 -66
- package/sandkit/api/player.d.ts +0 -84
- package/sandkit/api/shared.d.ts +0 -27
- package/sandkit/api/terrains.d.ts +0 -125
- package/sandkit/api/world.d.ts +0 -107
- package/shared/api/terrains.d.ts +0 -100
- package/worker/api/elements.d.ts +0 -60
- /package/{global.d.ts → src/global.d.ts} +0 -0
- /package/{sandkit → src/sandkit}/api/action.d.ts +0 -0
- /package/{sandkit → src/sandkit}/api/assets.d.ts +0 -0
- /package/{sandkit → src/sandkit}/api/authorization.d.ts +0 -0
- /package/{sandkit → src/sandkit}/api/building.d.ts +0 -0
- /package/{sandkit → src/sandkit}/api/camera.d.ts +0 -0
- /package/{sandkit → src/sandkit}/api/collector.d.ts +0 -0
- /package/{sandkit → src/sandkit}/api/constants.d.ts +0 -0
- /package/{sandkit → src/sandkit}/api/cooldown.d.ts +0 -0
- /package/{sandkit → src/sandkit}/api/discoveries.d.ts +0 -0
- /package/{sandkit → src/sandkit}/api/energy.d.ts +0 -0
- /package/{sandkit → src/sandkit}/api/gameconfig.d.ts +0 -0
- /package/{sandkit → src/sandkit}/api/input.d.ts +0 -0
- /package/{sandkit → src/sandkit}/api/items.d.ts +0 -0
- /package/{sandkit → src/sandkit}/api/mods.d.ts +0 -0
- /package/{sandkit → src/sandkit}/api/patterns.d.ts +0 -0
- /package/{sandkit → src/sandkit}/api/processing.d.ts +0 -0
- /package/{sandkit → src/sandkit}/api/progression.d.ts +0 -0
- /package/{sandkit → src/sandkit}/api/projectiles.d.ts +0 -0
- /package/{sandkit → src/sandkit}/api/random.d.ts +0 -0
- /package/{sandkit → src/sandkit}/api/raycast.d.ts +0 -0
- /package/{sandkit → src/sandkit}/api/reactions.d.ts +0 -0
- /package/{sandkit → src/sandkit}/api/resources.d.ts +0 -0
- /package/{sandkit → src/sandkit}/api/scene.d.ts +0 -0
- /package/{sandkit → src/sandkit}/api/schedule.d.ts +0 -0
- /package/{sandkit → src/sandkit}/api/settings.d.ts +0 -0
- /package/{sandkit → src/sandkit}/api/signals.d.ts +0 -0
- /package/{sandkit → src/sandkit}/api/sprites.d.ts +0 -0
- /package/{sandkit → src/sandkit}/api/storage.d.ts +0 -0
- /package/{sandkit → src/sandkit}/api/structureBehaviors.d.ts +0 -0
- /package/{sandkit → src/sandkit}/api/time.d.ts +0 -0
- /package/{sandkit → src/sandkit}/api/tools.d.ts +0 -0
- /package/{sandkit → src/sandkit}/api/triggers.d.ts +0 -0
- /package/{sandkit → src/sandkit}/api/ui.d.ts +0 -0
- /package/{sandkit → src/sandkit}/api/workers.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/api/augments.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/api/auralite.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/api/blueprints.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/api/clipboard.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/api/colorPicker.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/api/coloringTool.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/api/conveyors.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/api/debug.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/api/drones.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/api/entities.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/api/extensions.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/api/factory.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/api/foliage.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/api/foundationColorPicker.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/api/game.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/api/heatTransfer.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/api/index.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/api/launchers.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/api/lightColorPicker.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/api/matters.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/api/misc.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/api/portals.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/api/prefabData.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/api/prefabDecor.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/api/prefabulator.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/api/prismaline.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/api/prismite.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/api/queue.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/api/shadows.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/api/strataform.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/api/swarmConsole.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/api/sweeperDrone.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/api/teleportZones.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/api/tutorialBuild.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/api/usageTracker.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/api/wall.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/api/workerLocal.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/index.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/retro-console.d.ts +0 -0
- /package/{sandkit → src/sandkit}/engine/state.d.ts +0 -0
- /package/{sandkit → src/sandkit}/index.d.ts +0 -0
- /package/{sandkit → src/sandkit}/react.d.ts +0 -0
- /package/{shared → src/shared}/api/effects.d.ts +0 -0
- /package/{shared → src/shared}/api/maps.d.ts +0 -0
- /package/{shared → src/shared}/api/ui.d.ts +0 -0
- /package/{shared → src/shared}/asset.d.ts +0 -0
- /package/{shared → src/shared}/engine.d.ts +0 -0
- /package/{shared → src/shared}/jsonvalue.d.ts +0 -0
- /package/{shared → src/shared}/nominal.d.ts +0 -0
- /package/{shared → src/shared}/player.d.ts +0 -0
- /package/{worker → src/worker}/api/main.d.ts +0 -0
- /package/{worker → src/worker}/api/worker.d.ts +0 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Factory progression level and process counters.
|
|
3
|
+
*
|
|
4
|
+
* Available as `sandkit.api.factory`.
|
|
5
|
+
*
|
|
6
|
+
* @see https://sandustry.com/sandkit.html Official Sandkit API — Main entry `api.factory`
|
|
7
|
+
*/
|
|
8
|
+
export namespace factory {
|
|
9
|
+
/**
|
|
10
|
+
* Return the current factory level.
|
|
11
|
+
*
|
|
12
|
+
* @see https://sandustry.com/sandkit.html Official Sandkit API — Main entry `api.factory.getLevel`
|
|
13
|
+
*/
|
|
14
|
+
export function getLevel(): number;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Return completed count for a factory process.
|
|
18
|
+
*
|
|
19
|
+
* @param processId - Built-in factory process id.
|
|
20
|
+
* @see https://sandustry.com/sandkit.html Official Sandkit API — Main entry `api.factory.getProcessCount`
|
|
21
|
+
*/
|
|
22
|
+
export function getProcessCount(processId: FactoryProcessId): number;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Return completion rate for a factory process.
|
|
26
|
+
*
|
|
27
|
+
* @param processId - Built-in factory process id.
|
|
28
|
+
* @see https://sandustry.com/sandkit.html Official Sandkit API — Main entry `api.factory.getProcessRate`
|
|
29
|
+
*/
|
|
30
|
+
export function getProcessRate(processId: FactoryProcessId): number;
|
|
31
|
+
|
|
32
|
+
/** Built-in factory process identifiers. */
|
|
33
|
+
export type FactoryProcessId =
|
|
34
|
+
| "shakeWetSand"
|
|
35
|
+
| "pressBurntResidue"
|
|
36
|
+
| "growFlowers"
|
|
37
|
+
| "condenseFlorin";
|
|
38
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { CellCoordinates } from "../../shared/player";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* `sandkit.api.fire` — ignite and burn elements at grid cells.
|
|
5
|
+
* Main thread only.
|
|
6
|
+
*
|
|
7
|
+
* @see https://sandustry.com/sandkit.html Official Sandkit API — Main entry `api.fire`
|
|
8
|
+
*/
|
|
9
|
+
export namespace fire {
|
|
10
|
+
/**
|
|
11
|
+
* Returns true when the element at the cell can burn.
|
|
12
|
+
*
|
|
13
|
+
* @param cellX - Grid cell X coordinate.
|
|
14
|
+
* @param cellY - Grid cell Y coordinate.
|
|
15
|
+
* @see https://sandustry.com/sandkit.html Official Sandkit API — Main entry `api.fire.canBurnElementAtCell`
|
|
16
|
+
*/
|
|
17
|
+
export function canBurnElementAtCell(...args: CellCoordinates): boolean;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Burn the element at the cell. Main-entry writes are deferred; reads see the old grid.
|
|
21
|
+
*
|
|
22
|
+
* @param cellX - Grid cell X coordinate.
|
|
23
|
+
* @param cellY - Grid cell Y coordinate.
|
|
24
|
+
* @see https://sandustry.com/sandkit.html#mutations-heading Official Sandkit API — Main entry `api.fire.burnElementAtCell`
|
|
25
|
+
*/
|
|
26
|
+
export function burnElementAtCell(...args: CellCoordinates): void;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated Use {@link burnElementAtCell} instead.
|
|
30
|
+
* @see https://sandustry.com/sandkit.html Official Sandkit API — deprecated alias of `api.fire.burnElementAtCell`
|
|
31
|
+
*/
|
|
32
|
+
export function burnElementAtCellWhenIdle(...args: CellCoordinates): void;
|
|
33
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Game session start helpers.
|
|
3
|
+
*
|
|
4
|
+
* Available as `sandkit.api.game`.
|
|
5
|
+
*
|
|
6
|
+
* @see https://sandustry.com/sandkit.html Official Sandkit API — Main entry `api.game`
|
|
7
|
+
*/
|
|
8
|
+
export namespace game {
|
|
9
|
+
/**
|
|
10
|
+
* Start or restart the game session.
|
|
11
|
+
*
|
|
12
|
+
* @param options - Optional session start flags.
|
|
13
|
+
* @see https://sandustry.com/sandkit.html Official Sandkit API — Main entry `api.game.start`
|
|
14
|
+
*/
|
|
15
|
+
export function start(options?: GameStartOptions): void;
|
|
16
|
+
|
|
17
|
+
/** Options for {@link start}. */
|
|
18
|
+
export interface GameStartOptions {
|
|
19
|
+
/** When true, skip the intro sequence. */
|
|
20
|
+
skipIntro?: boolean;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { CellCoordinates } from "../../shared/player";
|
|
2
|
+
import { shared } from "../../shared";
|
|
3
|
+
import type { elements } from "./elements";
|
|
4
|
+
import type { terrains } from "./terrains";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* `sandkit.api.grid` — grid cell queries, deferred mutations, and iteration.
|
|
8
|
+
*
|
|
9
|
+
* Main thread only.
|
|
10
|
+
*
|
|
11
|
+
* @see https://sandustry.com/sandkit.html Official Sandkit API — Main entry `api.grid`
|
|
12
|
+
*/
|
|
13
|
+
export namespace grid {
|
|
14
|
+
/**
|
|
15
|
+
* @see https://sandustry.com/sandkit.html Official Sandkit API — Main entry `api.grid.getCellIdAtCell`
|
|
16
|
+
*/
|
|
17
|
+
export import getCellIdAtCell = shared.api.grid.getCellIdAtCell;
|
|
18
|
+
/**
|
|
19
|
+
* @see https://sandustry.com/sandkit.html Official Sandkit API — Main entry `api.grid.isCellEmptyAtCell`
|
|
20
|
+
*/
|
|
21
|
+
export import isCellEmptyAtCell = shared.api.grid.isCellEmptyAtCell;
|
|
22
|
+
/**
|
|
23
|
+
* @see https://sandustry.com/sandkit.html Official Sandkit API — Main entry `api.grid.isTerrainAtCell`
|
|
24
|
+
*/
|
|
25
|
+
export import isTerrainAtCell = shared.api.grid.isTerrainAtCell;
|
|
26
|
+
/**
|
|
27
|
+
* @see https://sandustry.com/sandkit.html Official Sandkit API — Main entry `api.grid.reportActivityAtCell`
|
|
28
|
+
*/
|
|
29
|
+
export import reportActivityAtCell = shared.api.grid.reportActivityAtCell;
|
|
30
|
+
/**
|
|
31
|
+
* @see https://sandustry.com/sandkit.html Official Sandkit API — Main entry `api.grid.excavateAtCell`
|
|
32
|
+
*/
|
|
33
|
+
export import excavateAtCell = shared.api.grid.excavateAtCell;
|
|
34
|
+
/**
|
|
35
|
+
* @see https://sandustry.com/sandkit.html Official Sandkit API — Main entry `api.grid.getDimensions`
|
|
36
|
+
*/
|
|
37
|
+
export import getDimensions = shared.api.grid.getDimensions;
|
|
38
|
+
/** @see https://sandustry.com/sandkit.html Official Sandkit API — Main entry `api.grid.ExcavateOptions` */
|
|
39
|
+
export import ExcavateOptions = shared.api.grid.ExcavateOptions;
|
|
40
|
+
/** @see https://sandustry.com/sandkit.html Official Sandkit API — Main entry `api.grid.CellId` */
|
|
41
|
+
export import CellId = shared.api.grid.CellId;
|
|
42
|
+
/** @see https://sandustry.com/sandkit.html Official Sandkit API — Main entry `api.grid.GridDimensions` */
|
|
43
|
+
export import GridDimensions = shared.api.grid.GridDimensions;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Run deferred grid mutations on the main thread. Reads see the old grid until
|
|
47
|
+
* mutations apply.
|
|
48
|
+
*
|
|
49
|
+
* @param callback - Receives a writer for element and terrain cell mutations.
|
|
50
|
+
* @see https://sandustry.com/sandkit.html#mutations-heading
|
|
51
|
+
* @see https://sandustry.com/sandkit.html Official Sandkit API — Main entry `api.grid.mutate`
|
|
52
|
+
*/
|
|
53
|
+
export function mutate(callback: (writer: GridMutationWriter) => void): void;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Reveal fog of war at a cell.
|
|
57
|
+
*
|
|
58
|
+
* @param cellX - Grid column of the target cell.
|
|
59
|
+
* @param cellY - Grid row of the target cell.
|
|
60
|
+
* @see https://sandustry.com/sandkit.html Official Sandkit API — Main entry `api.grid.revealFogAtCell`
|
|
61
|
+
*/
|
|
62
|
+
export function revealFogAtCell(...args: CellCoordinates): void;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Request redraw around a cell.
|
|
66
|
+
*
|
|
67
|
+
* @param cellX - Grid column of the target cell.
|
|
68
|
+
* @param cellY - Grid row of the target cell.
|
|
69
|
+
* @param rangeCells - Radius in cells to redraw.
|
|
70
|
+
* @see https://sandustry.com/sandkit.html Official Sandkit API — Main entry `api.grid.redrawAroundCell`
|
|
71
|
+
*/
|
|
72
|
+
export function redrawAroundCell(...args: [...CellCoordinates, rangeCells: number]): void;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Calls the callback for each cell inside a circle.
|
|
76
|
+
*
|
|
77
|
+
* @param centerCellX - Circle center cell column.
|
|
78
|
+
* @param centerCellY - Circle center cell row.
|
|
79
|
+
* @param radiusCells - Circle radius in cells.
|
|
80
|
+
* @param callback - Invoked for each cell with `(cellX, cellY)`.
|
|
81
|
+
* @see https://sandustry.com/sandkit.html Official Sandkit API — Main entry `api.grid.forEachCellInCircle`
|
|
82
|
+
*/
|
|
83
|
+
export function forEachCellInCircle(centerCellX: number, centerCellY: number, radiusCells: number, callback: (...args: CellCoordinates) => void): void;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Calls the callback for each cell in a rectangle.
|
|
87
|
+
*
|
|
88
|
+
* @param cellX - Origin cell column (top-left).
|
|
89
|
+
* @param cellY - Origin cell row (top-left).
|
|
90
|
+
* @param widthCells - Rectangle width in cells.
|
|
91
|
+
* @param heightCells - Rectangle height in cells.
|
|
92
|
+
* @param callback - Invoked for each cell with `(cellX, cellY)`.
|
|
93
|
+
* @see https://sandustry.com/sandkit.html Official Sandkit API — Main entry `api.grid.forEachCellInRectangle`
|
|
94
|
+
*/
|
|
95
|
+
export function forEachCellInRectangle(...args: [...CellCoordinates, widthCells: number, heightCells: number, callback: (...args: CellCoordinates) => void]): void;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* @deprecated Use {@link forEachCellInRectangle} instead.
|
|
99
|
+
* @see https://sandustry.com/sandkit.html Official Sandkit API — deprecated alias of `api.grid.forEachCellInRectangle`
|
|
100
|
+
*/
|
|
101
|
+
export function forEachCellInRect(...args: [...CellCoordinates, widthCells: number, heightCells: number, callback: (...args: CellCoordinates) => void]): void;
|
|
102
|
+
|
|
103
|
+
/** Deferred element and terrain mutations passed to {@link mutate}. */
|
|
104
|
+
export interface GridMutationWriter {
|
|
105
|
+
/** Element cell mutations inside a {@link mutate} callback. */
|
|
106
|
+
elements: GridMutationWriterElements;
|
|
107
|
+
/** Terrain cell mutations inside a {@link mutate} callback. */
|
|
108
|
+
terrains: GridMutationWriterTerrains;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** Element writers available on {@link GridMutationWriter.elements}. */
|
|
112
|
+
export interface GridMutationWriterElements {
|
|
113
|
+
/**
|
|
114
|
+
* Create an element at a cell inside a {@link mutate} callback.
|
|
115
|
+
*
|
|
116
|
+
* @param cellX - Grid column of the target cell.
|
|
117
|
+
* @param cellY - Grid row of the target cell.
|
|
118
|
+
* @param elementTypeOrId - Numeric element type or string id.
|
|
119
|
+
* @param options - Optional create flags.
|
|
120
|
+
* @see https://sandustry.com/sandkit.html Official Sandkit API — Main entry `api.grid.mutate` writer `elements.createAtCell`
|
|
121
|
+
*/
|
|
122
|
+
createAtCell(...args: [...CellCoordinates, elementTypeOrId: elements.ElementRef, options?: elements.ElementCreateOptions]): void;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Replace the element at a cell inside a {@link mutate} callback.
|
|
126
|
+
*
|
|
127
|
+
* @param cellX - Grid column of the target cell.
|
|
128
|
+
* @param cellY - Grid row of the target cell.
|
|
129
|
+
* @param elementTypeOrId - Numeric element type or string id.
|
|
130
|
+
* @param options - Optional create flags.
|
|
131
|
+
* @see https://sandustry.com/sandkit.html Official Sandkit API — Main entry `api.grid.mutate` writer `elements.replaceAtCell`
|
|
132
|
+
*/
|
|
133
|
+
replaceAtCell(...args: [...CellCoordinates, elementTypeOrId: elements.ElementRef, options?: elements.ElementCreateOptions]): void;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Remove the element at a cell inside a {@link mutate} callback.
|
|
137
|
+
*
|
|
138
|
+
* @param cellX - Grid column of the target cell.
|
|
139
|
+
* @param cellY - Grid row of the target cell.
|
|
140
|
+
* @param options - Optional removal flags.
|
|
141
|
+
* @see https://sandustry.com/sandkit.html Official Sandkit API — Main entry `api.grid.mutate` writer `elements.removeAtCell`
|
|
142
|
+
*/
|
|
143
|
+
removeAtCell(...args: [...CellCoordinates, options?: elements.ElementRemovalOptions]): void;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/** Terrain writers available on {@link GridMutationWriter.terrains}. */
|
|
147
|
+
export interface GridMutationWriterTerrains {
|
|
148
|
+
/**
|
|
149
|
+
* Create terrain at a cell inside a {@link mutate} callback.
|
|
150
|
+
*
|
|
151
|
+
* @param cellX - Grid column of the target cell.
|
|
152
|
+
* @param cellY - Grid row of the target cell.
|
|
153
|
+
* @param terrainTypeOrId - Numeric terrain type or string id.
|
|
154
|
+
* @param options - Optional mutation flags.
|
|
155
|
+
* @see https://sandustry.com/sandkit.html Official Sandkit API — Main entry `api.grid.mutate` writer `terrains.createAtCell`
|
|
156
|
+
*/
|
|
157
|
+
createAtCell(...args: [...CellCoordinates, terrainTypeOrId: terrains.TerrainRef, options?: terrains.TerrainMutationOptions]): void;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Replace terrain at a cell inside a {@link mutate} callback.
|
|
161
|
+
*
|
|
162
|
+
* @param cellX - Grid column of the target cell.
|
|
163
|
+
* @param cellY - Grid row of the target cell.
|
|
164
|
+
* @param terrainTypeOrId - Numeric terrain type or string id.
|
|
165
|
+
* @param options - Optional mutation flags.
|
|
166
|
+
* @see https://sandustry.com/sandkit.html Official Sandkit API — Main entry `api.grid.mutate` writer `terrains.replaceAtCell`
|
|
167
|
+
*/
|
|
168
|
+
replaceAtCell(...args: [...CellCoordinates, terrainTypeOrId: terrains.TerrainRef, options?: terrains.TerrainMutationOptions]): void;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Remove terrain at a cell inside a {@link mutate} callback.
|
|
172
|
+
*
|
|
173
|
+
* @param cellX - Grid column of the target cell.
|
|
174
|
+
* @param cellY - Grid row of the target cell.
|
|
175
|
+
* @param options - Optional mutation flags.
|
|
176
|
+
* @see https://sandustry.com/sandkit.html Official Sandkit API — Main entry `api.grid.mutate` writer `terrains.removeAtCell`
|
|
177
|
+
*/
|
|
178
|
+
removeAtCell(...args: [...CellCoordinates, options?: terrains.TerrainMutationOptions]): void;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
import type { LooseString } from "../../shared/nominal";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* `sandkit.api.hooks` — intercept and modify internal game hook points.
|
|
5
|
+
* Main thread only.
|
|
6
|
+
*/
|
|
7
|
+
export namespace hooks {
|
|
8
|
+
/**
|
|
9
|
+
* Registers an intercept hook. Returns an unsubscribe function.
|
|
10
|
+
*
|
|
11
|
+
* @param hookId - Registered hook identifier.
|
|
12
|
+
* @param callback - Called with hook arguments and context; may cancel the hook.
|
|
13
|
+
* @param options - Optional priority and filter options.
|
|
14
|
+
* @see https://sandustry.com/sandkit.html Official Sandkit API — Main entry `api.hooks.intercept`
|
|
15
|
+
*/
|
|
16
|
+
export function intercept<K extends InterceptHookId>(
|
|
17
|
+
hookId: K,
|
|
18
|
+
callback: (args: InterceptHookArgs<K>, context: HookContext) => void,
|
|
19
|
+
options?: InterceptHookOptions<K>,
|
|
20
|
+
): () => void;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Registers a modifier hook. Returns an unsubscribe function.
|
|
24
|
+
*
|
|
25
|
+
* @param hookId - Registered hook identifier.
|
|
26
|
+
* @param callback - Called with hook arguments; may mutate hook payload.
|
|
27
|
+
* @param options - Optional priority and filter options.
|
|
28
|
+
* @see https://sandustry.com/sandkit.html Official Sandkit API — Main entry `api.hooks.modify`
|
|
29
|
+
*/
|
|
30
|
+
export function modify<K extends ModifyHookId>(
|
|
31
|
+
hookId: K,
|
|
32
|
+
callback: (args: ModifyHookArgs<K>) => void,
|
|
33
|
+
options?: ModifyHookOptions,
|
|
34
|
+
): () => void;
|
|
35
|
+
|
|
36
|
+
/** Context passed to intercept hook callbacks. */
|
|
37
|
+
export interface HookContext {
|
|
38
|
+
/** When called, the intercepted action is skipped. */
|
|
39
|
+
cancel(): void;
|
|
40
|
+
/** True after {@link cancel} was called on this context. */
|
|
41
|
+
cancelled: boolean;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** Options shared by intercept and modify hooks. */
|
|
45
|
+
export interface HookOptions {
|
|
46
|
+
/** Run this hook before others with lower priority. */
|
|
47
|
+
priority?: number;
|
|
48
|
+
[key: string]: unknown;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** Options for {@link intercept}. */
|
|
52
|
+
export type InterceptHookOptions<K extends InterceptHookId> = HookOptions &
|
|
53
|
+
(K extends "item:use"
|
|
54
|
+
? { itemIds?: string[]; priority?: number }
|
|
55
|
+
: K extends "entity:update"
|
|
56
|
+
? { entityTypes?: string[]; priority?: number }
|
|
57
|
+
: K extends "building:place"
|
|
58
|
+
? { structureTypes?: string[]; priority?: number }
|
|
59
|
+
: K extends "projectile:fire:overStructure" | "projectile:hit"
|
|
60
|
+
? { projectileTypes?: string[]; priority?: number }
|
|
61
|
+
: Record<string, unknown>);
|
|
62
|
+
|
|
63
|
+
/** Options for {@link modify}. */
|
|
64
|
+
export type ModifyHookOptions = HookOptions &
|
|
65
|
+
(
|
|
66
|
+
| { weaponIds?: string[]; priority?: number }
|
|
67
|
+
| { projectileTypes?: string[]; priority?: number }
|
|
68
|
+
| { triggerIds?: string[]; priority?: number }
|
|
69
|
+
| { resourceIds?: string[]; priority?: number }
|
|
70
|
+
| Record<string, unknown>
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
/** Known main-thread intercept hook ids plus custom strings. */
|
|
74
|
+
export type InterceptHookId = LooseString<
|
|
75
|
+
| "item:use"
|
|
76
|
+
| "teleport:effect:create"
|
|
77
|
+
| "teleport:effect"
|
|
78
|
+
| "action:start"
|
|
79
|
+
| "action:intercept"
|
|
80
|
+
| "input:keyDown"
|
|
81
|
+
| "input:keydown"
|
|
82
|
+
| "input:keyUp"
|
|
83
|
+
| "input:keyup"
|
|
84
|
+
| "placePoints:suppress"
|
|
85
|
+
| "placePoints:isSuppressed"
|
|
86
|
+
| "placePoints:directionalArrows:suppress"
|
|
87
|
+
| "placePoints:directionalArrows:isSuppressed"
|
|
88
|
+
| "entity:update"
|
|
89
|
+
| "building:place"
|
|
90
|
+
| "building:clearShape"
|
|
91
|
+
| "input:scroll"
|
|
92
|
+
| "input:boostDown"
|
|
93
|
+
| "input:boost-down"
|
|
94
|
+
| "input:descendDown"
|
|
95
|
+
| "input:descend-down"
|
|
96
|
+
| "input:escape"
|
|
97
|
+
| "interactable:suppressHover"
|
|
98
|
+
| "fire:element:ignite"
|
|
99
|
+
| "projectile:fire:overStructure"
|
|
100
|
+
| "projectile:hit"
|
|
101
|
+
| "player:position:commit"
|
|
102
|
+
| "progression:purchase"
|
|
103
|
+
>;
|
|
104
|
+
|
|
105
|
+
/** Known main-thread modify hook ids plus custom strings. */
|
|
106
|
+
export type ModifyHookId = LooseString<
|
|
107
|
+
| "excavation:prepare"
|
|
108
|
+
| "locator:scan:prepare"
|
|
109
|
+
| "vacuum:prepare"
|
|
110
|
+
| "vacuum:element:prepare"
|
|
111
|
+
| "player:movement:prepare"
|
|
112
|
+
| "player:movement"
|
|
113
|
+
| "building:placementLimit:prepare"
|
|
114
|
+
| "building:placementLimit"
|
|
115
|
+
| "building:placement-limit"
|
|
116
|
+
| "fluxEmanator:processing:prepare"
|
|
117
|
+
| "fluxEmanator:processing"
|
|
118
|
+
| "flux-emanator:processing"
|
|
119
|
+
| "render:pipes:prepare"
|
|
120
|
+
| "render:pipes"
|
|
121
|
+
| "structures:moved:prepare"
|
|
122
|
+
| "structures:removed:prepare"
|
|
123
|
+
| "weapon:reload:prepare"
|
|
124
|
+
| "projectile:travel:prepare"
|
|
125
|
+
| "projectile:impact:prepare"
|
|
126
|
+
| "player:collision:prepare"
|
|
127
|
+
| "trigger:schedule:prepare"
|
|
128
|
+
| "progression:cost:prepare"
|
|
129
|
+
| "resource:collection:prepare"
|
|
130
|
+
| "resource:delivery:prepare"
|
|
131
|
+
| "resource:balance:prepare"
|
|
132
|
+
| "gold:removal:prepare"
|
|
133
|
+
| "gold:removal:settle"
|
|
134
|
+
>;
|
|
135
|
+
|
|
136
|
+
/** Intercept hook argument shapes keyed by hook id. */
|
|
137
|
+
export interface InterceptHookMap {
|
|
138
|
+
"item:use": {
|
|
139
|
+
itemId: string;
|
|
140
|
+
useId: string;
|
|
141
|
+
kind: "instant" | "sustained" | "chargeThenFire";
|
|
142
|
+
baseline: Readonly<Record<string, unknown>>;
|
|
143
|
+
prepared: Record<string, unknown>;
|
|
144
|
+
};
|
|
145
|
+
"teleport:effect:create": Record<string, unknown>;
|
|
146
|
+
/** @deprecated Use `"teleport:effect:create"` instead. */
|
|
147
|
+
"teleport:effect": InterceptHookMap["teleport:effect:create"];
|
|
148
|
+
"action:start": { action?: { id?: string; } & Record<string, unknown>; } & Record<string, unknown>;
|
|
149
|
+
/** @deprecated Use `"action:start"` instead. */
|
|
150
|
+
"action:intercept": InterceptHookMap["action:start"];
|
|
151
|
+
"input:keyDown": { key?: string; code?: string; event?: Event; };
|
|
152
|
+
/** @deprecated Use `"input:keyDown"` instead. */
|
|
153
|
+
"input:keydown": InterceptHookMap["input:keyDown"];
|
|
154
|
+
"input:keyUp": { key?: string; code?: string; event?: Event; };
|
|
155
|
+
/** @deprecated Use `"input:keyUp"` instead. */
|
|
156
|
+
"input:keyup": InterceptHookMap["input:keyUp"];
|
|
157
|
+
"placePoints:suppress": { type?: string; } & Record<string, unknown>;
|
|
158
|
+
/** @deprecated Use `"placePoints:suppress"` instead. */
|
|
159
|
+
"placePoints:isSuppressed": InterceptHookMap["placePoints:suppress"];
|
|
160
|
+
"placePoints:directionalArrows:suppress": { type?: string; } & Record<string, unknown>;
|
|
161
|
+
/** @deprecated Use `"placePoints:directionalArrows:suppress"` instead. */
|
|
162
|
+
"placePoints:directionalArrows:isSuppressed": InterceptHookMap["placePoints:directionalArrows:suppress"];
|
|
163
|
+
"entity:update": {
|
|
164
|
+
entityTypeId: string;
|
|
165
|
+
entity: Record<string, unknown>;
|
|
166
|
+
deltaTimeSeconds: number;
|
|
167
|
+
phase: "normal" | "capturing" | "launching";
|
|
168
|
+
isVisible: boolean;
|
|
169
|
+
playerWorldX: number;
|
|
170
|
+
playerWorldY: number;
|
|
171
|
+
worldMinX: number;
|
|
172
|
+
worldMinY: number;
|
|
173
|
+
worldMaxX: number;
|
|
174
|
+
worldMaxY: number;
|
|
175
|
+
cellSize: number;
|
|
176
|
+
timeSeconds: number;
|
|
177
|
+
};
|
|
178
|
+
"building:place": {
|
|
179
|
+
structureId: string;
|
|
180
|
+
x: number;
|
|
181
|
+
y: number;
|
|
182
|
+
data?: Record<string, unknown>;
|
|
183
|
+
};
|
|
184
|
+
"building:clearShape": { structure: Record<string, unknown>; };
|
|
185
|
+
"input:scroll": { deltaY: number; } & Record<string, unknown>;
|
|
186
|
+
"input:boostDown": Record<string, unknown>;
|
|
187
|
+
/** @deprecated Use `"input:boostDown"` instead. */
|
|
188
|
+
"input:boost-down": InterceptHookMap["input:boostDown"];
|
|
189
|
+
"input:descendDown": Record<string, unknown>;
|
|
190
|
+
/** @deprecated Use `"input:descendDown"` instead. */
|
|
191
|
+
"input:descend-down": InterceptHookMap["input:descendDown"];
|
|
192
|
+
"input:escape": Record<string, unknown>;
|
|
193
|
+
"interactable:suppressHover": { type?: string; structure?: Record<string, unknown>; } & Record<string, unknown>;
|
|
194
|
+
"fire:element:ignite": { x: number; y: number; elementType: number; };
|
|
195
|
+
"projectile:fire:overStructure": { projectile: Record<string, unknown>; x: number; y: number; };
|
|
196
|
+
"projectile:hit": { projectile: Record<string, unknown>; travelResult: Record<string, unknown>; };
|
|
197
|
+
"player:position:commit": {
|
|
198
|
+
previousWorldX: number;
|
|
199
|
+
previousWorldY: number;
|
|
200
|
+
proposedWorldX: number;
|
|
201
|
+
proposedWorldY: number;
|
|
202
|
+
velocityX: number;
|
|
203
|
+
velocityY: number;
|
|
204
|
+
};
|
|
205
|
+
"progression:purchase": {
|
|
206
|
+
domain: "tech" | "upgrade";
|
|
207
|
+
id: string;
|
|
208
|
+
itemId?: string;
|
|
209
|
+
costs: Record<string, unknown>;
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/** Modify hook argument shapes keyed by hook id. */
|
|
214
|
+
export interface ModifierHookMap {
|
|
215
|
+
"excavation:prepare": {
|
|
216
|
+
sourceId: string;
|
|
217
|
+
sourceKind: "tool" | "projectile" | "structure" | "drone";
|
|
218
|
+
originCellX: number;
|
|
219
|
+
originCellY: number;
|
|
220
|
+
consumedVoid: boolean;
|
|
221
|
+
profileId: string;
|
|
222
|
+
patternDiameterCells: number;
|
|
223
|
+
drillTierDamage: number;
|
|
224
|
+
};
|
|
225
|
+
"locator:scan:prepare": {
|
|
226
|
+
originWorldX: number;
|
|
227
|
+
originWorldY: number;
|
|
228
|
+
hasTarget: boolean;
|
|
229
|
+
targetCellX: number;
|
|
230
|
+
targetCellY: number;
|
|
231
|
+
outerTint: [number, number, number];
|
|
232
|
+
innerTint: [number, number, number];
|
|
233
|
+
noTargetToast: string;
|
|
234
|
+
noTargetToastKey: string;
|
|
235
|
+
triangulationLensOverride: true | false | null;
|
|
236
|
+
};
|
|
237
|
+
"vacuum:prepare": {
|
|
238
|
+
nozzleCellX: number;
|
|
239
|
+
nozzleCellY: number;
|
|
240
|
+
targetCellX: number;
|
|
241
|
+
targetCellY: number;
|
|
242
|
+
pattern: number[][];
|
|
243
|
+
};
|
|
244
|
+
"vacuum:element:prepare": {
|
|
245
|
+
elementType: number;
|
|
246
|
+
matterType: number;
|
|
247
|
+
isTransportable: boolean;
|
|
248
|
+
collectable: boolean;
|
|
249
|
+
visibleInPicker: boolean;
|
|
250
|
+
};
|
|
251
|
+
"player:movement:prepare": Record<string, unknown>;
|
|
252
|
+
/** @deprecated Use `"player:movement:prepare"` instead. */
|
|
253
|
+
"player:movement": ModifierHookMap["player:movement:prepare"];
|
|
254
|
+
"building:placementLimit:prepare": { maxCount: number | null; } & Record<string, unknown>;
|
|
255
|
+
/** @deprecated Use `"building:placementLimit:prepare"` instead. */
|
|
256
|
+
"building:placementLimit": ModifierHookMap["building:placementLimit:prepare"];
|
|
257
|
+
/** @deprecated Use `"building:placementLimit:prepare"` instead. */
|
|
258
|
+
"building:placement-limit": ModifierHookMap["building:placementLimit:prepare"];
|
|
259
|
+
"fluxEmanator:processing:prepare": { speedMultiplier: number; } & Record<string, unknown>;
|
|
260
|
+
/** @deprecated Use `"fluxEmanator:processing:prepare"` instead. */
|
|
261
|
+
"fluxEmanator:processing": ModifierHookMap["fluxEmanator:processing:prepare"];
|
|
262
|
+
/** @deprecated Use `"fluxEmanator:processing:prepare"` instead. */
|
|
263
|
+
"flux-emanator:processing": ModifierHookMap["fluxEmanator:processing:prepare"];
|
|
264
|
+
"render:pipes:prepare": { layer?: string; } & Record<string, unknown>;
|
|
265
|
+
/** @deprecated Use `"render:pipes:prepare"` instead. */
|
|
266
|
+
"render:pipes": ModifierHookMap["render:pipes:prepare"];
|
|
267
|
+
"structures:moved:prepare": {
|
|
268
|
+
moved: unknown[];
|
|
269
|
+
failedToPlace: unknown[];
|
|
270
|
+
};
|
|
271
|
+
"structures:removed:prepare": {
|
|
272
|
+
removed: unknown[];
|
|
273
|
+
structures?: unknown[];
|
|
274
|
+
byMove: boolean;
|
|
275
|
+
};
|
|
276
|
+
"weapon:reload:prepare": {
|
|
277
|
+
weaponId: string;
|
|
278
|
+
reloadMs: number;
|
|
279
|
+
maxAmmo: number;
|
|
280
|
+
};
|
|
281
|
+
"projectile:travel:prepare": {
|
|
282
|
+
projectileType: string;
|
|
283
|
+
firstCollisionStep: number;
|
|
284
|
+
maxCollisionSteps: number;
|
|
285
|
+
collidesWithTerrain: boolean;
|
|
286
|
+
collidesWithStructures: boolean;
|
|
287
|
+
};
|
|
288
|
+
"projectile:impact:prepare": {
|
|
289
|
+
projectileType: string;
|
|
290
|
+
impactKind: string;
|
|
291
|
+
profileId: string;
|
|
292
|
+
power: number;
|
|
293
|
+
centerPower: number;
|
|
294
|
+
radiusCells: number;
|
|
295
|
+
/** @deprecated Use {@link radiusCells} instead. */
|
|
296
|
+
radius?: number;
|
|
297
|
+
};
|
|
298
|
+
"player:collision:prepare": {
|
|
299
|
+
phaseThroughTerrain: boolean;
|
|
300
|
+
phaseThroughStructures: boolean;
|
|
301
|
+
maxStepCells: number;
|
|
302
|
+
};
|
|
303
|
+
"trigger:schedule:prepare": {
|
|
304
|
+
triggerId: string;
|
|
305
|
+
intervalMs: number;
|
|
306
|
+
sequentialRuns: number;
|
|
307
|
+
};
|
|
308
|
+
"progression:cost:prepare": {
|
|
309
|
+
domain: "tech" | "upgrade";
|
|
310
|
+
id: string;
|
|
311
|
+
itemId?: string;
|
|
312
|
+
currencyId: string;
|
|
313
|
+
amount: number;
|
|
314
|
+
};
|
|
315
|
+
"resource:collection:prepare": {
|
|
316
|
+
resourceId: string;
|
|
317
|
+
sourceKind: string;
|
|
318
|
+
cellX: number;
|
|
319
|
+
cellY: number;
|
|
320
|
+
amount: number;
|
|
321
|
+
feedback: "default" | "silent";
|
|
322
|
+
};
|
|
323
|
+
"resource:delivery:prepare": {
|
|
324
|
+
resourceId: string;
|
|
325
|
+
sourceKind: string;
|
|
326
|
+
sourceId: string;
|
|
327
|
+
sourceCellX: number;
|
|
328
|
+
sourceCellY: number;
|
|
329
|
+
targetCellX: number;
|
|
330
|
+
targetCellY: number;
|
|
331
|
+
mode: "world" | "collection";
|
|
332
|
+
amount: number;
|
|
333
|
+
feedback: "default" | "silent";
|
|
334
|
+
};
|
|
335
|
+
"resource:balance:prepare": {
|
|
336
|
+
resourceId: string;
|
|
337
|
+
balance: number;
|
|
338
|
+
};
|
|
339
|
+
"gold:removal:prepare": {
|
|
340
|
+
requestedAmount: number;
|
|
341
|
+
shortfall: number;
|
|
342
|
+
};
|
|
343
|
+
"gold:removal:settle": {
|
|
344
|
+
requestedAmount: number;
|
|
345
|
+
physicalRemoved: number;
|
|
346
|
+
shortfall: number;
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
/** Intercept hook args for a given hook id. */
|
|
351
|
+
export type InterceptHookArgs<K extends InterceptHookId> =
|
|
352
|
+
K extends keyof InterceptHookMap ? InterceptHookMap[K] : unknown;
|
|
353
|
+
|
|
354
|
+
/** Modify hook args for a given hook id. */
|
|
355
|
+
export type ModifyHookArgs<K extends ModifyHookId> =
|
|
356
|
+
K extends keyof ModifierHookMap ? ModifierHookMap[K] : unknown;
|
|
357
|
+
}
|