TypeScript 7.0.2 with @sume-com/sdk 0.2.0: the tsconfig that compiles
We compiled a Sume SDK 0.2.0 job-status call with TypeScript 7.0.2. It needs nodenext resolution, types set to node and a module-type package.json.

Yes, @sume-com/sdk 0.2.0 type-checks cleanly under TypeScript 7.0.2 with the right config. We installed both, wrote a short script that creates a client and reads a job status, ran tsc with noEmit and library checking left on, and got no errors; the same file then ran on Node 22.14 against a local stand-in for the API. The config that worked uses module and moduleResolution set to nodenext, types set to ["node"], and a package.json with "type": "module".
Each of those has a reason in the TypeScript 7.0 announcement: moduleResolution of node/node10 is no longer supported, types now defaults to an empty list so Node globals like process need an explicit entry, and strict is on by default. The compiler is still called tsc.
What changed and what it means for the SDK
The SDK ships ESM only, with an exports map pointing to dist/index.d.ts and dist/index.js, which is the layout nodenext and bundler resolution expect. The package has no runtime dependencies and needs fetch and WebCrypto, so it runs on Node 18 and later, Bun, Deno and Workers according to the SDK docs. The table lists what we checked and where each fact comes from.
| Item | Value | Source |
|---|---|---|
| TypeScript 7.0 release date | July 8, 2026 | TypeScript blog |
| Compiler command | tsc (not tsgo) | TypeScript blog |
| moduleResolution node / node10 | No longer supported | TypeScript blog |
| Default for types | Empty list; add node explicitly | TypeScript blog |
| Version used here | TypeScript 7.0.2, SDK 0.2.0 | Our test |
| Job status read | getApiJobStatus, path id, reads data.data | Sume SDK and jobs docs |
Steps
- Install
typescript@7,@types/nodeand@sume-com/sdk, and set"type": "module"inpackage.json. Without it, top-levelawaitfails with error TS1309. - Save the config below as
tsconfig.json, keepingskipLibCheckoff if you want the SDK declarations checked too. - Run
npx tsc -p .in CI as well as locally, so a future SDK minor that changes a type fails a build instead of a deploy. - Fix anything that was relying on the old defaults, such as an implicit
typeslist. - Remember that the generated SDK functions resolve with
{ data, error, response }and do not throw, so test theerrorbranch as the script does.
tsconfig.json
This is the file we compiled with. The script that follows is check-job.ts.
{
"compilerOptions": {
"target": "es2022",
"module": "nodenext",
"moduleResolution": "nodenext",
"types": ["node"],
"strict": true,
"noEmit": true
},
"include": ["check-job.ts"]
}check-job.ts
Pass a job id as the first argument. The status document carries sume_status, terminal and next_poll_after_seconds, as described in the jobs and results docs.
import { createSumeClient, getApiJobStatus } from "@sume-com/sdk";
const client = createSumeClient({
apiKey: process.env.SUME_API_KEY ?? "",
baseUrl: process.env.SUME_BASE ?? "https://api.sume.com",
});
const { data, error, response } = await getApiJobStatus({
client,
path: { id: process.argv[2] ?? "job_demo" },
});
if (error || !data) throw new Error(`status read failed: HTTP ${response?.status}`);
const s = data.data;
console.log(s.sume_status, s.terminal, s.next_poll_after_seconds);What Sume does not do
Sume does not test its SDK against every compiler release and makes no promise about TypeScript 7 beyond what you check yourself. Our result covers one script on one version pair. TypeScript 7 also ships without a programmatic API, per its announcement, so tools that import the compiler need the TypeScript 6 compatibility package.
Sources
Related posts
More in Developers
- TypeScript union for a Sume /v1/videos poll with an exhaustive switch
Model the five poll statuses as a discriminated union so unsigned_urls only exists on completed and error only on failed. Compiles in strict mode, 30 lines.
- TypeScript exhaustive switch on /v1/videos statuses fails the build
A never-typed default case makes a new video job status a compile error, and a runtime parser rejects strings the types do not know. 26 lines of TypeScript.
- Unit-test your Omni price math before Oct 22: Python asserts for Sume
A runnable Python test for Sume's gemini-omni-flash-1.1 pricing: Decimal rates, the 3 to 10 second rule, and a one-cent check against the usage.cost on a poll.
- One Sume webhook route for job and run events, 204 on the rest
Route job.* and *.run.terminal events from one verified webhook handler and answer 204 for any unknown event, so a new type cannot trigger retries.
Written by Sume