I got the following tsc error when using functions in valtio/utils.
import { proxy } from "valtio";
import { derive } from "valtio/utils";
const state = proxy({ count: 0 });
const derived = derive(
{
double: (get) => get(state).count * 2,
},
{ proxy: state }
);
$ tsc && vite build
node_modules/valtio/vanilla/utils/devtools.d.ts:1:63 - error TS2339: Property '__REDUX_DEVTOOLS_EXTENSION__' does not exist on type 'Window & typeof globalThis'.
Summary
I got the following tsc error when using functions in
valtio/utils
.This issue occurs with
v1.10.6
(does not occur withv1.10.5
) I guess #713 causes this error and the root cause is the same as https://github.com/pmndrs/zustand/issues/1205..Link to reproduction
https://codesandbox.io/p/sandbox/modest-curran-ptlrl7
Check List
Please do not ask questions in issues.
Please include a minimal reproduction.