There isn't really a "standard" way to do this, but the general process is as follows:
Create a new script file in your Google Drive. This can be done by going to Drive, clicking on the New button, and then selecting "More" followed by "Google Apps Script".
Copy and paste the following code into your new script file:
class MyClass {
// Class constructor
constructor() {
}
// Class methods
myMethod() {
}
}
- Save the file.
That's it! You've now created a custom class that you can use in your Google Apps Scripts.