File tree Expand file tree Collapse file tree
packages/devtools-ui/tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import type { CollapsiblePaths } from '../src/utils/deep-keys'
2+
3+ type WithDeeplyNestedObject = {
4+ a : {
5+ b : {
6+ c : {
7+ d : {
8+ e : {
9+ f : {
10+ g : {
11+ h : {
12+ i : {
13+ j : number
14+ }
15+ }
16+ }
17+ }
18+ }
19+ }
20+ }
21+ }
22+ }
23+ }
24+
25+ type _DeeplyNestedObject = CollapsiblePaths < WithDeeplyNestedObject >
26+
27+ type WithAny = {
28+ errors ?: any
29+ }
30+
31+ type _Any = CollapsiblePaths < WithAny >
32+
33+ type ArrayRecursion = { arr : Array < Array < Array < Array < [ ] > > > > }
34+
35+ type _ArrayRecursion = CollapsiblePaths < ArrayRecursion >
36+
37+ type WithUndefined = {
38+ status ?: {
39+ valid : boolean
40+ error ?: {
41+ message : string
42+ }
43+ }
44+ }
45+
46+ type _WithUndefined = CollapsiblePaths < WithUndefined >
47+
48+ type WithUnknown = {
49+ payload : unknown
50+ }
51+
52+ type _WithUnknown = CollapsiblePaths < WithUnknown >
53+
54+ type WithRealisticState = {
55+ canSubmit ?: boolean
56+ isSubmitting ?: boolean
57+ errors ?: Array < any >
58+ errorMap ?: Record < string , any >
59+ }
60+
61+ type _WithRealisticState = CollapsiblePaths < WithRealisticState >
62+
63+ type WithGeneric < TData > = {
64+ generic : TData
65+ }
66+
67+ type _WithGeneric = CollapsiblePaths < WithGeneric < { a : { b : string } } > >
You can’t perform that action at this time.
0 commit comments