Skip to content

Commit 3c29552

Browse files
committed
Tighten the types
1 parent 12f9c38 commit 3c29552

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/react-server-dom-webpack/src/ReactFlightWebpackNodeLoader.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ type ResolveFunction = (
1818
string,
1919
ResolveContext,
2020
ResolveFunction,
21-
) => Promise<{url: string}>;
21+
) => {url: string} | Promise<{url: string}>;
2222

2323
type GetSourceContext = {
2424
format: string,
@@ -133,7 +133,7 @@ function addExportNames(names, node) {
133133
function resolveClientImport(
134134
specifier: string,
135135
parentURL: string,
136-
): Promise<{url: string}> {
136+
): {url: string} | Promise<{url: string}> {
137137
// Resolve an import specifier as if it was loaded by the client. This doesn't use
138138
// the overrides that this loader does but instead reverts to the default.
139139
// This resolution algorithm will not necessarily have the same configuration

0 commit comments

Comments
 (0)