Skip to content

docs(node-sdk): set up the CLI with the node format before generating types - #855

Merged
roncohen merged 1 commit into
mainfrom
docs/node-type-generation
Dec 1, 2026
Merged

roncohen merged 1 commit into
mainfrom
docs/node-type-generation

Conversation

@roncohen

@roncohen roncohen commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

The Node.js README's "Type safe flags" section said to install the CLI and run npx reflag flags types, carried over from v1. On a fresh project that doesn't give Node type checks: the CLI needs reflag.config.json first, and its default output format is react, which generates declarations for @reflag/react-sdk rather than @reflag/node-sdk.

The section now runs npx reflag init first, says to choose the node output format, and gives the default output path (gen/flags.d.ts, which tsconfig.json must include). It also replaces the old file name reflag.d.ts.

Found by review on reflagcom/docs#33.

@roncohen
roncohen enabled auto-merge December 1, 2026 10:02

@reflag-review reflag-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Risk: low

no actionable findings

@roncohen
roncohen added this pull request to the merge queue Dec 1, 2026
Merged via the queue into main with commit 6f9623f Dec 1, 2026
9 checks passed
@roncohen
roncohen deleted the docs/node-type-generation branch December 1, 2026 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant