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
It turns out that none of those modules are recognized by other ts files in the same folder. Now, if I rename editors.d.ts to anything else, problem solved!
Issue was seen in Visual Studio 2015.
The text was updated successfully, but these errors were encountered:
For module resolution purposes, if the compiler sees something like import {a} from "moduleA"; it tries to locate moduleA first. it will look for files with that name, .ts is given higher precedence than .d.ts as a .d.ts is a compiler output, where .ts is a source, so sources are more likely to be up-to-date than outputs. you can find more information at https://github.com./Microsoft/TypeScript-Handbook/blob/master/pages/Module%20Resolution.md
in this case, it seems like you authored editors.d.ts yourself, but the compiler has no way of knowing that. In general, it is not a good practice to have two files with the same name, only different extensions next to each others. the compiler makes multiple assumptions based on file extensions, and location.
My earlier comments were about modules, but it looks like this file, editors.d.ts, has global definitions. so all you need is to add a /// <reference path=".\editors.d.ts" /> to your editor.ts to include it.
TypeScript Version:
1.8.6
Folder is called Editors and contains several files including: editors.ts and editors.d.ts
editors.d.ts looks like this:
declare module "text!./editors.template.html" { }
declare module "text!./condition.template.html" { }
It turns out that none of those modules are recognized by other ts files in the same folder. Now, if I rename editors.d.ts to anything else, problem solved!
Issue was seen in Visual Studio 2015.
The text was updated successfully, but these errors were encountered: