Unresolved methods with TypeScript 2.0 & Vue 2.0

Hi!

I've just updated to IDEA 2016.2.4, and it started displaying errors on calls to inherited Vue methods:


Where Vue is defined (in the library) as:



I believe, there was no such errors in 2016.1.4.

Everything compiles right with webpack.

Any ideas what to do?

 

 

6 comments
Comment actions Permalink

Just checked with 2016.1.4 -- it's not related to the IDEA version after all;

it has probably started after I've reinstalled all node_modules (which are now flat)...

0
Comment actions Permalink

Ok, I've found a workaround. 

The problem is that "./vue" in

import * as V from "./vue";

resolved to node_modules/vue/types/(index.d.ts) -- while it should resolve to vue.d.ts

So replacing it with

import * as V from "./vue.d.ts";

makes it work as expected.

0
Comment actions Permalink

just checked - similar code works for me, Idea can resolve properties. may be specific to the way Vue is installed/configured. What should I do to install it? Also, what does your tsconfig.json look like?

0
Comment actions Permalink

Hi, Elena!

Here are the config files;

node v6.7.0
npm 3.10.3

Thanks!

0
Comment actions Permalink

thanks! Reproduced, logged as https://youtrack.jetbrains.com/issue/WEB-23742. Please follow it for updates

0
Comment actions Permalink

Ok, thanks for your help!

0

Please sign in to leave a comment.