Skip to content

Commit 41471d8

Browse files
committed
Enable noImplicitAny For @tomic/react #1018
1 parent 42d20d0 commit 41471d8

File tree

2 files changed

+14
-20
lines changed

2 files changed

+14
-20
lines changed

browser/react/src/hooks.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export function useResource<C extends OptionalClass = never>(
5858
return resource;
5959
}
6060

61-
const stableEmptyArray = [];
61+
const stableEmptyArray: string[] = [];
6262

6363
/**
6464
* Converts an array of Atomic URL strings to an array of Resources.
@@ -75,7 +75,7 @@ export function useResources(
7575
// When a change happens, set the new Resource.
7676
function handleNotify(updated: Resource) {
7777
setResources(prev => {
78-
prev.set(updated.getSubject(), proxyResource(updated));
78+
prev.set(updated.subject, proxyResource(updated));
7979

8080
// We need to create new Maps for react hooks to update - React only checks references, not content
8181
return new Map(prev);

browser/react/tsconfig.json

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
11
{
2-
"compilerOptions": {
3-
"declaration": true,
4-
"declarationMap": true,
5-
"outDir": "./dist",
6-
"lib": [
7-
"ES6",
8-
"ES7",
9-
"ESNext",
10-
"DOM"
11-
],
12-
"rootDir": ".",
13-
"jsx": "react",
14-
"module": "NodeNext",
15-
"moduleResolution": "NodeNext"
16-
},
17-
"include": [
18-
"src/**/*"
19-
]
2+
"extends": "../tsconfig.build.json",
3+
"compilerOptions": {
4+
"declaration": true,
5+
"declarationMap": true,
6+
"outDir": "./dist",
7+
"lib": ["ES6", "ES7", "ESNext", "DOM"],
8+
"rootDir": ".",
9+
"jsx": "react",
10+
"module": "NodeNext",
11+
"moduleResolution": "NodeNext"
12+
},
13+
"include": ["src/**/*"]
2014
}

0 commit comments

Comments
 (0)