@grant , I attempted to update some Google Apps Scripts type definitions with a pull request but wasn't able to get it through.
Opening an issue because I would still love to see some types updates.
Most importantly for me:
OverGridImage type seems to be missing. Consequently:Sheet.insertImage() returns void, instead of OverGridImage.Sheet.getImages() does not exist. Should return OverGridImage[].I'm also having some issues with Google Sheet protections, which may be harder to fix. (The issue seems to be at the Google API level, not the type definitions level but I'll mention it anyway.)
I use the line: protection.removeEditors(protection.getEditors()); which is a clearly documented example usage for the Protection class. I get type errors because:
getEditors returns User[] while removeEditors takes String[] as a parameter.I could try opening another PR with a narrower scope. If others are more comfortable with writing TypeScript type definitions and can make these updates, I would be very appreciative!
OK. I'll look at updating the types.
I'm working on it at the moment, looking to make a PR soon
In addition to this, the SheetsOnChangeChangeType should not be enum, but rather a string type so that it can be usable when compiled to gas.
type SheetsOnChangeChangeType = "EDIT" | "INSERT_ROW" | "INSERT_COLUMN" | "REMOVE_ROW" | "REMOVE_COLUMN" | "INSERT_GRID" | "REMOVE_GRID" | "FORMAT" | "OTHER";