补充Color函数上下文的类型。

This commit is contained in:
徐涛 2024-12-26 16:01:24 +08:00
parent 03b3377107
commit f3fecdc8ed

View File

@ -23,11 +23,12 @@ export function ColorFunctionProvider({ children }: WasmProviderProps) {
const [error, setError] = useState<Error | null>(null); const [error, setError] = useState<Error | null>(null);
const contextValue = useMemo( const contextValue = useMemo(
() => ({ () =>
({
colorFn: wasmInstance, colorFn: wasmInstance,
isLoading: isPending, isLoading: isPending,
error, error,
}), } as ColorFunctionContextType),
[wasmInstance, isPending, error], [wasmInstance, isPending, error],
); );
useEffect(() => { useEffect(() => {