microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.3k stars 29.31k forks source link

warnings shown even experimentalDecorators is set to true, ts(1219) #115475

Closed calidion closed 3 years ago

calidion commented 3 years ago

Issue Type: Bug

in tsconfig.json, experimentalDecorators is set to true

    "experimentalDecorators": true,

but the ts files still have warnings as the following:

对修饰器的实验支持功能在将来的版本中可能更改。在 "tsconfig" 或 "jsconfig" 中设置 "experimentalDecorators" 选项以删除此警告。ts(1219)

VS Code version: Code 1.52.1 (ea3859d4ba2f3e577a159bc91e3074c5d85c0523, 2020-12-16T16:32:10.090Z) OS version: Linux x64 5.4.0-64-generic

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i5-4260U CPU @ 1.40GHz (4 x 1975)| |GPU Status|2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: unavailable_off
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|1, 2, 2| |Memory (System)|7.72GB (0.43GB free)| |Process Argv|--no-sandbox --unity-launch --crash-reporter-id 692738bc-6a6c-4358-b51a-43c2edfebf30| |Screen Reader|no| |VM|0%| |DESKTOP_SESSION|unity| |XDG_CURRENT_DESKTOP|Unity| |XDG_SESSION_DESKTOP|unity| |XDG_SESSION_TYPE|x11|
Extensions (54) Extension|Author (truncated)|Version ---|---|--- android-dev-ext|ade|1.3.2 code-gnu-global|aus|0.2.2 doxdocgen|csc|1.1.0 AndroidLauncher|Dan|0.0.7 vscode-markdownlint|Dav|0.38.0 githistory|don|0.6.14 vscode-remark-lint|dre|1.0.0 prettier-vscode|esb|5.8.0 vscode-reveal|evi|4.0.3 vscode-pull-request-github|Git|0.22.0 cmake-integration-vscode|go2|0.7.1 go|gol|0.22.0 cloudcode|goo|1.8.0 vscode-graphql|Gra|0.3.13 better-cpp-syntax|jef|1.15.5 cmake-tools-helper|mad|0.2.1 marp-vscode|mar|0.17.0 markdown-formatter|mer|0.8.9 file-downloader|min|1.0.9 mindaro|min|1.0.120210126 vscode-clang|mit|0.2.3 vscode-remark|mrm|1.2.1 vscode-docker|ms-|1.9.1 vscode-language-pack-zh-hans|MS-|1.52.2 vscode-kubernetes-tools|ms-|1.2.3 python|ms-|2021.1.502429796 jupyter|ms-|2020.12.414227025 remote-containers|ms-|0.155.1 remote-ssh|ms-|0.63.0 remote-ssh-edit|ms-|0.63.0 remote-wsl|ms-|0.52.0 cmake-tools|ms-|1.5.3 cpptools|ms-|1.1.3 cpptools-extension-pack|ms-|1.0.0 vsliveshare|ms-|1.0.3577 vsliveshare-audio|ms-|0.1.91 vsonline|ms-|1.0.3076 debugger-for-chrome|msj|4.12.12 vscode-jest|Ort|3.2.0 prisma|Pri|2.15.0 java|red|0.74.0 vscode-yaml|red|0.14.0 rust|rus|0.7.8 RustyCode|sav|0.19.1 vscode-table-formatter|shu|1.2.1 vscode-scss-formatter|sib|2.1.0 cmake|twx|0.0.17 vscodeintellicode|Vis|1.2.11 vscode-java-debug|vsc|0.30.0 vscode-java-dependency|vsc|0.17.0 vscode-java-pack|vsc|0.12.1 vscode-java-test|vsc|0.27.0 vscode-maven|vsc|0.27.1 vscode-icons|vsc|11.1.0 (2 theme extensions excluded)
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 openlogontheside:30221877 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492cf:30211402 wsl2promptcf:30224613 pythonvsdeb440:30248342 unusedpromptcf:30224611 folderexplorer:30224614 openfilemenu:30224647 pythonvsded773:30248341 pythonvspyt600cf:30251589 ```
vscodebot[bot] commented 3 years ago

(Experimental duplicate detection) Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

calidion commented 3 years ago

2021-01-31 05-07-54屏幕截图

tsconfig.json is in the root directory.

gjsjohnmurray commented 3 years ago

Maybe use the Bisect command from Command Palette to check if any of your extensions is causing the problem.

If that doesn't help, can you post your tsconfig.json file?

calidion commented 3 years ago

@gjsjohnmurray Thanks. It is caused by the exclude cmd in tsconfig.json.

calidion commented 3 years ago

still showing even when files are included.

2021-02-01 12-29-20屏幕截图

mjbvz commented 3 years ago

Check the file is the tsconfig project by running: TypeScript: go to project configuration. This should open the tsconfig. If it doesn't, your tsconfig likely needs to be reconfigured

/needsMoreInfo

calidion commented 3 years ago

@mjbvz

configure can be found by that command.

please check my project here.

https://github.com/calidion/aex

the problematic files are located at here:

https://github.com/calidion/aex/tree/master/__tests__/decorators

mjbvz commented 3 years ago

The files under __tests__ are not part of your tsconfig project. The tsconfig lists:

  "include": [
    "src/**/*"
  ],

So only files under src are included currently.

Try either including __tests__ in your config, or create a new tsconfig under __tests__ that enables experimental decorators