@@ -73,7 +73,7 @@ export default (
7373 Record < string , unknown > [ ]
7474 > ;
7575 const leaves = computed ( ( ) => getLeaves ( { value } ) ) ;
76- const up = ( pId : string | undefined ) => {
76+ const up = ( pId : string ) => {
7777 const the = leaves . value . find ( ( leaf ) => leaf [ keyId ] === pId ) ;
7878 if ( the ) {
7979 const index = the [ keyIndex ] as number ;
@@ -85,7 +85,7 @@ export default (
8585 ] ;
8686 }
8787 } ;
88- const down = ( pId : string | undefined ) => {
88+ const down = ( pId : string ) => {
8989 const the = leaves . value . find ( ( leaf ) => leaf [ keyId ] === pId ) ;
9090 if ( the ) {
9191 const index = the [ keyIndex ] as number ;
@@ -97,7 +97,7 @@ export default (
9797 ] ;
9898 }
9999 } ;
100- const right = ( pId : string | undefined ) => {
100+ const right = ( pId : string ) => {
101101 const the = leaves . value . find ( ( leaf ) => leaf [ keyId ] === pId ) ;
102102 if ( the ) {
103103 const prev = the [ keyPrev ] as Record < string , unknown > | undefined ;
@@ -116,7 +116,7 @@ export default (
116116 }
117117 return undefined ;
118118 } ;
119- const left = ( pId : string | undefined ) => {
119+ const left = ( pId : string ) => {
120120 const the = leaves . value . find ( ( leaf ) => leaf [ keyId ] === pId ) ;
121121 if ( the ) {
122122 const parent = the [ keyParent ] as Record < string , unknown > | undefined ;
@@ -136,7 +136,7 @@ export default (
136136 }
137137 return undefined ;
138138 } ;
139- const add = ( pId : string | undefined ) => {
139+ const add = ( pId : string ) => {
140140 const the = leaves . value . find ( ( leaf ) => leaf [ keyId ] === pId ) ;
141141 if ( the ) {
142142 const children = the [ keyChildren ] as
@@ -160,7 +160,7 @@ export default (
160160 }
161161 return undefined ;
162162 } ;
163- const remove = ( pId : string | undefined ) => {
163+ const remove = ( pId : string ) => {
164164 const the = leaves . value . find ( ( leaf ) => leaf [ keyId ] === pId ) ;
165165 if ( the ) {
166166 const next = the [ keyNext ] as Record < string , unknown > | undefined ;
0 commit comments