Skip to content

Commit

Permalink
Fix TS errors
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 committed Jul 20, 2023
1 parent eb4a902 commit 172b104
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 22 deletions.
6 changes: 6 additions & 0 deletions integration/catch-boundary-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,10 @@ test.describe("ErrorBoundary (thrown responses)", () => {
});

test("non-matching urls on document requests", async () => {
let oldConsoleError;
oldConsoleError = console.error;
console.error = () => {};

let res = await fixture.requestDocument(NOT_FOUND_HREF);
expect(res.status).toBe(404);
let html = await res.text();
Expand All @@ -233,6 +237,8 @@ test.describe("ErrorBoundary (thrown responses)", () => {
{ id: "root", pathname: "", params: {} },
]).replace(/"/g, """);
expect(html).toContain(`<pre id="matches">${expected}</pre>`);

console.error = oldConsoleError;
});

test("non-matching urls on client transitions", async ({ page }) => {
Expand Down
2 changes: 0 additions & 2 deletions packages/remix-cloudflare/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export type {
CookieSignatureOptions,
DataFunctionArgs,
EntryContext,
ErrorBoundaryComponent,
HandleDataRequestFunction,
HandleDocumentRequestFunction,
HeadersArgs,
Expand All @@ -56,7 +55,6 @@ export type {
HandleErrorFunction,
PageLinkDescriptor,
RequestHandler,
RouteComponent,
RouteHandle,
SerializeFrom,
ServerBuild,
Expand Down
2 changes: 0 additions & 2 deletions packages/remix-deno/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ export type {
CookieSignatureOptions,
DataFunctionArgs,
EntryContext,
ErrorBoundaryComponent,
HandleDataRequestFunction,
HandleDocumentRequestFunction,
HandleErrorFunction,
Expand All @@ -59,7 +58,6 @@ export type {
MetaFunction,
PageLinkDescriptor,
RequestHandler,
RouteComponent,
RouteHandle,
SerializeFrom,
ServerBuild,
Expand Down
2 changes: 0 additions & 2 deletions packages/remix-node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ export type {
CookieSignatureOptions,
DataFunctionArgs,
EntryContext,
ErrorBoundaryComponent,
HandleDataRequestFunction,
HandleDocumentRequestFunction,
HeadersArgs,
Expand All @@ -82,7 +81,6 @@ export type {
HandleErrorFunction,
PageLinkDescriptor,
RequestHandler,
RouteComponent,
RouteHandle,
SerializeFrom,
ServerBuild,
Expand Down
2 changes: 0 additions & 2 deletions packages/remix-react/errorBoundaries.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import * as React from "react";
import type { Location } from "@remix-run/router";
import type { ErrorBoundaryComponent } from "@remix-run/server-runtime";
import { isRouteErrorResponse } from "react-router-dom";

type RemixErrorBoundaryProps = React.PropsWithChildren<{
location: Location;
component: ErrorBoundaryComponent;
error?: Error;
}>;

Expand Down
2 changes: 0 additions & 2 deletions packages/remix-react/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ export {
RemixContext as UNSAFE_RemixContext,
} from "./components";

export type { ThrownResponse } from "./errors";

export type { HtmlLinkDescriptor } from "./links";
export type {
HtmlMetaDescriptor,
Expand Down
10 changes: 2 additions & 8 deletions packages/remix-react/server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ import {

import { RemixContext } from "./components";
import type { EntryContext } from "./entry";
import {
RemixErrorBoundary,
RemixRootDefaultErrorBoundary,
} from "./errorBoundaries";
import { RemixErrorBoundary } from "./errorBoundaries";
import { createServerRoutes } from "./routes";

export interface RemixServerProps {
Expand Down Expand Up @@ -52,10 +49,7 @@ export function RemixServer({
abortDelay,
}}
>
<RemixErrorBoundary
location={router.state.location}
component={RemixRootDefaultErrorBoundary}
>
<RemixErrorBoundary location={router.state.location}>
<StaticRouterProvider
router={router}
context={context.staticHandlerContext}
Expand Down
2 changes: 0 additions & 2 deletions packages/remix-server-runtime/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export type {
CookieSignatureOptions,
DataFunctionArgs,
EntryContext,
ErrorBoundaryComponent,
FlashSessionData,
HandleDataRequestFunction,
HandleDocumentRequestFunction,
Expand All @@ -63,7 +62,6 @@ export type {
HandleErrorFunction,
PageLinkDescriptor,
RequestHandler,
RouteComponent,
RouteHandle,
SerializeFrom,
ServerBuild,
Expand Down
2 changes: 0 additions & 2 deletions packages/remix-server-runtime/reexport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export type {
ActionArgs,
ActionFunction,
DataFunctionArgs,
ErrorBoundaryComponent,
HeadersArgs,
HeadersFunction,
HtmlMetaDescriptor,
Expand All @@ -47,7 +46,6 @@ export type {
LoaderFunction,
MetaDescriptor,
MetaFunction,
RouteComponent,
RouteHandle,
V2_ServerRuntimeMetaArgs,
V2_ServerRuntimeMetaDescriptor,
Expand Down

0 comments on commit 172b104

Please sign in to comment.