Skip to content

Commit

Permalink
Fixes #304 Re-export only primary types from submodules.
Browse files Browse the repository at this point in the history
  • Loading branch information
molefrog committed May 10, 2023
1 parent c79668b commit f65cb8d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
12 changes: 9 additions & 3 deletions types/ts3.9.4/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,15 @@ import {
import { DefaultParams, Params, Match } from "../matcher";
import { RouterObject, RouterOptions } from "../router";

// re-export types from these modules
export * from "../matcher";
export * from "../use-location";
// re-export some types from these modules
export {
DefaultParams,
Params,
MatchWithParams,
NoMatch,
Match,
} from "../matcher";
export { Path, BaseLocationHook, LocationHook } from "../use-location";
export * from "../router";

// React <18 only: fixes incorrect `ReactNode` declaration that had `{}` in the union.
Expand Down
12 changes: 9 additions & 3 deletions types/ts4.1/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,15 @@ import {
import { DefaultParams, Match } from "../matcher";
import { RouterObject, RouterOptions } from "../router";

// re-export types from these modules
export * from "../matcher";
export * from "../use-location";
// re-export some types from these modules
export {
DefaultParams,
Params,
MatchWithParams,
NoMatch,
Match,
} from "../matcher";
export { Path, BaseLocationHook, LocationHook } from "../use-location";
export * from "../router";

// React <18 only: fixes incorrect `ReactNode` declaration that had `{}` in the union.
Expand Down

0 comments on commit f65cb8d

Please sign in to comment.