Skip to content

Commit

Permalink
fix: adapt types to React 18
Browse files Browse the repository at this point in the history
  • Loading branch information
spawnia committed Dec 19, 2023
1 parent 1cee6a2 commit 0cb085f
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 59 deletions.
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,5 @@
"typescript": "^5.3.2",
"webpack": "^5.89.0"
},
"resolutions": {
"@types/react": "16.14.50"
},
"packageManager": "[email protected]"
}
4 changes: 3 additions & 1 deletion src/Select/formInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ export function mapToFormInputOptions<
}));
}

export function toFormInputOption<T>(value: T): FormInputOption<T, T> {
export function toFormInputOption<T extends ReactNode>(
value: T,
): FormInputOption<T, T> {
return { label: value, value };
}
110 changes: 55 additions & 55 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2829,8 +2829,8 @@ __metadata:
linkType: hard

"@eslint/eslintrc@npm:^2.1.3":
version: 2.1.3
resolution: "@eslint/eslintrc@npm:2.1.3"
version: 2.1.4
resolution: "@eslint/eslintrc@npm:2.1.4"
dependencies:
ajv: "npm:^6.12.4"
debug: "npm:^4.3.2"
Expand All @@ -2841,7 +2841,7 @@ __metadata:
js-yaml: "npm:^4.1.0"
minimatch: "npm:^3.1.2"
strip-json-comments: "npm:^3.1.1"
checksum: f4103f4346126292eb15581c5a1d12bef03410fd3719dedbdb92e1f7031d46a5a2d60de8566790445d5d4b70b75ba050876799a11f5fff8265a91ee3fa77dab0
checksum: 32f67052b81768ae876c84569ffd562491ec5a5091b0c1e1ca1e0f3c24fb42f804952fdd0a137873bc64303ba368a71ba079a6f691cee25beee9722d94cc8573
languageName: node
linkType: hard

Expand Down Expand Up @@ -6505,14 +6505,14 @@ __metadata:
languageName: node
linkType: hard

"@types/react@npm:16.14.50":
version: 16.14.50
resolution: "@types/react@npm:16.14.50"
"@types/react@npm:*, @types/react@npm:>=16, @types/react@npm:^18.2.38":
version: 18.2.45
resolution: "@types/react@npm:18.2.45"
dependencies:
"@types/prop-types": "npm:*"
"@types/scheduler": "npm:*"
csstype: "npm:^3.0.2"
checksum: 41dd6df98a539d52eb3cf7152f644bd8ea724a9341e85686986f814ff8b39186fa82921d9858d67101918d96a2206608d94ebb340a19afe3f4332488af02f8a1
checksum: 4cc650c47ffb88baac29fb7a74e842e4af4a55f437086ef70250fdc75f0a5f2fcf8adc272d05ab2e00b1de6e14613296881271caee037dadf9130fdeb498c59e
languageName: node
linkType: hard

Expand Down Expand Up @@ -6619,14 +6619,14 @@ __metadata:
linkType: hard

"@typescript-eslint/eslint-plugin@npm:^6.12.0":
version: 6.12.0
resolution: "@typescript-eslint/eslint-plugin@npm:6.12.0"
version: 6.15.0
resolution: "@typescript-eslint/eslint-plugin@npm:6.15.0"
dependencies:
"@eslint-community/regexpp": "npm:^4.5.1"
"@typescript-eslint/scope-manager": "npm:6.12.0"
"@typescript-eslint/type-utils": "npm:6.12.0"
"@typescript-eslint/utils": "npm:6.12.0"
"@typescript-eslint/visitor-keys": "npm:6.12.0"
"@typescript-eslint/scope-manager": "npm:6.15.0"
"@typescript-eslint/type-utils": "npm:6.15.0"
"@typescript-eslint/utils": "npm:6.15.0"
"@typescript-eslint/visitor-keys": "npm:6.15.0"
debug: "npm:^4.3.4"
graphemer: "npm:^1.4.0"
ignore: "npm:^5.2.4"
Expand All @@ -6639,7 +6639,7 @@ __metadata:
peerDependenciesMeta:
typescript:
optional: true
checksum: 98e07a00c95a3b786d3fe073e9181015c7f37d375caccc74892626a9d8107be0965d50c1da57087dd0fb4c4e35612a51740c944a8ff1adfd7ff6a4c029d13f6e
checksum: 78054afb0d4ab12d82db7a9cb005dfa2be42962341728abf4a81802e1f4c0f5b23de4870287f4b7e32aa4a4bc900bbc218f2d4d0c02aa77452e8e8e0b71fe3de
languageName: node
linkType: hard

Expand All @@ -6655,20 +6655,20 @@ __metadata:
linkType: hard

"@typescript-eslint/parser@npm:^6.12.0":
version: 6.12.0
resolution: "@typescript-eslint/parser@npm:6.12.0"
version: 6.15.0
resolution: "@typescript-eslint/parser@npm:6.15.0"
dependencies:
"@typescript-eslint/scope-manager": "npm:6.12.0"
"@typescript-eslint/types": "npm:6.12.0"
"@typescript-eslint/typescript-estree": "npm:6.12.0"
"@typescript-eslint/visitor-keys": "npm:6.12.0"
"@typescript-eslint/scope-manager": "npm:6.15.0"
"@typescript-eslint/types": "npm:6.15.0"
"@typescript-eslint/typescript-estree": "npm:6.15.0"
"@typescript-eslint/visitor-keys": "npm:6.15.0"
debug: "npm:^4.3.4"
peerDependencies:
eslint: ^7.0.0 || ^8.0.0
peerDependenciesMeta:
typescript:
optional: true
checksum: 63a29b37c0c39773617df70d8f006b093c67fe2b67966cb3e8cc07476eaf79ee196f214bdfa320075f7950b5d5e8d228aaae6f3e6fac3be269503a96f49bc724
checksum: e7f265fd4abd3bc49fa5b304cd4b9c22801ac5a9da4ee342bbab0c117d629ac4aad6998555b61a8c5a0b279c443a44ae99f16669e24e3ef17ccec20c8b7019e7
languageName: node
linkType: hard

Expand All @@ -6682,30 +6682,30 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/scope-manager@npm:6.12.0":
version: 6.12.0
resolution: "@typescript-eslint/scope-manager@npm:6.12.0"
"@typescript-eslint/scope-manager@npm:6.15.0":
version: 6.15.0
resolution: "@typescript-eslint/scope-manager@npm:6.15.0"
dependencies:
"@typescript-eslint/types": "npm:6.12.0"
"@typescript-eslint/visitor-keys": "npm:6.12.0"
checksum: d6316ba59479b4a764d56eee887a5e22b59811bead351d5a61618c34bf3159afead289f68661739575dd1b1da768dfe7967e429ec07a310e1b7831c396eacf80
"@typescript-eslint/types": "npm:6.15.0"
"@typescript-eslint/visitor-keys": "npm:6.15.0"
checksum: 3428d99de440f227cbc2afb44cdcb25e44c4b49c5f490392f83e21d2048210a6ec2f2f68133376c842034f5b5ba4ec9721da7caa18e631e23b57e20927b5b6f0
languageName: node
linkType: hard

"@typescript-eslint/type-utils@npm:6.12.0":
version: 6.12.0
resolution: "@typescript-eslint/type-utils@npm:6.12.0"
"@typescript-eslint/type-utils@npm:6.15.0":
version: 6.15.0
resolution: "@typescript-eslint/type-utils@npm:6.15.0"
dependencies:
"@typescript-eslint/typescript-estree": "npm:6.12.0"
"@typescript-eslint/utils": "npm:6.12.0"
"@typescript-eslint/typescript-estree": "npm:6.15.0"
"@typescript-eslint/utils": "npm:6.15.0"
debug: "npm:^4.3.4"
ts-api-utils: "npm:^1.0.1"
peerDependencies:
eslint: ^7.0.0 || ^8.0.0
peerDependenciesMeta:
typescript:
optional: true
checksum: 35f8dfbacb43df4378876669835b580549c50d7c1af642d39b9b3146e6085c9dab8d982151e21598af42870971b76ce76c12fb93d2913e4bdbd647fbe54fa0f5
checksum: 32cb531a4b5e0ccd431cba553ec73b87d4453b48af288a33e359ba4f5278126390d82799b61d3f0fbf135cfde1ac6c2275c2cf37a676e8a2a2811e774e660f16
languageName: node
linkType: hard

Expand All @@ -6716,10 +6716,10 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/types@npm:6.12.0":
version: 6.12.0
resolution: "@typescript-eslint/types@npm:6.12.0"
checksum: 04abe31222d8d50211001a337516944a6561f23a8fe2dce4010aae9b0770d5e4550fc3a72eadbe6d7eeabacb3de8b278cdd93184aa70a5316ca54a90c38f4414
"@typescript-eslint/types@npm:6.15.0":
version: 6.15.0
resolution: "@typescript-eslint/types@npm:6.15.0"
checksum: 6e33529ea301c8c4b8c1f589dadd5d2a66c1b24ec87a577524fbc996d4c7b65d4f4fdfa4a3937b691efee6a10a6b16f7bfcabe98a15e0fc0c0c57aa0d80dcc25
languageName: node
linkType: hard

Expand All @@ -6741,12 +6741,12 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/typescript-estree@npm:6.12.0":
version: 6.12.0
resolution: "@typescript-eslint/typescript-estree@npm:6.12.0"
"@typescript-eslint/typescript-estree@npm:6.15.0":
version: 6.15.0
resolution: "@typescript-eslint/typescript-estree@npm:6.15.0"
dependencies:
"@typescript-eslint/types": "npm:6.12.0"
"@typescript-eslint/visitor-keys": "npm:6.12.0"
"@typescript-eslint/types": "npm:6.15.0"
"@typescript-eslint/visitor-keys": "npm:6.15.0"
debug: "npm:^4.3.4"
globby: "npm:^11.1.0"
is-glob: "npm:^4.0.3"
Expand All @@ -6755,7 +6755,7 @@ __metadata:
peerDependenciesMeta:
typescript:
optional: true
checksum: 48400894fbf7d4402ef368b9da4f2cc3d44f09df29ce43c37fa4cc7045b8f1dc6973b0fbc8c98ed346de57f47fd66cc58428fbaaf135918c80d13ce30a87cb24
checksum: 08955f6e84b8edb855a6769671e85889e52b15b82e00a64f595da867b21ad060e5342787c436d77702b2a1f39d411ac79b81a8d2e2006e9b1886eadb08b626df
languageName: node
linkType: hard

Expand All @@ -6777,20 +6777,20 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/utils@npm:6.12.0":
version: 6.12.0
resolution: "@typescript-eslint/utils@npm:6.12.0"
"@typescript-eslint/utils@npm:6.15.0":
version: 6.15.0
resolution: "@typescript-eslint/utils@npm:6.15.0"
dependencies:
"@eslint-community/eslint-utils": "npm:^4.4.0"
"@types/json-schema": "npm:^7.0.12"
"@types/semver": "npm:^7.5.0"
"@typescript-eslint/scope-manager": "npm:6.12.0"
"@typescript-eslint/types": "npm:6.12.0"
"@typescript-eslint/typescript-estree": "npm:6.12.0"
"@typescript-eslint/scope-manager": "npm:6.15.0"
"@typescript-eslint/types": "npm:6.15.0"
"@typescript-eslint/typescript-estree": "npm:6.15.0"
semver: "npm:^7.5.4"
peerDependencies:
eslint: ^7.0.0 || ^8.0.0
checksum: af9159395847a675e270f56364089e3326ba26f2a0b45ef042ab8508f61f92edd24c60ec8ccca42f0883bbbd233d6e9dcc9c2304ef9694336459c26c38bbbdc7
checksum: 53519a2027681bdc8f028f9421c65f193f91b5bb1659465fedb8043376c693c2391211f1c01d8ba25bfaa7f7b3a102263d7123f9dfade12032159f4b4490f0fb
languageName: node
linkType: hard

Expand All @@ -6804,13 +6804,13 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/visitor-keys@npm:6.12.0":
version: 6.12.0
resolution: "@typescript-eslint/visitor-keys@npm:6.12.0"
"@typescript-eslint/visitor-keys@npm:6.15.0":
version: 6.15.0
resolution: "@typescript-eslint/visitor-keys@npm:6.15.0"
dependencies:
"@typescript-eslint/types": "npm:6.12.0"
"@typescript-eslint/types": "npm:6.15.0"
eslint-visitor-keys: "npm:^3.4.1"
checksum: a96102bed6d645780d2858c13f6808e43f5565eb74066df2853db7506aa3a15034380c1ec94192ad44c77d7c8541d4e86c707203d33d1c3f3f3e4c1d9dfb5fc6
checksum: bf9f71af60bd63d1073900e75c5a0aa6eddd672f6c3ac6092c765d67deb7a0c32d2a5f6f3aee9e95f93a93d58563a76da209bd8487aadafd4d013100ffe38520
languageName: node
linkType: hard

Expand Down

0 comments on commit 0cb085f

Please sign in to comment.