microsoft / TypeScript

TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
https://www.typescriptlang.org
Apache License 2.0
101.31k stars 12.53k forks source link

Arobases in an example section of a jsdoc is considered a jsdoc section #31599

Open khalyomede opened 5 years ago

khalyomede commented 5 years ago

Issue Type: Bug

  1. Create a foo.ts file
  2. Add the following code into it:
class Foo {
  protected baz: boolean;

  public constructor() {
    this.baz = true;
  }

  /**
    * Set baz to false.
    * @return {Foo}
    * @example
    * import { Foo } from "@khalyomede/foo";
    * 
    * const foo = new Foo();
    *
    * foo.bar();
    * @since 0.1.0
    */
  public bar(): this {
    this.baz = false;

    return this;
  }
}

export default Foo;
  1. Pass your mouse over the bar method: you should see that @khalyomede is considered a jsdoc section

I made a screenshot of the issue: https://i.ibb.co/dkKbMqV/vscode-arobases-in-comment-issue.png

VS Code version: Code 1.34.0 (a622c65b2c713c890fcf4fbf07cf34049d5fe758, 2019-05-15T21:59:37.030Z) OS version: Windows_NT x64 10.0.17763

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 x 2808)| |GPU Status|2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled| |Load (avg)|undefined| |Memory (System)|15.89GB (8.84GB free)| |Process Argv|| |Screen Reader|no| |VM|0%|
Extensions (14) Extension|Author (truncated)|Version ---|---|--- vscode-new-file|dku|4.0.2 apacheconf-snippets|eim|1.2.0 vsc-material-theme|Equ|2.8.2 vsc-material-theme-icons|equ|0.12.0 prettier-vscode|esb|1.9.0 php-intellisense|fel|2.3.10 sftp|lix|1.12.7 php-namespace-resolver|Meh|1.1.8 vetur|oct|0.21.0 laravel5-snippets|one|1.5.0 sass-indented|rob|1.5.1 stylelint|shi|0.49.0 open-in-browser|tec|2.0.0 lorem-ipsum|Tyr|1.2.0
mjbvz commented 5 years ago

Confirmed with TypeScript 3.5.0-dev.20190525