Open charged-ion opened 3 years ago
what node version does the new p?.prototype?.constructor
syntax require?
what node version does the new
p?.prototype?.constructor
syntax require?
It's not the node version, but rather Typescript version 3.7.
Context: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#optional-chaining
If a user creates a file containing commands that is being imported through @Discord import, the very first export of the file had to be the class containing all of the commands. If the first export was something else, in example a string, a run time error will occur and the process will exit. The error returned is "Uncaught TypeError: classType is not a constructor".
This fix will allow users to be able to export constant values regardless of the location of the file without affecting the intended use of the class containing all of the commands.