Skip to content

Commit

Permalink
fix type definitions of async function
Browse files Browse the repository at this point in the history
  • Loading branch information
hwwi committed Jul 18, 2019
1 parent 0734f82 commit fcf9803
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ declare module 'found' {
matchContext,
resolver,
...options
}: CreateInitialFarceRouterArgs): ConnectedRouter;
}: CreateInitialFarceRouterArgs): Promise<ConnectedRouter>;

interface createInitialBrowserRouterArgs
extends Omit<
Expand All @@ -498,7 +498,7 @@ declare module 'found' {

function createInitialBrowserRouter(
options: createInitialBrowserRouterArgs,
): ConnectedRouter;
): Promise<ConnectedRouter>;

interface GetStoreRenderArgsArgs {
store: Store;
Expand All @@ -507,5 +507,7 @@ declare module 'found' {
resolver: Resolver;
}

function getStoreRenderArgs(args: GetStoreRenderArgsArgs): RouterRenderArgs;
function getStoreRenderArgs(
args: GetStoreRenderArgsArgs,
): Promise<RouterRenderArgs>;
}
2 changes: 1 addition & 1 deletion types/server/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ declare module 'found/lib/server' {

function getFarceResult(
args: GetFarceResultArgs,
): FarceElementResult | FarceRedirectResult;
): Promise<FarceElementResult | FarceRedirectResult>;

interface RouterProviderProps {
renderArgs: RouterRenderArgs;
Expand Down

0 comments on commit fcf9803

Please sign in to comment.