TypeStrong / atom-typescript

The only TypeScript package you will ever need
https://atom.io/packages/atom-typescript
MIT License
1.13k stars 205 forks source link

Atom-Typescript error: Cannot read property 'map' of undefined #1530

Closed RaphaelYan closed 4 years ago

RaphaelYan commented 4 years ago

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.42.0 x64 Electron: 4.2.7 OS: Mac OS X 10.14.4 Thrown From: atom-typescript package 13.4.4

Stack Trace

Atom-Typescript error: Cannot read property 'map' of undefined

At TypeError: Cannot read property 'map' of undefined

TypeError: Cannot read property 'map' of undefined
    at Object.renderTooltip (/packages/atom-typescript/dist/main/atom/tooltips/tooltipRenderer.js:9:28)
    at TooltipView.update (/packages/atom-typescript/dist/main/atom/tooltips/tooltipView.js:22:48)
    at TooltipController.showTooltip (/packages/atom-typescript/dist/main/atom/tooltips/controller.js:70:25)
    at TooltipController.initialize (/packages/atom-typescript/dist/main/atom/tooltips/controller.js:44:24)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Commands

     -0:26.6.0 typescript:hide-signature-help (input.hidden-input)
     -0:26.6.0 editor:consolidate-selections (input.hidden-input)
     -0:26.6.0 core:cancel (input.hidden-input)
     -0:23.6.0 core:move-up (input.hidden-input)
     -0:23.3.0 editor:newline (input.hidden-input)
     -0:23.2.0 snippets:next-tab-stop (input.hidden-input)
     -0:23.2.0 snippets:expand (input.hidden-input)
     -0:23.2.0 editor:indent (input.hidden-input)
     -0:22.9.0 core:paste (input.hidden-input)
     -0:21.9.0 core:copy (input.hidden-input)
  2x -0:21.7.0 core:paste (input.hidden-input)
     -0:19.2.0 core:copy (input.hidden-input)
     -0:18.5.0 core:paste (input.hidden-input)
     -0:13.6.0 core:cut (input.hidden-input)
     -0:12.7.0 core:copy (input.hidden-input)
     -0:09.6.0 core:save (input.hidden-input)

Non-Core Packages

atom-typescript 13.4.4 
editorconfig 2.5.0 
hyperclick 0.1.5 
intentions 1.1.5 
linter 2.3.1 
linter-ui-default 1.8.0 
php-twig 4.0.0 
pigments 0.40.2 
lierdakil commented 4 years ago

Hi! Thanks for reporting!

Apparently, TypeScript doesn't always provide information about jsdoc tags, even when the protocol typings say it does. One would think that using TS would allow us to avoid this type of errors, but evidently not. Anyway, should be fixed in v13.4.5.