mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-25 20:44:46 -07:00
Disallow and suppress unsafe assignment (#19736)
This commit is contained in:
committed by
GitHub
parent
b746524a1b
commit
58d637f919
@@ -22,6 +22,7 @@ export const useStateAndRef = <
|
||||
(newStateOrCallback) => {
|
||||
let newValue: T;
|
||||
if (typeof newStateOrCallback === 'function') {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
newValue = newStateOrCallback(ref.current);
|
||||
} else {
|
||||
newValue = newStateOrCallback;
|
||||
|
||||
Reference in New Issue
Block a user