Skip to content

Commit

Permalink
fix CI hopefully 5
Browse files Browse the repository at this point in the history
  • Loading branch information
dai-shi committed Nov 10, 2023
1 parent 3fecf89 commit 3f41975
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/async.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const sleep = (ms: number) =>
setTimeout(resolve, ms)
})

const { use } = ReactExports
const { use } = ReactExports as any // for TS < 4.3 FIXME later
type Awaited<T> = T extends Promise<infer V> ? V : T // for TS < 4.5 FIXME later
const use2 = <T,>(x: T): Awaited<T> => (x instanceof Promise ? use(x) : x)

Expand Down Expand Up @@ -124,7 +124,7 @@ it.skipIf(typeof use === 'undefined')(
}
)

it('delayed falsy value', async () => {
it.skipIf(typeof use === 'undefined')('delayed falsy value', async () => {
const state = proxy<any>({ value: true })
const delayedValue = () => {
state.value = sleep(300).then(() => null)
Expand Down
2 changes: 1 addition & 1 deletion tests/computed.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { proxy, snapshot, subscribe, useSnapshot } from 'valtio'
import { addComputed, proxyWithComputed, subscribeKey } from 'valtio/utils'

const { use } = ReactExports
const { use } = ReactExports as any // for TS < 4.3 FIXME later
type Awaited<T> = T extends Promise<infer V> ? V : T // for TS < 4.5 FIXME later
const use2 = <T,>(x: T): Awaited<T> => (x instanceof Promise ? use(x) : x)

Expand Down
2 changes: 1 addition & 1 deletion tests/derive.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const sleep = (ms: number) =>
setTimeout(resolve, ms)
})

const { use } = ReactExports
const { use } = ReactExports as any // for TS < 4.3 FIXME later
type Awaited<T> = T extends Promise<infer V> ? V : T // for TS < 4.5 FIXME later
const use2 = <T,>(x: T): Awaited<T> => (x instanceof Promise ? use(x) : x)

Expand Down

0 comments on commit 3f41975

Please sign in to comment.