diff --git a/__tests__/test-utils/gas-stubs.ts b/__tests__/test-utils/gas-stubs.ts index c8ee51d5..391e49a2 100644 --- a/__tests__/test-utils/gas-stubs.ts +++ b/__tests__/test-utils/gas-stubs.ts @@ -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: diff --git a/backend.tsconfig.json b/backend.tsconfig.json index 8ef0f23c..99dc9f22 100644 --- a/backend.tsconfig.json +++ b/backend.tsconfig.json @@ -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" + ] } diff --git a/package-lock.json b/package-lock.json index 7158b155..6e3c543c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,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", @@ -4067,10 +4067,11 @@ } }, "node_modules/@types/google-apps-script": { - "version": "1.0.85", - "resolved": "https://registry.npmjs.org/@types/google-apps-script/-/google-apps-script-1.0.85.tgz", - "integrity": "sha512-O5w3PxI75uqU4d7t24ukQtU87OZ2j0vQp3VWmx9sJ6PTwBRvGhMA+qWShKNetofI8TYaVd8tFzBQXgv3e7ycCQ==", - "dev": true + "version": "1.0.86", + "resolved": "https://registry.npmjs.org/@types/google-apps-script/-/google-apps-script-1.0.86.tgz", + "integrity": "sha512-w0tLty8vpApjIp+czorfcoY9k1nZSdQsg6lru3ZV6EWdNyXNsetIZPQnvBIihENAhcGwlogiDKx8z/57NYB3jA==", + "dev": true, + "license": "MIT" }, "node_modules/@types/google.script.client-side": { "version": "0.1.5", diff --git a/package.json b/package.json index edde690a..b4332d69 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/backend/Drive-shim.d.ts b/src/backend/Drive-shim.d.ts new file mode 100644 index 00000000..970f69ee --- /dev/null +++ b/src/backend/Drive-shim.d.ts @@ -0,0 +1,2 @@ +// eslint-disable-next-line no-var, @typescript-eslint/naming-convention -- GAS global, needs var +declare var Drive: GoogleAppsScript.Drive_v2;