I have a function that returns a boolean. The function also has a property errors
as an array. It is in a module.
example.js
exports["example"] = myFunc;
function myFunc(data) {
return true;
}
myFunc.errors = ['error']
I can define the function return signature in a typescript .d.ts
file;
example.d.ts
export declare function uploadedFile(data: any): boolean;
but I don't know how to define the functions errors
property so that it should return a string array?
export declare function uploadedFile(data: any): boolean;
export declare property uploadedFile.errors: Array<string>; // ??