Skip to content

Commit 9827edf

Browse files
fix useCmdk return type (#329)
1 parent c1f200a commit 9827edf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmdk/src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ function mergeRefs<T = any>(refs: Array<React.MutableRefObject<T> | React.Legacy
10151015
}
10161016

10171017
/** Run a selector against the store state. */
1018-
function useCmdk<T = any>(selector: (state: State) => T) {
1018+
function useCmdk<T = any>(selector: (state: State) => T): T {
10191019
const store = useStore()
10201020
const cb = () => selector(store.snapshot())
10211021
return useSyncExternalStore(store.subscribe, cb, cb)

0 commit comments

Comments
 (0)