repo
stringlengths
7
64
file_url
stringlengths
81
338
file_path
stringlengths
5
257
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:25:31
2026-01-05 01:50:38
truncated
bool
2 classes
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/lazy-discovery-test.ts
packages/react-router/__tests__/router/lazy-discovery-test.ts
import type { Router } from "../../lib/router/router"; import type { AgnosticDataRouteObject } from "../../lib/router/utils"; import { createMemoryHistory } from "../../lib/router/history"; import { IDLE_NAVIGATION, createRouter } from "../../lib/router/router"; import { ErrorResponseImpl } from "../../lib/router/utils...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
true
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/revalidate-test.ts
packages/react-router/__tests__/router/revalidate-test.ts
import { createMemoryRouter } from "../../lib/components"; import { IDLE_NAVIGATION } from "../../lib/router/router"; import { cleanup, setup, createDeferred, TASK_ROUTES, } from "./utils/data-router-setup"; import { createFormData } from "./utils/utils"; describe("router.revalidate", () => { // Detect any f...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/fetchers-test.ts
packages/react-router/__tests__/router/fetchers-test.ts
/* eslint-disable jest/valid-title */ import type { HydrationState } from "../../lib/router/router"; import { createMemoryHistory } from "../../lib/router/history"; import { createRouter, IDLE_FETCHER, IDLE_NAVIGATION, } from "../../lib/router/router"; import { ErrorResponseImpl } from "../../lib/router/utils"; ...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
true
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/flush-sync-test.ts
packages/react-router/__tests__/router/flush-sync-test.ts
import { cleanup, setup } from "./utils/data-router-setup"; import { createFormData } from "./utils/utils"; describe("flushSync", () => { // Detect any failures inside the router navigate code afterEach(() => cleanup()); it("supports GET navigations with flushSync", async () => { let t = setup({ route...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/router-test.ts
packages/react-router/__tests__/router/router-test.ts
import type { HydrationState } from "../../lib/router/router"; import { createMemoryHistory } from "../../lib/router/history"; import { createRouter, IDLE_NAVIGATION } from "../../lib/router/router"; import type { AgnosticDataRouteObject, AgnosticRouteObject, } from "../../lib/router/utils"; import { data, ErrorRes...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
true
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/router-memory-test.ts
packages/react-router/__tests__/router/router-memory-test.ts
/** * @jest-environment node */ import { createMemoryHistory } from "../../lib/router/history"; import { createRouter } from "../../lib/router/router"; // This suite of tests specifically runs in the node jest environment to catch // issues when window is not present describe("a memory router", () => { it("initia...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/scroll-restoration-test.ts
packages/react-router/__tests__/router/scroll-restoration-test.ts
import type { TestRouteObject } from "./utils/data-router-setup"; import { cleanup, setup } from "./utils/data-router-setup"; import { createFormData } from "./utils/utils"; describe("scroll restoration", () => { afterEach(() => cleanup()); // Version of TASK_ROUTES with no root loader to allow for initialized ...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/data-strategy-test.ts
packages/react-router/__tests__/router/data-strategy-test.ts
import type { DataStrategyFunction, DataStrategyMatch, DataStrategyResult, } from "../../lib/router/utils"; import { createDeferred, createAsyncStub, setup, } from "./utils/data-router-setup"; import { createFormData, tick } from "./utils/utils"; describe("router dataStrategy", () => { function mockDataS...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
true
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/path-resolution-test.ts
packages/react-router/__tests__/router/path-resolution-test.ts
import { createMemoryHistory, createPath } from "../../lib/router/history"; import { createRouter } from "../../lib/router/router"; import { cleanup } from "./utils/data-router-setup"; import { createFormData } from "./utils/utils"; describe("path resolution", () => { // Detect any failures inside the router navigat...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/view-transition-test.ts
packages/react-router/__tests__/router/view-transition-test.ts
import { IDLE_NAVIGATION } from "../../lib/router/router"; import { cleanup, setup } from "./utils/data-router-setup"; import { createFormData } from "./utils/utils"; describe("view transitions", () => { // Detect any failures inside the router navigate code afterEach(() => cleanup()); it("only enables view tra...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/lazy-test.ts
packages/react-router/__tests__/router/lazy-test.ts
import { createMemoryHistory } from "../../lib/router/history"; import { createRouter, createStaticHandler } from "../../lib/router/router"; import { createMemoryRouter, hydrationRouteProperties, } from "../../lib/components"; import type { TestNonIndexRouteObject, TestRouteObject, } from "./utils/data-router-...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
true
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/context-middleware-test.tsx
packages/react-router/__tests__/router/context-middleware-test.tsx
import * as React from "react"; import { Route, createRoutesFromElements } from "../../lib/components"; import { createMemoryHistory } from "../../lib/router/history"; import type { Router, StaticHandlerContext } from "../../lib/router/router"; import { createRouter, createStaticHandler, isDataWithResponseInit, ...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
true
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/redirects-test.ts
packages/react-router/__tests__/router/redirects-test.ts
import { createMemoryHistory } from "../../lib/router/history"; import { IDLE_NAVIGATION, createRouter } from "../../lib/router/router"; import { replace } from "../../lib/router/utils"; import type { TestRouteObject } from "./utils/data-router-setup"; import { cleanup, setup } from "./utils/data-router-setup"; import ...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/navigation-blocking-test.ts
packages/react-router/__tests__/router/navigation-blocking-test.ts
import { createMemoryHistory } from "../../lib/router/history"; import type { Router } from "../../lib/router/router"; import { createRouter } from "../../lib/router/router"; const LOADER_LATENCY_MS = 100; const routes = [ { path: "/" }, { path: "/about", loader: () => sleep(LOADER_LATENCY_MS), }, { pa...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/hash-base-test.ts
packages/react-router/__tests__/router/hash-base-test.ts
import type { HashHistory } from "../../lib/router/history"; import { createHashHistory } from "../../lib/router/history"; import getWindow from "../utils/getWindow"; describe("a hash history on a page with a <base> tag", () => { let history: HashHistory; let base: HTMLBaseElement; let testWindow: Window; bef...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/browser-test.ts
packages/react-router/__tests__/router/browser-test.ts
/* eslint-disable jest/expect-expect */ import { type BrowserHistory, createBrowserHistory, } from "../../lib/router/history"; import InitialLocationDefaultKey from "./TestSequences/InitialLocationDefaultKey"; import Listen from "./TestSequences/Listen"; import PushNewLocation from "./TestSequences/PushNewLocatio...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/resolveTo-test.tsx
packages/react-router/__tests__/router/resolveTo-test.tsx
import { resolveTo } from "../../lib/router/utils"; describe("resolveTo", () => { it('resolve path without mutating the "to" argument', () => { const toArg = { pathname: "../../create", }; const routePathnames = ["/", "/user", "/user/1", "/user/1/edit"]; const locationPathname = "/user/1/edit/...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/submission-test.ts
packages/react-router/__tests__/router/submission-test.ts
import type { HydrationState } from "../../lib/router/router"; import { ErrorResponseImpl } from "../../lib/router/utils"; import { cleanup, setup } from "./utils/data-router-setup"; import { createFormData } from "./utils/utils"; function initializeTest(init?: { url?: string; hydrationData?: HydrationState; }) { ...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
true
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/hash-test.ts
packages/react-router/__tests__/router/hash-test.ts
/* eslint-disable jest/expect-expect */ import type { HashHistory } from "../../lib/router/history"; import { createHashHistory } from "../../lib/router/history"; import Listen from "./TestSequences/Listen"; import InitialLocationDefaultKey from "./TestSequences/InitialLocationDefaultKey"; import PushNewLocation from...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/should-revalidate-test.ts
packages/react-router/__tests__/router/should-revalidate-test.ts
import { createMemoryHistory } from "../../lib/router/history"; import { IDLE_NAVIGATION, createRouter } from "../../lib/router/router"; import { ErrorResponseImpl, redirect } from "../../lib/router/utils"; import type { ShouldRevalidateFunctionArgs } from "../../lib/router/utils"; import { urlMatch } from "./utils/cus...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
true
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/navigation-test.ts
packages/react-router/__tests__/router/navigation-test.ts
import { createBrowserRouter } from "../../lib/dom/lib"; import type { HydrationState } from "../../lib/router/router"; import getWindow from "../utils/getWindow"; import { cleanup, setup } from "./utils/data-router-setup"; import { createFormData } from "./utils/utils"; function initializeTest(init?: { url?: string...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
true
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/instrumentation-test.ts
packages/react-router/__tests__/router/instrumentation-test.ts
import { createMemoryRouter } from "../../lib/components"; import type { StaticHandlerContext } from "../../lib/router/router"; import { createStaticHandler } from "../../lib/router/router"; import { ErrorResponseImpl, data, redirect, type ActionFunction, type LoaderFunction, type MiddlewareFunction, type...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
true
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/route-fallback-test.ts
packages/react-router/__tests__/router/route-fallback-test.ts
import type { LoaderFunction } from "../../lib/router/utils"; import type { Router } from "../../lib/router/router"; import { createMemoryHistory } from "../../lib/router/history"; import { IDLE_NAVIGATION, createRouter } from "../../lib/router/router"; import { urlMatch } from "./utils/custom-matchers"; import { crea...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/interruptions-test.ts
packages/react-router/__tests__/router/interruptions-test.ts
/* eslint-disable jest/valid-title */ import type { HydrationState } from "../../lib/router/router"; import { IDLE_NAVIGATION } from "../../lib/router/router"; import { cleanup, setup } from "./utils/data-router-setup"; import { createFormData } from "./utils/utils"; function initializeTest(init?: { url?: string; ...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/memory-test.ts
packages/react-router/__tests__/router/memory-test.ts
/* eslint-disable jest/expect-expect */ import type { MemoryHistory } from "../../lib/router/history"; import { createMemoryHistory } from "../../lib/router/history"; import Listen from "./TestSequences/Listen"; import InitialLocationHasKey from "./TestSequences/InitialLocationHasKey"; import PushNewLocation from "./...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/create-path-test.ts
packages/react-router/__tests__/router/create-path-test.ts
import { createPath } from "../../lib/router/history"; describe("createPath", () => { describe("given only a pathname", () => { it("returns the pathname unchanged", () => { let path = createPath({ pathname: "https://google.com" }); expect(path).toBe("https://google.com"); }); }); describe("g...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/utils/urlDataStrategy.ts
packages/react-router/__tests__/router/utils/urlDataStrategy.ts
import type { DataStrategyFunction } from "../../../lib/router/utils"; import { invariant } from "./utils"; const urlDataStrategy: DataStrategyFunction = async ({ matches }) => { let results: Record<string, { type: "data" | "error"; result: unknown }> = {}; await Promise.all( matches.map((match) => match...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/utils/utils.ts
packages/react-router/__tests__/router/utils/utils.ts
import type { AgnosticDataRouteObject } from "../../utils"; export async function sleep(n: number) { await new Promise((r) => setTimeout(r, n)); } export async function tick() { await sleep(0); } export function invariant(value: boolean, message?: string): asserts value; export function invariant<T>( value: T ...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/utils/data-router-setup.ts
packages/react-router/__tests__/router/utils/data-router-setup.ts
import type { InitialEntry } from "../../../lib/router/history"; import type { Fetcher, RouterFetchOptions, Router, RouterNavigateOptions, RouterInit, } from "../../../lib/router/router"; import type { AgnosticDataRouteObject, AgnosticRouteMatch, } from "../../../lib/router/utils"; import { createRouter, ...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/utils/custom-matchers.ts
packages/react-router/__tests__/router/utils/custom-matchers.ts
interface CustomMatchers<R = jest.Expect> { URL(url: string); trackedPromise(data?: any, error?: any, aborted?: boolean): R; deferredData( done: boolean, status?: number, headers?: Record<string, string>, ): R; } declare global { namespace jest { interface Expect extends CustomMatchers {} ...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/TestSequences/InitialLocationDefaultKey.ts
packages/react-router/__tests__/router/TestSequences/InitialLocationDefaultKey.ts
import type { History } from "../../../lib/router/history"; export default function InitialLocationDefaultKey(history: History) { expect(history.location.key).toBe("default"); }
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/TestSequences/EncodedReservedCharacters.ts
packages/react-router/__tests__/router/TestSequences/EncodedReservedCharacters.ts
import type { History } from "../../../lib/router/history"; export default function EncodeReservedCharacters(history: History) { let pathname; // encoded string pathname = "/view/%23abc"; history.replace(pathname); expect(history.location).toMatchObject({ pathname: "/view/%23abc", }); // encoded ob...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/TestSequences/GoBack.ts
packages/react-router/__tests__/router/TestSequences/GoBack.ts
import type { History } from "../../../lib/router/history"; export default async function GoBack(history: History) { let spy: jest.SpyInstance = jest.fn(); expect(history.location).toMatchObject({ pathname: "/", }); history.push("/home"); expect(history.action).toEqual("PUSH"); expect(history.locatio...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/TestSequences/PushRelativePathnameWarning.ts
packages/react-router/__tests__/router/TestSequences/PushRelativePathnameWarning.ts
import type { History } from "../../../lib/router/history"; export default function PushRelativePathnameWarning(history: History) { expect(history.location).toMatchObject({ pathname: "/", }); history.push("/the/path?the=query#the-hash"); expect(history.action).toBe("PUSH"); expect(history.location).toMa...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/TestSequences/PushNewLocation.ts
packages/react-router/__tests__/router/TestSequences/PushNewLocation.ts
import type { History } from "../../../lib/router/history"; export default function PushNewLocation(history: History) { expect(history.location).toMatchObject({ pathname: "/", }); history.push("/home?the=query#the-hash"); expect(history.action).toBe("PUSH"); expect(history.location).toMatchObject({ ...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/TestSequences/GoForward.ts
packages/react-router/__tests__/router/TestSequences/GoForward.ts
import type { History } from "../../../lib/router/history"; export default async function GoForward(history: History) { let spy: jest.SpyInstance = jest.fn(); expect(history.location).toMatchObject({ pathname: "/", }); history.push("/home"); expect(history.action).toEqual("PUSH"); expect(history.loca...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/TestSequences/PushRelativePathname.ts
packages/react-router/__tests__/router/TestSequences/PushRelativePathname.ts
import type { History } from "../../../lib/router/history"; export default function PushRelativePathname(history: History) { expect(history.location).toMatchObject({ pathname: "/", }); history.push("/the/path?the=query#the-hash"); expect(history.action).toBe("PUSH"); expect(history.location).toMatchObje...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/TestSequences/ReplaceSamePath.ts
packages/react-router/__tests__/router/TestSequences/ReplaceSamePath.ts
import type { History } from "../../../lib/router/history"; export default function ReplaceSamePath(history: History) { expect(history.location).toMatchObject({ pathname: "/", }); history.replace("/home"); expect(history.action).toBe("REPLACE"); expect(history.location).toMatchObject({ pathname: "/h...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/TestSequences/ListenPopOnly.ts
packages/react-router/__tests__/router/TestSequences/ListenPopOnly.ts
import type { History } from "../../../lib/router/history"; export default function ListenPopOnly(history: History) { let spy = jest.fn(); let unlisten = history.listen(spy); history.push("/2"); expect(history.location.pathname).toBe("/2"); history.replace("/3"); expect(history.location.pathname).toBe("/3...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/TestSequences/Listen.ts
packages/react-router/__tests__/router/TestSequences/Listen.ts
import type { History } from "../../../lib/router/history"; export default function Listen(history: History) { let spy = jest.fn(); let unlisten = history.listen(spy); expect(spy).not.toHaveBeenCalled(); unlisten(); }
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/TestSequences/PushState.ts
packages/react-router/__tests__/router/TestSequences/PushState.ts
import type { History } from "../../../lib/router/history"; export default function PushState(history: History) { expect(history.location).toMatchObject({ pathname: "/", }); history.push("/home?the=query#the-hash", { the: "state" }); expect(history.action).toBe("PUSH"); expect(history.location).toMatchO...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/TestSequences/ReplaceNewLocation.ts
packages/react-router/__tests__/router/TestSequences/ReplaceNewLocation.ts
import type { History } from "../../../lib/router/history"; export default function ReplaceNewLocation(history: History) { expect(history.location).toMatchObject({ pathname: "/", }); history.replace("/home?the=query#the-hash"); expect(history.action).toBe("REPLACE"); expect(history.location).toMatchObje...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/TestSequences/PushSamePath.ts
packages/react-router/__tests__/router/TestSequences/PushSamePath.ts
import type { History } from "../../../lib/router/history"; export default async function PushSamePath(history: History) { expect(history.location).toMatchObject({ pathname: "/", }); history.push("/home"); expect(history.action).toBe("PUSH"); expect(history.location).toMatchObject({ pathname: "/home...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/TestSequences/PushStateInvalid.ts
packages/react-router/__tests__/router/TestSequences/PushStateInvalid.ts
import type { History } from "../../../lib/router/history"; export default function PushState(history: History, window: Window) { let err = new DOMException("ERROR", "DataCloneError"); jest.spyOn(window.history, "pushState").mockImplementation(() => { throw err; }); expect(history.location).toMatchObject(...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/TestSequences/InitialLocationHasKey.ts
packages/react-router/__tests__/router/TestSequences/InitialLocationHasKey.ts
import type { History } from "../../../lib/router/history"; export default function InitialLocationHasKey(history: History) { expect(history.location.key).toBeTruthy(); }
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/TestSequences/ReplaceState.ts
packages/react-router/__tests__/router/TestSequences/ReplaceState.ts
import type { History } from "../../../lib/router/history"; export default function ReplaceState(history: History) { expect(history.location).toMatchObject({ pathname: "/", }); history.replace("/home?the=query#the-hash", { the: "state" }); expect(history.action).toBe("REPLACE"); expect(history.location)...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/__tests__/router/TestSequences/PushMissingPathname.ts
packages/react-router/__tests__/router/TestSequences/PushMissingPathname.ts
import type { History } from "../../../lib/router/history"; export default function PushMissingPathname(history: History) { expect(history.location).toMatchObject({ pathname: "/", }); history.push("/home?the=query#the-hash"); expect(history.action).toBe("PUSH"); expect(history.location).toMatchObject({ ...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/errors.ts
packages/react-router/lib/errors.ts
import { isDataWithResponseInit } from "./router/router"; import { ErrorResponseImpl } from "./router/utils"; import type { DataWithResponseInit } from "./router/utils"; const ERROR_DIGEST_BASE = "REACT_ROUTER_ERROR"; // 18 const ERROR_DIGEST_REDIRECT = "REDIRECT"; // 8 const ERROR_DIGEST_ROUTE_ERROR_RESPONSE = "ROUTE...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/href.ts
packages/react-router/lib/href.ts
import type { Pages } from "./types/register"; import type { Equal } from "./types/utils"; type Args = { [K in keyof Pages]: ToArgs<Pages[K]["params"]> }; // prettier-ignore type ToArgs<Params extends Record<string, string | undefined>> = // path without params -> no `params` arg Equal<Params, {}> extends true ? ...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/components.tsx
packages/react-router/lib/components.tsx
import * as React from "react"; import type { InitialEntry, Location, MemoryHistory, To, } from "./router/history"; import { Action as NavigationType, createMemoryHistory, invariant, parsePath, warning, } from "./router/history"; import type { FutureConfig, HydrationState, RelativeRoutingType, ...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
true
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/context.ts
packages/react-router/lib/context.ts
import * as React from "react"; import type { ClientOnErrorFunction } from "./components"; import type { History, Location, Action as NavigationType, To, } from "./router/history"; import type { RelativeRoutingType, Router, StaticHandlerContext, } from "./router/router"; import type { AgnosticIndexRoute...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/hooks.tsx
packages/react-router/lib/hooks.tsx
import * as React from "react"; import type { DataRouteMatch, NavigateOptions, RouteContextObject, RouteMatch, RouteObject, } from "./context"; import { AwaitContext, DataRouterContext, DataRouterStateContext, ENABLE_DEV_WARNINGS, LocationContext, NavigationContext, RSCRouterContext, RouteCont...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
true
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/server-runtime/entry.ts
packages/react-router/lib/server-runtime/entry.ts
import type { RouteModules } from "../dom/ssr/routeModules"; import type { ServerRouteManifest } from "./routes"; export function createEntryRouteModules( manifest: ServerRouteManifest, ): RouteModules { return Object.keys(manifest).reduce((memo, routeId) => { let route = manifest[routeId]; if (route) { ...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/server-runtime/mode.ts
packages/react-router/lib/server-runtime/mode.ts
/** * The mode to use when running the server. */ export enum ServerMode { Development = "development", Production = "production", Test = "test", } export function isServerMode(value: any): value is ServerMode { return ( value === ServerMode.Development || value === ServerMode.Production || value...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/server-runtime/headers.ts
packages/react-router/lib/server-runtime/headers.ts
import { splitCookiesString } from "set-cookie-parser"; import type { DataRouteMatch } from "../context"; import type { StaticHandlerContext } from "../router/router"; import type { ServerRouteModule } from "../dom/ssr/routeModules"; import type { ServerBuild } from "./build"; import invariant from "./invariant"; // ...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/server-runtime/errors.ts
packages/react-router/lib/server-runtime/errors.ts
import type { StaticHandlerContext } from "../router/router"; import { isRouteErrorResponse } from "../router/utils"; import { ServerMode } from "./mode"; /** * This thing probably warrants some explanation. * * The whole point here is to emulate componentDidCatch for server rendering and * data loading. It can g...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/server-runtime/cookies.ts
packages/react-router/lib/server-runtime/cookies.ts
import type { ParseOptions, SerializeOptions } from "cookie"; import { parse, serialize } from "cookie"; import { sign, unsign } from "./crypto"; import { warnOnce } from "./warnings"; export type { ParseOptions as CookieParseOptions, SerializeOptions as CookieSerializeOptions, }; export interface CookieSignatur...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/server-runtime/routeMatching.ts
packages/react-router/lib/server-runtime/routeMatching.ts
import type { Params, AgnosticRouteObject } from "../router/utils"; import { matchRoutes } from "../router/utils"; import type { ServerRoute } from "./routes"; export interface RouteMatch<Route> { params: Params; pathname: string; route: Route; } export function matchServerRoutes( routes: ServerRoute[], pat...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/server-runtime/routes.ts
packages/react-router/lib/server-runtime/routes.ts
import type { AgnosticDataRouteObject, LoaderFunctionArgs as RRLoaderFunctionArgs, ActionFunctionArgs as RRActionFunctionArgs, RouteManifest, MiddlewareFunction, } from "../router/utils"; import { redirectDocument, replace, redirect } from "../router/utils"; import { callRouteHandler } from "./data"; import t...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/server-runtime/build.ts
packages/react-router/lib/server-runtime/build.ts
import type { ActionFunctionArgs, LoaderFunctionArgs, RouterContextProvider, } from "../router/utils"; import type { AssetsManifest, CriticalCss, EntryContext, FutureConfig, } from "../dom/ssr/entry"; import type { ServerRouteManifest } from "./routes"; import type { AppLoadContext } from "./data"; import...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/server-runtime/invariant.ts
packages/react-router/lib/server-runtime/invariant.ts
export default function invariant( value: boolean, message?: string, ): asserts value; export default function invariant<T>( value: T | null | undefined, message?: string, ): asserts value is T; export default function invariant(value: any, message?: string) { if (value === false || value === null || typeof v...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/server-runtime/server.ts
packages/react-router/lib/server-runtime/server.ts
import type { StaticHandler, StaticHandlerContext } from "../router/router"; import type { ErrorResponse } from "../router/utils"; import { RouterContextProvider } from "../router/utils"; import { isRouteErrorResponse, ErrorResponseImpl, stripBasename, } from "../router/utils"; import { getStaticContextFromErro...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/server-runtime/dev.ts
packages/react-router/lib/server-runtime/dev.ts
type DevServerHooks = { getCriticalCss?: (pathname: string) => Promise<string | undefined>; processRequestError?: (error: unknown) => void; }; const globalDevServerHooksKey = "__reactRouterDevServerHooks"; export function setDevServerHooks(devServerHooks: DevServerHooks) { // @ts-expect-error globalThis[globa...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/server-runtime/single-fetch.ts
packages/react-router/lib/server-runtime/single-fetch.ts
import { encode } from "../../vendor/turbo-stream-v2/turbo-stream"; import type { StaticHandler, StaticHandlerContext } from "../router/router"; import { isRedirectStatusCode, isResponse } from "../router/router"; import type { RouterContextProvider } from "../router/utils"; import { isRouteErrorResponse, ErrorResp...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/server-runtime/crypto.ts
packages/react-router/lib/server-runtime/crypto.ts
const encoder = /* @__PURE__ */ new TextEncoder(); export const sign = async (value: string, secret: string): Promise<string> => { let data = encoder.encode(value); let key = await createKey(secret, ["sign"]); let signature = await crypto.subtle.sign("HMAC", key, data); let hash = btoa(String.fromCharCode(...n...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/server-runtime/warnings.ts
packages/react-router/lib/server-runtime/warnings.ts
const alreadyWarned: { [message: string]: boolean } = {}; export function warnOnce(condition: boolean, message: string): void { if (!condition && !alreadyWarned[message]) { alreadyWarned[message] = true; console.warn(message); } }
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/server-runtime/serverHandoff.ts
packages/react-router/lib/server-runtime/serverHandoff.ts
import type { CriticalCss, FutureConfig } from "../dom/ssr/entry"; import { escapeHtml } from "../dom/ssr/markup"; import type { ServerBuild } from "./build"; export type ServerHandoff = { criticalCss?: CriticalCss; basename: string | undefined; future: FutureConfig; ssr: boolean; isSpaMode: boolean; route...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/server-runtime/sessions.ts
packages/react-router/lib/server-runtime/sessions.ts
import type { ParseOptions, SerializeOptions } from "cookie"; import type { Cookie, CookieOptions } from "./cookies"; import { createCookie, isCookie } from "./cookies"; import { warnOnce } from "./warnings"; /** * An object of name/value pairs to be used in the session. */ export interface SessionData { [name: s...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/server-runtime/data.ts
packages/react-router/lib/server-runtime/data.ts
import type { LoaderFunction, ActionFunction, LoaderFunctionArgs, ActionFunctionArgs, } from "../router/utils"; import { isDataWithResponseInit, isRedirectStatusCode } from "../router/router"; /** * An object of unknown type for route loaders and actions provided by the * server's `getLoadContext()` function...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/server-runtime/sessions/cookieStorage.ts
packages/react-router/lib/server-runtime/sessions/cookieStorage.ts
import { createCookie, isCookie } from "../cookies"; import type { SessionStorage, SessionIdStorageStrategy, SessionData, } from "../sessions"; import { warnOnceAboutSigningSessionCookie, createSession } from "../sessions"; interface CookieSessionStorageOptions { /** * The Cookie used to store the session d...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/server-runtime/sessions/memoryStorage.ts
packages/react-router/lib/server-runtime/sessions/memoryStorage.ts
import type { SessionData, SessionStorage, SessionIdStorageStrategy, FlashSessionData, } from "../sessions"; import { createSessionStorage } from "../sessions"; interface MemorySessionStorageOptions { /** * The Cookie used to store the session id on the client, or options used * to automatically create...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/dom-export/hydrated-router.tsx
packages/react-router/lib/dom-export/hydrated-router.tsx
import * as React from "react"; import type { UNSAFE_AssetsManifest as AssetsManifest, UNSAFE_RouteModules as RouteModules, DataRouter, HydrationState, RouterInit, ClientOnErrorFunction, } from "react-router"; import { UNSAFE_getHydrationData as getHydrationData, UNSAFE_invariant as invariant, UNSAFE...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/dom-export/dom-router-provider.tsx
packages/react-router/lib/dom-export/dom-router-provider.tsx
import * as React from "react"; import * as ReactDOM from "react-dom"; import type { RouterProviderProps as BaseRouterProviderProps } from "react-router"; import { RouterProvider as BaseRouterProvider } from "react-router"; export type RouterProviderProps = Omit<BaseRouterProviderProps, "flushSync">; export function...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/types/utils.ts
packages/react-router/lib/types/utils.ts
export type Expect<T extends true> = T; // prettier-ignore export type Equal<X, Y> = (<T>() => T extends X ? 1 : 2) extends (<T>() => T extends Y ? 1 : 2) ? true : false export type IsAny<T> = 0 extends 1 & T ? true : false; export type Func = (...args: any[]) => unknown; export type Pretty<T> = { [K in keyof T...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/types/params.ts
packages/react-router/lib/types/params.ts
import type { Pages, RouteFiles } from "./register"; import type { Normalize } from "./utils"; export type Params<RouteFile extends keyof RouteFiles> = Normalize< Pages[RouteFiles[RouteFile]["page"]]["params"] >;
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/types/route-module.ts
packages/react-router/lib/types/route-module.ts
import type { Func } from "./utils"; export type RouteModule = { meta?: Func; links?: Func; headers?: Func; loader?: Func; clientLoader?: Func; action?: Func; clientAction?: Func; HydrateFallback?: Func; default?: Func; ErrorBoundary?: Func; [key: string]: unknown; // allow user-defined exports }...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/types/register.ts
packages/react-router/lib/types/register.ts
import type { RouteModule } from "./route-module"; /** * Apps can use this interface to "register" app-wide types for React Router via interface declaration merging and module augmentation. * React Router should handle this for you via type generation. * * For more on declaration merging and module augmentation, s...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/types/route-module-annotations.ts
packages/react-router/lib/types/route-module-annotations.ts
import type { MetaDescriptor } from "../dom/ssr/routeModules"; import type { Location } from "../router/history"; import type { LinkDescriptor } from "../router/links"; import type { DataStrategyResult, MiddlewareNextFunction, } from "../router/utils"; import type { ClientDataFunctionArgs, GetLoaderData, Ser...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/types/route-data.ts
packages/react-router/lib/types/route-data.ts
import type { ClientLoaderFunctionArgs, ClientActionFunctionArgs, } from "../dom/ssr/routeModules"; import type { DataWithResponseInit, RouterContextProvider, } from "../router/utils"; import type { Serializable } from "../server-runtime/single-fetch"; import type { AppLoadContext } from "../server-runtime/data...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/types/future.ts
packages/react-router/lib/types/future.ts
/** * An augmentable interface users can modify in their app-code to opt into * future-flag-specific types */ export interface Future { // We list the potential fields here in comments strictly for clarity. // They will be generated by the react-router/dev/typegen/generate.ts module // // v8_middleware: bool...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/types/internal.ts
packages/react-router/lib/types/internal.ts
export type { GetAnnotations } from "./route-module-annotations"; import type { Params } from "./params"; import type { RouteFiles } from "./register"; import type { GetLoaderData, GetActionData } from "./route-data"; import type { RouteModule } from "./route-module.ts"; export type GetInfo<T extends { file: keyof Ro...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/types/serializes-to.ts
packages/react-router/lib/types/serializes-to.ts
import type { Equal, Expect } from "./utils"; /** * A brand that can be applied to a type to indicate that it will serialize * to a specific type when transported to the client from a loader. * Only use this if you have additional serialization/deserialization logic * in your application. */ export type unstable_...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/dom/lib.tsx
packages/react-router/lib/dom/lib.tsx
import * as React from "react"; import type { BrowserHistory, HashHistory, History, Action as NavigationType, Location, To, } from "../router/history"; import { createBrowserHistory, createHashHistory, createPath, invariant, warning, } from "../router/history"; import type { BlockerFunction, ...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
true
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/dom/global.ts
packages/react-router/lib/dom/global.ts
import type { HydrationState, Router as DataRouter } from "../router/router"; import type { ServerHandoff } from "../server-runtime/serverHandoff"; import type { AssetsManifest } from "./ssr/entry"; import type { RouteModules } from "./ssr/routeModules"; export type WindowReactRouterContext = ServerHandoff & { state...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/dom/dom.ts
packages/react-router/lib/dom/dom.ts
import { warning } from "../router/history"; import type { RelativeRoutingType } from "../router/router"; import type { FormEncType, HTMLFormMethod } from "../router/utils"; import { stripBasename } from "../router/utils"; export const defaultMethod: HTMLFormMethod = "get"; const defaultEncType: FormEncType = "applica...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/dom/server.tsx
packages/react-router/lib/dom/server.tsx
import * as React from "react"; import type { Location, Path, To } from "../router/history"; import { Action as NavigationType, createPath, invariant, parsePath, } from "../router/history"; import type { FutureConfig, Router as DataRouter, RevalidationState, CreateStaticHandlerOptions as RouterCreateSt...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/dom/ssr/entry.ts
packages/react-router/lib/dom/ssr/entry.ts
import type { StaticHandlerContext } from "../../router/router"; import type { EntryRoute } from "./routes"; import type { RouteModules } from "./routeModules"; import type { RouteManifest } from "../../router/utils"; import type { ServerBuild } from "../../server-runtime/build"; type SerializedError = { message: s...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/dom/ssr/routeModules.ts
packages/react-router/lib/dom/ssr/routeModules.ts
import type { ComponentType, ReactElement } from "react"; import type { Location } from "../../router/history"; import type { ActionFunction, ActionFunctionArgs, LoaderFunction, LoaderFunctionArgs, MiddlewareFunction, Params, ShouldRevalidateFunction, DataStrategyResult, } from "../../router/utils"; im...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/dom/ssr/hydration.tsx
packages/react-router/lib/dom/ssr/hydration.tsx
import type { DataRouteObject } from "../../context"; import type { Path } from "../../router/history"; import type { Router as DataRouter, HydrationState } from "../../router/router"; import { matchRoutes } from "../../router/utils"; import type { ClientLoaderFunction } from "./routeModules"; import { shouldHydrateRou...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/dom/ssr/fog-of-war.ts
packages/react-router/lib/dom/ssr/fog-of-war.ts
import * as React from "react"; import type { PatchRoutesOnNavigationFunction } from "../../context"; import type { Router as DataRouter } from "../../router/router"; import type { RouteManifest } from "../../router/utils"; import { matchRoutes } from "../../router/utils"; import type { AssetsManifest } from "./entry";...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/dom/ssr/errors.ts
packages/react-router/lib/dom/ssr/errors.ts
import type { RouterState } from "../../router/router"; import { ErrorResponseImpl } from "../../router/utils"; export function deserializeErrors( errors: RouterState["errors"], ): RouterState["errors"] { if (!errors) return null; let entries = Object.entries(errors); let serialized: RouterState["errors"] = {}...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/dom/ssr/errorBoundaries.tsx
packages/react-router/lib/dom/ssr/errorBoundaries.tsx
import * as React from "react"; import { Scripts, useFrameworkContext } from "./components"; import type { Location } from "../../router/history"; import { isRouteErrorResponse } from "../../router/utils"; import { ENABLE_DEV_WARNINGS } from "../../context"; type RemixErrorBoundaryProps = React.PropsWithChildren<{ ...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/dom/ssr/fallback.tsx
packages/react-router/lib/dom/ssr/fallback.tsx
import * as React from "react"; import { BoundaryShell } from "./errorBoundaries"; import { ENABLE_DEV_WARNINGS } from "../../context"; // If the user sets `clientLoader.hydrate=true` somewhere but does not // provide a `HydrateFallback` at any level of the tree, then we need to at // least include `<Scripts>` in the...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/dom/ssr/markup.ts
packages/react-router/lib/dom/ssr/markup.ts
// This escapeHtml utility is based on https://github.com/zertosh/htmlescape // License: https://github.com/zertosh/htmlescape/blob/0527ca7156a524d256101bb310a9f970f63078ad/LICENSE // We've chosen to inline the utility here to reduce the number of npm dependencies we have, // slightly decrease the code size compared t...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/dom/ssr/links.ts
packages/react-router/lib/dom/ssr/links.ts
import type { Location } from "../../router/history"; import type { AgnosticDataRouteMatch } from "../../router/utils"; import type { AssetsManifest } from "./entry"; import type { RouteModules, RouteModule } from "./routeModules"; import type { EntryRoute } from "./routes"; import { loadRouteModule } from "./routeMod...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/dom/ssr/invariant.ts
packages/react-router/lib/dom/ssr/invariant.ts
export default function invariant( value: boolean, message?: string, ): asserts value; export default function invariant<T>( value: T | null | undefined, message?: string, ): asserts value is T; export default function invariant(value: any, message?: string) { if (value === false || value === null || typeof v...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/dom/ssr/routes-test-stub.tsx
packages/react-router/lib/dom/ssr/routes-test-stub.tsx
import * as React from "react"; import type { ActionFunction, ActionFunctionArgs, LoaderFunction, LoaderFunctionArgs, MiddlewareFunction, } from "../../router/utils"; import type { DataRouteObject, IndexRouteObject, NonIndexRouteObject, } from "../../context"; import type { LinksFunction, MetaFunction, ...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/dom/ssr/server.tsx
packages/react-router/lib/dom/ssr/server.tsx
import type { ReactElement } from "react"; import * as React from "react"; import { createStaticRouter, StaticRouterProvider } from "../server"; import { FrameworkContext } from "./components"; import type { EntryContext } from "./entry"; import { RemixErrorBoundary } from "./errorBoundaries"; import { createServerRou...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/dom/ssr/routes.tsx
packages/react-router/lib/dom/ssr/routes.tsx
import * as React from "react"; import type { HydrationState } from "../../router/router"; import type { ActionFunctionArgs, LoaderFunctionArgs, RouteManifest, ShouldRevalidateFunction, ShouldRevalidateFunctionArgs, } from "../../router/utils"; import { ErrorResponseImpl, compilePath } from "../../router/uti...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false
remix-run/react-router
https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/packages/react-router/lib/dom/ssr/single-fetch.tsx
packages/react-router/lib/dom/ssr/single-fetch.tsx
import * as React from "react"; import { decode } from "../../../vendor/turbo-stream-v2/turbo-stream"; import type { Router as DataRouter } from "../../router/router"; import { isDataWithResponseInit, isResponse } from "../../router/router"; import type { DataStrategyFunction, DataStrategyFunctionArgs, DataStrat...
typescript
MIT
aaa150616e619efc8d26c092e8625962c2fb4246
2026-01-04T15:29:26.871957Z
false