@@ -12,27 +12,27 @@ export class MemoryProtocol implements IObjectStackProtocol {
1212 this . objects = objects ;
1313 }
1414
15- async findData ( object : string , params ?: any ) : Promise < any [ ] > {
15+ findData = async ( object : string , params ?: any ) : Promise < any [ ] > = > {
1616 const items = this . data [ object ] || [ ] ;
1717 // Minimal mock filtering could go here
1818 return items ;
1919 }
2020
21- async getData ( object : string , id : string ) : Promise < any > {
21+ getData = async ( object : string , id : string ) : Promise < any > = > {
2222 const items = this . data [ object ] || [ ] ;
2323 const item = items . find ( ( i : any ) => i . id === id ) ;
2424 if ( ! item ) throw new Error ( `Record not found: ${ object } ${ id } ` ) ;
2525 return item ;
2626 }
2727
28- async createData ( object : string , data : any ) : Promise < any > {
28+ createData = async ( object : string , data : any ) : Promise < any > = > {
2929 if ( ! this . data [ object ] ) this . data [ object ] = [ ] ;
3030 const newItem = { id : Math . random ( ) . toString ( 36 ) . substr ( 2 , 9 ) , ...data } ;
3131 this . data [ object ] . push ( newItem ) ;
3232 return newItem ;
3333 }
3434
35- async updateData ( object : string , id : string , data : any ) : Promise < any > {
35+ updateData = async ( object : string , id : string , data : any ) : Promise < any > = > {
3636 const items = this . data [ object ] || [ ] ;
3737 const index = items . findIndex ( ( i : any ) => i . id === id ) ;
3838 if ( index === - 1 ) throw new Error ( `Record not found: ${ object } ${ id } ` ) ;
@@ -42,7 +42,7 @@ export class MemoryProtocol implements IObjectStackProtocol {
4242 return updated ;
4343 }
4444
45- async deleteData ( object : string , id : string ) : Promise < any > {
45+ deleteData = async ( object : string , id : string ) : Promise < any > = > {
4646 if ( ! this . data [ object ] ) return { success : false } ;
4747 const initialLength = this . data [ object ] . length ;
4848 this . data [ object ] = this . data [ object ] . filter ( ( i : any ) => i . id !== id ) ;
0 commit comments