Skip to content

ts(80004): Quick fix... > Annotate with type from JSDoc :: object types #51374

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

Closed
ShaMan123 opened this issue Nov 1, 2022 · 0 comments · Fixed by #51378
Closed

ts(80004): Quick fix... > Annotate with type from JSDoc :: object types #51374

ShaMan123 opened this issue Nov 1, 2022 · 0 comments · Fixed by #51378

Comments

@ShaMan123
Copy link

ShaMan123 commented Nov 1, 2022

Type: Bug

I love VSCode
Amazing DX

Actual

When using Quick fix... > Annotate with type from JSDoc to annotate an arg that is described by keys it is annotated incorrectly:

Before Annotating

  /**
   * Set the font parameter of the context with the object properties or with charStyle
   * @private
   * @param {CanvasRenderingContext2D} ctx Context to render on
   * @param {Object} [charStyle] object with font style properties
   * @param {String} [charStyle.fontFamily] Font Family
   * @param {Number} [charStyle.fontSize] Font size in pixels. ( without px suffix )
   * @param {String} [charStyle.fontWeight] Font weight
   * @param {String} [charStyle.fontStyle] Font style (italic|normal)
   */
  _setTextStyles(ctx, charStyle, forMeasuring) {

After Annotating

  /**
   * Set the font parameter of the context with the object properties or with charStyle
   * @private
   * @param {CanvasRenderingContext2D} ctx Context to render on
   * @param {Object} [charStyle] object with font style properties
   * @param {String} [charStyle.fontFamily] Font Family
   * @param {Number} [charStyle.fontSize] Font size in pixels. ( without px suffix )
   * @param {String} [charStyle.fontWeight] Font weight
   * @param {String} [charStyle.fontStyle] Font style (italic|normal)
   */
  _setTextStyles(ctx: CanvasRenderingContext2D, charStyle: * @param {String}[charStyle.fontFamily]Font Family
    * @param {Number}[charStyle.fontSize]Font size in pixels.(without px suffix)
    * @param {String}[charStyle.fontWeight]Font weight
    * @param {String}[charStyle.fontStyle]Font style (italic|normal), forMeasuring) {

Expected

Should annotate the arg with an object populated with the keys described by JSDoc OR skip annotation

System Info

VS Code version: Code 1.72.2 (d045a5eda657f4d7b676dedbfa7aab8207f8a075, 2022-10-12T22:15:18.074Z)
OS version: Windows_NT x64 10.0.19043
Modes:
Sandboxed: No

System Info
Item Value
CPUs Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz (4 x 2712)
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) 7.87GB (2.63GB free)
Process Argv C:\Users\DELL\Desktop\DEV\fabric.js --crash-reporter-id ed04e42e-1d11-4683-872f-421f0db5bcc0
Screen Reader no
VM 0%
Extensions (32)
Extension Author (truncated) Version
vscode-zipfs arc 3.0.0
doxdocgen csc 1.4.0
vscode-eslint dba 2.2.6
prettier-vscode esb 9.9.0
vscode-pull-request-github Git 0.52.0
gitpod-desktop git 0.0.62
better-cpp-syntax jef 1.16.3
cmake-language-support-vscode jos 0.0.7
vscode-docker ms- 1.22.2
vscode-dotnet-runtime ms- 1.6.0
remote-containers ms- 0.255.4
remote-ssh ms- 0.90.1
remote-ssh-edit ms- 0.84.0
remote-wsl ms- 0.72.0
vscode-remote-extensionpack ms- 0.21.0
cmake-tools ms- 1.12.27
cpptools-extension-pack ms- 1.3.0
vsliveshare ms- 1.0.5750
vsliveshare-audio ms- 0.1.91
vscode-react-native msj 1.10.0
vetur oct 0.36.1
java red 1.12.0
code-spell-checker str 2.10.1
cmake twx 0.0.17
intellicode-api-usage-examples Vis 0.2.6
vscodeintellicode Vis 1.2.29
vscode-java-debug vsc 0.45.0
vscode-java-dependency vsc 0.21.1
vscode-java-pack vsc 0.25.4
vscode-java-test vsc 0.37.1
vscode-maven vsc 0.39.1
vscode-ruby win 0.28.0

(1 theme extensions excluded)

A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscorecescf:30445987
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593:30376534
pythonvs932:30410667
cppdebug:30492333
vsclangdc:30486549
c4g48928:30535728
dsvsc012cf:30540253
azure-dev_surveyonecf:30548226
pyindex848:30577860
nodejswelcome1:30587005
fc301958:30595537
2e4cg342:30596373

@ShaMan123 ShaMan123 changed the title ts(80004): Quick fix... > Annotate with type from JSDoc ts(80004): Quick fix... > Annotate with type from JSDoc :: object types Nov 1, 2022
@mjbvz mjbvz transferred this issue from microsoft/vscode Nov 1, 2022
@mjbvz mjbvz removed their assignment Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants