mirror of
https://github.com/pmndrs/zustand.git
synced 2025-12-08 19:45:52 +00:00
refactor: remove unused import in example & fix typo in tests (#3161)
This commit is contained in:
parent
b5845a9daa
commit
73b91d3700
@ -1,5 +1,5 @@
|
||||
import { Mesh, PlaneGeometry, Group, Vector3, MathUtils } from 'three'
|
||||
import { memo, useRef, useState, useLayoutEffect } from 'react'
|
||||
import { useRef, useState, useLayoutEffect } from 'react'
|
||||
import { createRoot, events, extend, useFrame } from '@react-three/fiber'
|
||||
import { Plane, useAspect, useTexture } from '@react-three/drei'
|
||||
import {
|
||||
|
||||
@ -42,7 +42,7 @@ it('can use exposed types', () => {
|
||||
num: 1,
|
||||
numGet: () => get().num,
|
||||
numGetState: () => {
|
||||
// TypeScript can't get the type of storeApi when it trys to enforce the signature of numGetState.
|
||||
// TypeScript can't get the type of storeApi when it tries to enforce the signature of numGetState.
|
||||
// Need to explicitly state the type of storeApi.getState().num or storeApi type will be type 'any'.
|
||||
const result: number = storeApi.getState().num
|
||||
return result
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user