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.

4 min readSume
All posts

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.

TypeScript 7 settings and the SDK check (read 2026-10-08)
ItemValueSource
TypeScript 7.0 release dateJuly 8, 2026TypeScript blog
Compiler commandtsc (not tsgo)TypeScript blog
moduleResolution node / node10No longer supportedTypeScript blog
Default for typesEmpty list; add node explicitlyTypeScript blog
Version used hereTypeScript 7.0.2, SDK 0.2.0Our test
Job status readgetApiJobStatus, path id, reads data.dataSume SDK and jobs docs

Steps

  • Install typescript@7, @types/node and @sume-com/sdk, and set "type": "module" in package.json. Without it, top-level await fails with error TS1309.
  • Save the config below as tsconfig.json, keeping skipLibCheck off 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 types list.
  • Remember that the generated SDK functions resolve with { data, error, response } and do not throw, so test the error branch 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

All Developers posts

Written by Sume