We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05c41d5 commit b5151a3Copy full SHA for b5151a3
packages/react-router/index.tsx
@@ -15,15 +15,15 @@ import {
15
parsePath
16
} from "history";
17
18
-const readOnly: <T extends unknown>(obj: T) => T = __DEV__
+const readOnly: <T>(obj: T) => Readonly<T> = __DEV__
19
? obj => Object.freeze(obj)
20
: obj => obj;
21
22
function invariant(cond: any, message: string): asserts cond {
23
if (!cond) throw new Error(message);
24
}
25
26
-function warning(cond: boolean, message: string): void {
+function warning(cond: any, message: string): void {
27
if (!cond) {
28
// eslint-disable-next-line no-console
29
if (typeof console !== "undefined") console.warn(message);
0 commit comments