<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨 Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section! Please help us by doing the following steps before logging an issue: * Search: https://github.com/Microsoft/TypeScript/search?type=Issues * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ Please fill in the *entire* template below. --> <!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. --> **TypeScript Version:** 30c4149 <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** jsdoc `@constructor` `this` **Code** ```javascript /** @constructor */ function Example() { this.m = 1; } /** @constructor */ var Example2 = function() { this.j = 2; }; ``` Compiled with `--allowJs --checkJs --noImplicitThis` **Expected behavior:** Compiles fine. **Actual behavior:** ``` error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation. ``` **Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior --> https://www.typescriptlang.org/play/#src=%2F**%20%40constructor%20*%2F%20function%20Example()%20%7B%20this.m%20%3D%201%3B%20%7D%0D%0A%2F**%20%40constructor%20*%2F%20var%20Example2%20%3D%20function()%20%7B%20this.j%20%3D%202%3B%20%7D%3B%0D%0A
TypeScript Version: 30c4149
Search Terms:
jsdoc
@constructorthisCode
Compiled with
--allowJs --checkJs --noImplicitThisExpected behavior:
Compiles fine.
Actual behavior:
Playground Link:
https://www.typescriptlang.org/play/#src=%2F**%20%40constructor%20*%2F%20function%20Example()%20%7B%20this.m%20%3D%201%3B%20%7D%0D%0A%2F**%20%40constructor%20*%2F%20var%20Example2%20%3D%20function()%20%7B%20this.j%20%3D%202%3B%20%7D%3B%0D%0A