@@ -73,7 +73,7 @@ export default (
73
73
Record < string , unknown > [ ]
74
74
> ;
75
75
const leaves = computed ( ( ) => getLeaves ( { value } ) ) ;
76
- const up = ( pId : string | undefined ) => {
76
+ const up = ( pId : string ) => {
77
77
const the = leaves . value . find ( ( leaf ) => leaf [ keyId ] === pId ) ;
78
78
if ( the ) {
79
79
const index = the [ keyIndex ] as number ;
@@ -85,7 +85,7 @@ export default (
85
85
] ;
86
86
}
87
87
} ;
88
- const down = ( pId : string | undefined ) => {
88
+ const down = ( pId : string ) => {
89
89
const the = leaves . value . find ( ( leaf ) => leaf [ keyId ] === pId ) ;
90
90
if ( the ) {
91
91
const index = the [ keyIndex ] as number ;
@@ -97,7 +97,7 @@ export default (
97
97
] ;
98
98
}
99
99
} ;
100
- const right = ( pId : string | undefined ) => {
100
+ const right = ( pId : string ) => {
101
101
const the = leaves . value . find ( ( leaf ) => leaf [ keyId ] === pId ) ;
102
102
if ( the ) {
103
103
const prev = the [ keyPrev ] as Record < string , unknown > | undefined ;
@@ -116,7 +116,7 @@ export default (
116
116
}
117
117
return undefined ;
118
118
} ;
119
- const left = ( pId : string | undefined ) => {
119
+ const left = ( pId : string ) => {
120
120
const the = leaves . value . find ( ( leaf ) => leaf [ keyId ] === pId ) ;
121
121
if ( the ) {
122
122
const parent = the [ keyParent ] as Record < string , unknown > | undefined ;
@@ -136,7 +136,7 @@ export default (
136
136
}
137
137
return undefined ;
138
138
} ;
139
- const add = ( pId : string | undefined ) => {
139
+ const add = ( pId : string ) => {
140
140
const the = leaves . value . find ( ( leaf ) => leaf [ keyId ] === pId ) ;
141
141
if ( the ) {
142
142
const children = the [ keyChildren ] as
@@ -160,7 +160,7 @@ export default (
160
160
}
161
161
return undefined ;
162
162
} ;
163
- const remove = ( pId : string | undefined ) => {
163
+ const remove = ( pId : string ) => {
164
164
const the = leaves . value . find ( ( leaf ) => leaf [ keyId ] === pId ) ;
165
165
if ( the ) {
166
166
const next = the [ keyNext ] as Record < string , unknown > | undefined ;
0 commit comments