Exports

Use this to export functions so they can be called from other resources.
Read more on exports

Signature

function exports(exportedName: string, fn: Function) => void

Required arguments

  • exportedName: The function name you want to export.
  • fn: The function to execute when the export get called.

Examples

exports("printSomething", () => {
  console.log("Something");
});

exports("dropPlayer", (src: string, reason: string) => {
  DropPlayer(src, reason);
});

// OR

exports("dropPlayer", DropPlayer);