Skip to content

Commit

Permalink
Fixed typings for Drive v2
Browse files Browse the repository at this point in the history
  • Loading branch information
marekdedic committed Dec 18, 2024
1 parent ca068cf commit ec80900
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 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"
]
}
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 ec80900

Please sign in to comment.