Closed mitchcapper closed 7 years ago
I released the version 0.0.11
(current master
) to npm. It defines a types
entry in its package.json
so Typescript should detect the type definitions automatically. Could you check if it works?
I started to move away from typings in favor of @types
but I am not quite done.
neither using ts-node, VS 2017, nor tsc seem to be able to automatically pickup the bindings:
tsc -p .
2 import * as skypeHttp from "skype-http";
~~~~~~~~~~~~
test.ts(2,28): error TS7016: Could not find a declaration file for module 'skype-http'. 'C:/temp/skytest/node_modules/skype-http/dist/lib-es2015/lib/skype-http.js' implicitly has an 'any' type.
C:\temp\skytest>ts-node test.ts
npm\node_modules\ts-node\src\index.ts:312
throw new TSError(formatDiagnostics(diagnosticList, cwd, ts, lineOffset))
^
TSError: ⨯ Unable to compile TypeScript
test.ts (2,28): Could not find a declaration file for module 'skype-http'. 'C:/temp/skytest/node_modules/skype-http/dist/lib-es2015/lib/skype-http.js' implicitly has an 'any' type. (7016)
7016)
Granted those are with "noImplicitAny": true,
but generally if it can't get the type then you are not going to get the auto complete / typings / etc support (which VS confirms).
I just publshed the version 0.0.12
. It fixes an issue with the type declarations and removes the dependency on typings
(everything is installed from @types
). I was able to use this version in an other project without any issues. Could you check if this works now ?
working well:)
Would be great if you could update the node npm package and publish an @types/skype-http package as well.
I tried doing things like:
and then:
however ts-node doesn't support import so that fails (for the sub modules).
Could not get typings to install from repo using something like:
typings install --save github:ocilo/skype-http
These work:
but are out of date I would assume.