emeryao / typed-jweixin

TypeScript declaration file for Wexin JSSDK jweixin.d.ts
MIT License
15 stars 12 forks source link

In VScode, Wechat cannot intellisense #5

Closed linxiaowu66 closed 7 years ago

linxiaowu66 commented 7 years ago

Hi, I am a newer for vscode, and I download your jweixin.d.ts file. vscode can recognise the Wechat namespace, but when I enter ., vscode dont promt anything, I checkout your code, there is no any export keyword.

Is there anything I am wrong?

emeryao commented 7 years ago

Hi @linxiaowu66 thanks for using my work and your issue 😄

the jweixin.d.ts file is a TypeScript declaration file , so there is no need to have any export and you should use TypeScript (.ts file) instead of javascript (.js file) and please take a look at my sample code here

linxiaowu66 commented 7 years ago

Hi, I use the .ts file and for example:

    import wx from 'weixin-js-sdk'
    wx.****

I check this problem maybe caused by the import wx from 'weixin-js-sdk', as I comment this line, the wx will prompt all functions belong to wx.

In this case, how can i solve it ? thanks a lot.

emeryao commented 7 years ago

I think that's the issue of the package weixin-js-sdk may be there is a conflict with the namespace wx