Skip to content

Commit a25667a

Browse files
committed
fix(contracts): stop exporting the SNAPSHOT_OPTION_FLAGS pin
The compile-time pin added against CommandFlags was exported, which the layering gate's facade-exhaustiveness check flagged: packages/contracts/src/ facades/command.ts re-exports command-flags.ts but omitted it, an accidental narrowing. The pin is not API -- nothing reads its value, it only exists to fail the build on a renamed or misspelled flag key. Keep it unexported and consume it with `void` so oxlint's no-unused-vars stays satisfied without widening the facade.
1 parent 500a493 commit a25667a

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎packages/contracts/src/command-flags.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,10 @@ export type CommandFlags = Omit<CliFlags, DaemonExcludedCliFlag> & {
5151
// Re-pins SNAPSHOT_OPTION_FLAGS (declared once in the kernel, which sits below contracts and
5252
// cannot name CommandFlags) against CommandFlags here: a renamed or misspelled flag key fails to
5353
// compile instead of silently reading `undefined` at every snapshotOptionsFromFlags call site.
54-
// fallow-ignore-next-line unused-export
55-
export const SNAPSHOT_OPTION_FLAGS_PINNED_TO_COMMAND_FLAGS = SNAPSHOT_OPTION_FLAGS satisfies Record<
54+
// This is a compile-time check, not API — it stays unexported so the command facade doesn't have
55+
// to widen just to carry it.
56+
const snapshotOptionFlagsPinnedToCommandFlags = SNAPSHOT_OPTION_FLAGS satisfies Record<
5657
SnapshotOptionKey,
5758
keyof CommandFlags
5859
>;
60+
void snapshotOptionFlagsPinnedToCommandFlags;

0 commit comments

Comments
 (0)