Closed staxmanade closed 9 years ago
@rigdern Are you familiar with the winjs-control-apis tool?
I found a (maybe not the) winjs.d.ts
required file, but tried running this
node ./main.js ../winjs/tests/TestLib/winjs.dev.d.ts
and got this error
Error: Unexpected type: null (line null)
at new TypeError (/.../winjs/winjs-control-apis/tscore.js:14:9)
The winjs.d.ts
file is located at: https://github.com/winjs/winjs/blob/master/typings/winjs/winjs.d.ts
If you want it for a different version of WinJS, checkout the version of WinJS you want and the winjs.d.ts
file will be located in the same spot (typings/winjs/winjs.d.ts
).
@staxmanade The file you used is winjs.dev.d.ts
which is different. This contains the API surface for private parts of WinJS that are used in our unit tests.
Out of curiosity, what's your interest in using the winjs-control-apis
tool? We typically use it when we're ready to make react-winjs
compatible with the latest version of WinJS (more info on our wiki).
@rigdern I'd prefer not to dig this deep into the libraries (yet), but in issue #28 @jdalton thought a PR could help move it along.
I see. Here's what you need:
winjs.dev.dts
One option for you is to locally copy the MediaPlayer and ScrollViewer type definitions into the winjs.d.ts
file and then run that thru winjs-control-apis
.
One thing to watch out for is that winjs-control-apis
ignores the MediaPlayer for historical reasons. You'll have to remove these lines so winjs-control-apis
will output the API surface for MediaPlayer.
In the future, I think the ideal setup would be:
tv.d.ts
mediaplayer.d.ts
Extend winjs-control-apis
to accept multiple d.ts
files. Then the workflow would be to run winjs-control-apis
like this:
node ./main.js winjs.d.ts mediaplayer.d.ts tv.d.ts
Thanks for the great detail @rigdern. If I get some time, I'll see where I get.
Closing this for now (as the original question about .d.ts
was answered)
Hey @jdalton,
Ok silly question - especially since my username is behind all of the
.d.ts
nuget packages under*.Typings.DefinitelyTyped
, but how can I get a specific version of thewinjs.d.ts
to run it through the winjs-control-apis tool?