Chore: Use @types/webpack-env to type require.context (#51196)

This commit is contained in:
Josh Hunt 2022-06-22 12:38:47 +01:00 committed by GitHub
parent 54e9408cfd
commit 7cee620fbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 2 deletions

View File

@ -285,6 +285,7 @@
"@sentry/types": "6.19.7",
"@sentry/utils": "6.19.7",
"@types/react-resizable": "3.0.0",
"@types/webpack-env": "^1.17.0",
"@visx/event": "2.6.0",
"@visx/gradient": "2.10.0",
"@visx/group": "2.10.0",

View File

@ -80,8 +80,8 @@ import { configureStore } from './store/configureStore';
_.move = arrayMove;
// import symlinked extensions
const extensionsIndex = (require as any).context('.', true, /extensions\/index.ts/);
const extensionsExports = extensionsIndex.keys().map((key: any) => {
const extensionsIndex = require.context('.', true, /extensions\/index.ts/);
const extensionsExports = extensionsIndex.keys().map((key) => {
return extensionsIndex(key);
});

View File

@ -11406,6 +11406,13 @@ __metadata:
languageName: node
linkType: hard
"@types/webpack-env@npm:^1.17.0":
version: 1.17.0
resolution: "@types/webpack-env@npm:1.17.0"
checksum: 9ad4d208c4429c9427191d1f4c92e4c43e530384c17a6bc298acb89003fc47fcde1d8372e50acefa3061e9100e57fd9d616e96def875afd06c0c2afe508f298e
languageName: node
linkType: hard
"@types/webpack-sources@npm:*":
version: 3.2.0
resolution: "@types/webpack-sources@npm:3.2.0"
@ -20828,6 +20835,7 @@ __metadata:
"@types/testing-library__react-hooks": ^3.2.0
"@types/tinycolor2": 1.4.3
"@types/uuid": 8.3.4
"@types/webpack-env": ^1.17.0
"@typescript-eslint/eslint-plugin": 5.28.0
"@typescript-eslint/parser": 5.28.0
"@visx/event": 2.6.0