Skip to content

Commit

Permalink
Merge pull request #1853 from skaut/gas-types-update
Browse files Browse the repository at this point in the history
Updated GAS typings
  • Loading branch information
marekdedic authored Dec 18, 2024
2 parents 0b88ea9 + ec80900 commit 8192e2f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion __tests__/test-utils/gas-stubs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function mockedCommentsCollection(): GoogleAppsScript.Drive.Collection.Co
};
}

export function mockedDrive(): GoogleAppsScript.Drive {
export function mockedDrive(): GoogleAppsScript.Drive_v2 {
return {
newChannel: jest.fn<() => GoogleAppsScript.Drive.Schema.Channel>(),
newChildReference:
Expand Down
7 changes: 5 additions & 2 deletions backend.tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
"compilerOptions": {
"target": "es6",
"lib": ["es6"],
"types": ["google-apps-script"],
"types": ["google-apps-script", "google.script.client-side"],
"verbatimModuleSyntax": false
}
},
"include": [
"src/backend/Drive-shim.d.ts"
]
}
11 changes: 6 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@smui/linear-progress": "^7.0.0",
"@smui/list": "^7.0.0",
"@smui/top-app-bar": "^7.0.0",
"@types/google-apps-script": "^1.0.85",
"@types/google-apps-script": "^1.0.86",
"@types/google.script.client-side": "^0.1.5",
"@types/jest": "^29.5.14",
"@types/node": "^22.9.3",
Expand Down
2 changes: 2 additions & 0 deletions src/backend/Drive-shim.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// eslint-disable-next-line no-var, @typescript-eslint/naming-convention -- GAS global, needs var
declare var Drive: GoogleAppsScript.Drive_v2;

0 comments on commit 8192e2f

Please sign in to comment.