Definitelytyped: Update Google Apps Scripts Types

Created on 11 Dec 2018  路  3Comments  路  Source: DefinitelyTyped/DefinitelyTyped

@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:


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:


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!

All 3 comments

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";
Was this page helpful?
0 / 5 - 0 ratings