I need to change this arrow function to a regular function on the line of my return toto but i don't really understand how, here is the code :
class Ratchet extends APlugin<CentralizerConfigPluginRatchet> {
public search = (): Promise<CentralizerNotif[]> => {throw Error("Not implemented");};
public notif =
(): Promise<CentralizerNotif[]> => {
const toto = new RatchetLib.RatchetAPI(this.config.baseurl);
return toto.getAsset({validation: true}).then(result => {
return [{
name: `You ${result.assets.length} things to moderate `,
link: "https://www.exemple.com",
}];
});
};
}
Anyone can help me please ?