Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apparently missing type declarations when main tsconfig file under /config folder #53871

Closed
3 tasks done
HarTstaRx opened this issue Apr 17, 2023 · 3 comments
Closed
3 tasks done
Labels
Duplicate An existing issue was already created

Comments

@HarTstaRx
Copy link

HarTstaRx commented Apr 17, 2023

Type: Bug

Tasks

Preview Give feedback
  • I have a dummy project on a public repo in order to show and reproduce this strange behavoiur.
  • This project has all it's configuration related files inside a ./config folder under the root folder.
  • VSCode shows errors related to type declarations that are not actually present when ./config/tsconfig.json file is under the ./config folder
    • As soon as this file is moved to the root folder and it's references are properly modified, these "errors" dissapear.
  • These errors do not seem to be actual errors: tsc runs fine and the app seems to run just fine in the browser with no messages whatsoever.

Steps to reproduce:

  1. Clone this repo: https://github.com/HarTstaRx/errors-test.git
  2. Open VSCode as admin with extensions disabled
  3. Run pnpm i
  4. Run pnpm build
  5. Open a *.tsx file, there are errors that seem to not be actually present
    • This is a Vite + React + Typescript project : React v18.2, Typescript v4.9.5, Vite v4.1.0
    • In React there is no need anymore to import React as a global variable in order to write jsx code.
    • The list of problems are fixed when ./config/tsconfig.json file is moved to the root folder.

errors-test install   tsc
errors-test errors in header tsx (sample)
node pnpm vscode versions
errors-test full problems list

VS Code version: Code 1.77.3 (704ed70d4fd1c6bd6342c436f1ede30d1cff4710, 2023-04-12T09:16:02.548Z)
OS version: Windows_NT x64 10.0.22000
Modes:
Sandboxed: Yes

System Info
Item Value
CPUs 12th Gen Intel(R) Core(TM) i7-12700K (20 x 3610)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
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
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) undefined
Memory (System) 31.75GB (23.25GB free)
Process Argv --disable-extensions --crash-reporter-id 4c5e5801-46b1-4e84-a1b5-abfe664f9cc2
Screen Reader no
VM 0%
Extensions disabled
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscorecescf:30445987
pythondataviewer:30285071
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593cf:30376535
pythonvs932:30410667
cppdebug:30492333
vscaac:30438847
vsclangdf:30486550
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30695312
azure-dev_surveyone:30548225
nodejswelcome1:30587005
2e4cg342:30602488
pyind779:30671433
f6dab269:30613381
pythonsymbol12:30671437
showlangstatbar:30672706
vsctsb:30705553
defaultazurewalk:30687958
pythonms35:30701012

@mjbvz mjbvz transferred this issue from microsoft/vscode Apr 17, 2023
@mjbvz
Copy link
Contributor

mjbvz commented Apr 17, 2023

Duplicate of #33094

As a workaround, can you create root level tsconfig that extends your config/tsconfig.json file?

@RyanCavanaugh RyanCavanaugh added the Duplicate An existing issue was already created label Apr 17, 2023
@mjbvz mjbvz removed their assignment Apr 17, 2023
@HarTstaRx
Copy link
Author

Thanks for finding the duplicate @mjbvz, I didn't saw it on my search so sorry for that.
Yes, I can create a root level tsconfig but that defeats the purpouse of the situation. It seems this issue has been around since several years and once was marked as priority. Is there something I can do to help with this issue?

@typescript-bot
Copy link
Collaborator

This issue has been marked as a 'Duplicate' and has seen no recent activity. It has been automatically closed for house-keeping purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

4 participants