Skip to content

Commit 828b56a

Browse files
committed
fix(oxfmt): Re-export all nested types (#20636)
Fixes #20493, #20598, closes #20494
1 parent 5e893d7 commit 828b56a

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

apps/oxfmt/src-js/index.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,15 @@ import type {
1818
} from "./config.generated";
1919

2020
// --- Type exports ---
21-
// Only exports top level types for now
2221

23-
// The same naming convention as `oxlint` for consistency
24-
export type OxfmtConfig = Oxfmtrc;
25-
export type { FormatConfig } from "./config.generated";
22+
// Re-export all generated config types.
23+
// So that downstream libraries can reference them in declaration emit without TS4058/TS4082 errors.
24+
export type * from "./config.generated";
25+
26+
// The same naming convention as `oxlint` for consistency.
27+
// Using `interface extends` so that TypeScript displays `OxfmtConfig` in errors
28+
// and hovers instead of resolving to the generated `Oxfmtrc` name.
29+
export interface OxfmtConfig extends Oxfmtrc {}
2630

2731
// Backward-compatible type aliases using `Options` suffix.
2832

0 commit comments

Comments
 (0)