-
Notifications
You must be signed in to change notification settings - Fork 171
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Short summary
- A mixed
type+ value re-export inpackages/prompts/src/index.tscan cause some TypeScript emitters/bundlers to drop runtime exports (e.g.isCancel). This breaks consumers following the docs/examples.
Reproduction (minimal)
import { isCancel, text } from '@clack/prompts';
// depending on toolchain, `isCancel` may be undefined or throw at runtimeImpact
- Blocks "Getting Started" examples and any consumer relying on
isCancelfrom@clack/prompts. - High user friction; likely to break downstream CLIs and automation.
Fix (implemented locally)
- Split the mixed export into a
type-only export and a separate value export:- export type { ClackSettings } from '@clack/core';
- export { isCancel, settings, updateSettings } from '@clack/core';
PoC (observed result)
typeof isCancel => functiontypeof settings => objecttypeof updateSettings => function
Patch (exact change applied)
- export { type ClackSettings, isCancel, settings, updateSettings } from '@clack/core';
+ export type { ClackSettings } from '@clack/core';
+ export { isCancel, settings, updateSettings } from '@clack/core';Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
Needs triage