Skip to content

TypeScript 3.0 language service isn't working properly in IE 11 (in Monaco Editor) #26090

Closed
@kpreisser

Description

@kpreisser

TypeScript Version: 3.0.1-insiders.20180726

Search Terms: IE11, language service, monaco editor

Code

Open the TypeScript Playground (Monaco Editor using the language service of current TypeScript version 3.0.1-insiders.20180726) in IE 11 (on Windows 10, 8.1 or 7) and enter the following code:

// In IE 11, this doesn't show an error:
let f = function () {
    let g = function() {
        Math.xxxxxxxyyyyzzzz(aaaaaa, bbbbbb, ccccc);
    };
};

// This correctly shows an error:
Math.xxxxxxxyyyyzzzz(aaaaaa, bbbbbb, ccccc);

Expected behavior:
The unknown properties and variables should be shown as error (which works in other browsers like Edge, Firefox, Chrome):
tsissue-edge

Actual behavior:
For the inner function, unknown properties/variables are not shown as error in IE 11:
tsissue-ie11

With the previous playground version (I think 2.9.x), this worked correctly. I don't know what could cause this behavior in IE 11, since the console also doesn't show any errors.

Additionally, if you enable noUnusedLocals in the Monaco Editor, the editor will sometimes show variables as unused even though they are used (I currently don't have a screenshot of that).

Unfortunately, for a software product at work we still need to use IE 11 (as WebBrowser control in a .NET app), so it would be nice if TypeScript with Monaco Editor would still work properly on IE 11.

Playground Link: http://www.typescriptlang.org/play/#src=%2F%2F%20In%20IE%2011%2C%20this%20doesn't%20show%20an%20error%3A%0D%0Alet%20f%20%3D%20function%20()%20%7B%0D%0A%20%20%20%20let%20g%20%3D%20function()%20%7B%0D%0A%20%20%20%20%20%20%20%20Math.xxxxxxxyyyyzzzz(aaaaaa%2C%20bbbbbb%2C%20ccccc)%3B%0D%0A%20%20%20%20%7D%3B%0D%0A%7D%3B%0D%0A%0D%0A%2F%2F%20This%20correctly%20shows%20an%20error%3A%0D%0AMath.xxxxxxxyyyyzzzz(aaaaaa%2C%20bbbbbb%2C%20ccccc)%3B%0D%0A%0D%0A

Thank you!

Metadata

Metadata

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions