Skip to content

Broken TypeScript sample in your AI Prompts docs #4812

Description

@David19876543210

I ran a checker over your docs and 3 of the TypeScript samples (all from one
import line) don't compile against @trigger.dev/sdk@4.5.12. Example, on
https://trigger.dev/docs/ai/prompts:

import type { PromptHandle, PromptIdentifier, PromptVariables } from "@trigger.dev/sdk";

// TS error (x3): Module '"@trigger.dev/sdk"' has no exported member
// 'PromptHandle' / 'PromptIdentifier' / 'PromptVariables'.

Those types do exist in the current SDK, but only under the prompts
namespace export (import { prompts } from "@trigger.dev/sdk", then
prompts.PromptHandle), not as flat top-level names.

I think it's drift between the published package and the docs rather than a
mistake in the sample.

I'm building a small CLI that catches this in CI. Two questions if you have a
minute: does this kind of thing get reported to you by users, and is it
something anyone currently owns?

Happy to share the full JSON report if that's useful — just ask.

David

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions