{
"compilerOptions": {
"allowJs": false,
"allowSyntheticDefaultImports": true,
"baseUrl": "./src",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"jsx": "react-jsx",
"lib": ["dom", "dom.iterable", "esnext"],
"module": "esnext",
"moduleResolution": "node",
"noEmit": true,
"noFallthroughCasesInSwitch": true,
"outDir": "dist",
"paths": {
"~/api": ["api/index.ts"],
"~/assets/*": ["assets/*"],
"~/components": ["components/index.ts"],
"~/constants/*": ["constants/*"],
"~/hooks": ["hooks/index.ts"],
"~/pages/*": ["pages/*"],
"~/router": ["router/index.tsx"],
"~/schemas": ["schemas/index.ts"],
"~/store": ["store/index.ts"],
"~/store/*": ["store/*"],
"~/styles/*": ["styles/*"],
"~/translations/*": ["translations/*"],
"~/types": ["types/index.ts"],
"~/utils": ["utils/index.ts"]
},
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"target": "ESNEXT"
}
}
Is there a way to solve this problem? It's annoying currently to always update the import manually.
VS Code version: Code 1.82.0 (8b617bd08fd9e3fc94d14adb8d358b56e3f72314, 2023-09-06T22:08:29.670Z)
OS version: Darwin arm64 22.4.0
Modes:
Type: Bug
tsconfig.ts:useModal, I get the import suggestionhooks/useModal. I would expect the suggestion~/hooksinstead, as this function is exported fromhooks/index.tsas specified in my tsconfig file.EMAIL, I get the expected import suggestion~/constants/regex. The difference in behavior seems to be caused by using barrel export files (re-exporting all submodules in index.ts).The exports in all
index.tsfiles are specified as e.g.export * from './useModal'. It seems to make no difference when I change it toexport { useModal } from './useModal'. I have also tried enabling"typescript.preferences.importModuleSpecifier": "non-relative"which makes no difference.Disabling all extensions has no effect.
Is there a way to solve this problem? It's annoying currently to always update the import manually.
VS Code version: Code 1.82.0 (8b617bd08fd9e3fc94d14adb8d358b56e3f72314, 2023-09-06T22:08:29.670Z)
OS version: Darwin arm64 22.4.0
Modes:
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Extensions (20)
(1 theme extensions excluded)
A/B Experiments