File tree 3 files changed +3
-9
lines changed
3 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import {
12
12
isChanged ,
13
13
} from 'proxy-compare'
14
14
import { snapshot , subscribe } from './vanilla.ts'
15
- import type { INTERNAL_Snapshot as Snapshot } from './vanilla.ts'
15
+ import type { Snapshot } from './vanilla.ts'
16
16
17
17
const useAffectedDebugValue = (
18
18
state : object ,
Original file line number Diff line number Diff line change @@ -28,20 +28,14 @@ type SnapshotIgnore =
28
28
| AnyFunction
29
29
| Primitive
30
30
31
- type Snapshot < T > = T extends { $$valtioSnapshot : infer S }
31
+ export type Snapshot < T > = T extends { $$valtioSnapshot : infer S }
32
32
? S
33
33
: T extends SnapshotIgnore
34
34
? T
35
35
: T extends object
36
36
? { readonly [ K in keyof T ] : Snapshot < T [ K ] > }
37
37
: T
38
38
39
- /**
40
- * This is not a public API.
41
- * It can be changed without any notice.
42
- */
43
- export type INTERNAL_Snapshot < T > = Snapshot < T >
44
-
45
39
type CreateSnapshot = < T extends object > ( target : T , version : number ) => T
46
40
47
41
type RemoveListener = ( ) => void
Original file line number Diff line number Diff line change 1
1
import { createProxy , getUntracked } from 'proxy-compare'
2
2
import { TypeEqual , expectType } from 'ts-expect'
3
3
import { describe , expect , it } from 'vitest'
4
- import { INTERNAL_Snapshot as Snapshot , proxy , snapshot } from 'valtio'
4
+ import { Snapshot , proxy , snapshot } from 'valtio'
5
5
6
6
it ( 'should return correct snapshots without subscribe' , async ( ) => {
7
7
const child = proxy ( { count : 0 } )
You can’t perform that action at this time.
0 commit comments