MCPcopy Create free account
hub / github.com/TanStack/hotkeys / getInstance

Method getInstance

packages/hotkeys/src/key-state-tracker.ts:87–92  ·  view source on GitHub ↗

* Gets the singleton instance of KeyStateTracker.

()

Source from the content-addressed store, hash-verified

85 * Gets the singleton instance of KeyStateTracker.
86 */
87 static getInstance(): KeyStateTracker {
88 if (!KeyStateTracker.#instance) {
89 KeyStateTracker.#instance = new KeyStateTracker()
90 }
91 return KeyStateTracker.#instance
92 }
93
94 /**
95 * Resets the singleton instance. Useful for testing.

Callers 1

getKeyStateTrackerFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected