Skip to content

Commit 9bd91a0

Browse files
committed
chore: fix upgraded tooling checks
1 parent 32f2c02 commit 9bd91a0

3 files changed

Lines changed: 9 additions & 5 deletions

File tree

src/Immutable.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,11 @@ export default function createImmutable() {
9494
})`;
9595
}
9696

97-
return React.memo(
98-
refAble ? React.forwardRef(ImmutableComponent) : ImmutableComponent,
99-
propsAreEqual,
100-
) as unknown as T;
97+
const MemoComponent = refAble
98+
? React.forwardRef(ImmutableComponent)
99+
: (ImmutableComponent as React.ComponentType<any>);
100+
101+
return React.memo(MemoComponent, propsAreEqual) as unknown as T;
101102
}
102103

103104
return {

src/context.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export function useContext<ContextProps, SelectorValue>(
101101
const context = React.useContext(holder?.Context);
102102
const { listeners, getValue } = context || {};
103103

104-
const valueRef = React.useRef<SelectorValue>();
104+
const valueRef = React.useRef<SelectorValue | undefined>(undefined);
105105
valueRef.current = eventSelector(context ? getValue() : holder?.defaultValue);
106106
const [, forceUpdate] = React.useState({});
107107

tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
22
"compilerOptions": {
33
"target": "esnext",
4+
"ignoreDeprecations": "6.0",
5+
"strict": false,
6+
"types": ["node", "jest"],
47
"moduleResolution": "node",
58
"baseUrl": "./",
69
"jsx": "react",

0 commit comments

Comments
 (0)