I’m using TypeScript for a reasonably large project, and am wondering what the standard is for the use of Error
s. For example, say I hand an index out of bounds exception in Java:
throw new IndexOutOfBoundsException();
Would the equivalent statement in TypeScript be:
throw new Error("Index Out of Bounds");
What other ways could I accomplish this? What is the accepted standard?