Typescript: Local JavaScript objects are not recognized

Created on 21 Apr 2019  路  4Comments  路  Source: microsoft/TypeScript


Steps to Reproduce:

  1. Create a javascript file "selection.js" with the following content:
(function() {
  SelectionUtils.insertBBcode = (tagOpen, tagClose, textarea) => {

  }
  SelectionUtils.format = (name, parameters) => {

  }
}).call(SelectionUtils = {})
  1. Create a javascript file "another.js" in the same folder

  2. Open the folder in VScode

  3. Open "another.js" and type in SelectionUtils

  4. Our SelectionUtils object is not recognized


Does this issue occur when all extensions are disabled?: Yes

Won't Fix

All 4 comments

This example code is very dynamic and supporting proper intellisense for it is likely out of scope. Modern constructs like class are generally much better supported for our IntelliSense

This is much too complex for our current logic, and doesn't seem like a common enough pattern

The TypeScript project powers VS Code's javascript intellisense.

We reviewed at your issue and determined that fixing it would not worth the significant engineering cost

This is simply creating an object and binding the scope to it how is this complex compared to your so-called TypeScript? And I will say it again: This has nothing to do with TypeScript.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

metaweta picture metaweta  路  140Comments

quantuminformation picture quantuminformation  路  273Comments

tenry92 picture tenry92  路  146Comments

xealot picture xealot  路  150Comments

kimamula picture kimamula  路  147Comments