You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a file called app.js with the following content:
/// <reference path="./SomeAPI.d.ts"/>(function(SomeAPI){"use strict";varhello=function(){SomeAPI.sayHello(document.body);// Oops! No Intellisense!}document.addEventListener("DOMContentLoaded",hello);})(SomeAPI);// This one works
Mouse over the line where it says "SomeAPI.sayHello" (in app.js).
Observed Behaviour:
Visual Studio Code's Intellisense informs the user that SomeAPI is of the any type, as is it's child sayHello.
Expected Behaviour:
Visual Studio Code informs the user that SomeAPI is a namespace and that sayHello is a function that takes a string.
Why this bug is important to fix:
Immediately-Invoked Function Expressions were a common way of doing modules and scoping before ES6's (awesome) import statements. There is a lot of legacy code that still uses them.
The text was updated successfully, but these errors were encountered:
Steps to Reproduce:
files.zip
Observed Behaviour:
Visual Studio Code's Intellisense informs the user that SomeAPI is of the any type, as is it's child sayHello.
Expected Behaviour:
Visual Studio Code informs the user that SomeAPI is a namespace and that sayHello is a function that takes a string.
Why this bug is important to fix:
Immediately-Invoked Function Expressions were a common way of doing modules and scoping before ES6's (awesome) import statements. There is a lot of legacy code that still uses them.
The text was updated successfully, but these errors were encountered: