const helpMeTypeThis = (obj: MyObj, bool = false)
: {id?: string | undefinded, [key: string]: any }[] => {
return obj.map(...)
}
helpMeTypeThis(obj) // => { [key: string]: any }
helpMeTypeThis(obj, false) // => { [key: string]: any }
helpMeTypeThis(obj, true) // => { id: string, [key: string]: any }
const helpMeTypeThis = (obj: MyObj, bool = false)
: {id?: string | undefinded, [key: string]: any }[] => {
return obj.map(...)
}
helpMeTypeThis(obj) // => { [key: string]: any }
helpMeTypeThis(obj, false) // => { [key: string]: any }
helpMeTypeThis(obj, true) // => { id: string, [key: string]: any }