Skip to content

Commit

Permalink
fix(remix-dev): fix FutureConfig type (#7895)
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 authored Nov 6, 2023
1 parent 903268f commit 22c6f65
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/two-boxes-dance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@remix-run/dev": patch
---

Fix `FutureConfig` type
10 changes: 7 additions & 3 deletions packages/remix-dev/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,13 @@ export interface AppConfig {
| string[]
| (() => Promise<string | string[]> | string | string[]);

future?: Partial<FutureConfig> & {
[propName: string]: never;
};
/**
* Enabled future flags
*/
future?: [keyof FutureConfig] extends [never]
? // Partial<FutureConfig> doesn't work when it's empty so just prevent any keys
{ [key: string]: never }
: Partial<FutureConfig>;
}

/**
Expand Down

0 comments on commit 22c6f65

Please sign in to comment.