Skip to content

Commit b5151a3

Browse files
committed
internal type fixes
1 parent 05c41d5 commit b5151a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/react-router/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ import {
1515
parsePath
1616
} from "history";
1717

18-
const readOnly: <T extends unknown>(obj: T) => T = __DEV__
18+
const readOnly: <T>(obj: T) => Readonly<T> = __DEV__
1919
? obj => Object.freeze(obj)
2020
: obj => obj;
2121

2222
function invariant(cond: any, message: string): asserts cond {
2323
if (!cond) throw new Error(message);
2424
}
2525

26-
function warning(cond: boolean, message: string): void {
26+
function warning(cond: any, message: string): void {
2727
if (!cond) {
2828
// eslint-disable-next-line no-console
2929
if (typeof console !== "undefined") console.warn(message);

0 commit comments

Comments
 (0)