-
Notifications
You must be signed in to change notification settings - Fork 0
Template optional peers.d
Josh Dionne edited this page Aug 26, 2026
·
1 revision
Generated from the thetowersdk repository. Edits made here are overwritten on the next push — change the source file instead.
/**
* Modules the templates demonstrate but this package deliberately does not depend on.
*
* `templates/sheets-client.ts` shows how to drive `thetowersdk/sheets` with `googleapis`. The
* SDK does not depend on it — that would pull a large Node-only tree into a package most
* consumers use for game data — so the template is meant to be copied into a project that
* installs it. Which leaves the template itself unable to type-check here.
*
* These declarations describe only the two calls the template actually makes, so it is checked
* rather than skipped. They are NOT a substitute for the real types: a project that installs
* `googleapis` gets its own, and never sees this file, because only `sheets-client.ts` is
* copied out.
*
* Without this the whole template failed to resolve, and every destructured parameter in it
* became an implicit `any` — six errors that all pointed at the template and none of which were
* about the template.
*/
declare module 'googleapis' {
interface SheetsValuesApi {
get(params: {
spreadsheetId: string
range: string
valueRenderOption?: string
}): Promise<{ data: { values?: unknown[][] } }>
update(params: {
spreadsheetId: string
range: string
valueInputOption?: string
requestBody?: { values: unknown[][] }
}): Promise<unknown>
}
interface SheetsApi {
spreadsheets: { values: SheetsValuesApi }
}
export const google: {
auth: {
GoogleAuth: new (options: {
scopes: readonly string[]
/** Path to a service-account JSON key. See docs/GOOGLE_SHEETS.md. */
keyFile?: string
}) => {
getClient(): Promise<unknown>
}
}
sheets(options: { version: string, auth: never }): SheetsApi
}
}Generated from TheTowerSDK — do not edit here. Docs and live demos: https://tmrxjd.github.io/TheTowerSDK/
- Quick Start
- Entry Points
- How It Fits Together
- Getting a Save File
- Reading a Save
- Reading The Community Wiki
- Formulas
- Builders
- Charts
- Effective Paths
- Examples
- Templates
- Building a Bot On This
- Google Sheets
- Desktop and Mobile
- Optional Add-ons
- Using It With An AI Agent
- Using Your Own Artwork
- Names And Acronyms
- Patch Notes
- Accuracy
- Versioning
- Where the Docs Live
- Contributing
- Credits
- License
Guides
Examples
- 01-browse-game-data.ts
- 02-read-a-save-file.ts
- 03-plan-upgrades-from-a-save.ts
- 04-generate-a-chart.ts
- 05-generate-a-cost-table.ts
- 06-read-the-community-wiki.ts
- 07-format-like-the-game.ts
- 08-build-a-calculator.ts
- 09-build-a-bot.ts
- 10-read-a-sheet.ts
- 11-build-a-knowledge-base.ts
- 12-show-module-and-card-art.ts
Templates