-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
types(remix-server-runtime): make
AppLoadContext
an empty interface…
… instead of `any` (#1876) * make AppLoadContext an empty interface * Update contributors.yml * AppLoadContext interface uses unknown for missing values * update types for AppLoadContext * fix: make `AppLoadContext` parameter optional parameter used to be implicitly optional as it used to be typed as `any`. it _is_ intended to be optional, so this restores it as an optional param Co-authored-by: Pedro Cattori <pcattori@gmail.com>
- Loading branch information
Showing
6 changed files
with
30 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
"@remix-run/netlify": minor | ||
"@remix-run/server-runtime": minor | ||
--- | ||
|
||
Type safety for load context. | ||
|
||
Change `AppLoadContext` to be an interface mapping `string` to `unknown`, allowing users to extend it via: | ||
|
||
```ts | ||
|
||
|
||
declare module "@remix-run/server-runtime" { | ||
interface AppLoadContext { | ||
// add custom properties here! | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters