typed-typings / rethinkdbdash

Types for https://github.com/neumino/rethinkdbdash

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can this depends on @types?

unional opened this issue · comments

For the two deps: bluebird and rethinkdb, and node. in package.json

@blakeembrey @marshall007

@unional are you saying I should have these as dependencies in the package.json instead of as typings dependencies?

I had based this on types/npm-rethinkdb/typings.json and was just following it by example.

Yes, and keeping the typings.json will work for the registry.
Putting them in package.json allows user to install this typing by npm install types/rethinkdbdash (notice the missing "@" symbol, it is pulling from github directly).

But the dependencies still need to be clarified.

I have turned on Travis already. When there is a new commit, then the travis should start working.

@unional I just tried to add these as npm dependencies. There are a couple issues:

  • types/npm-bluebird has no name in package.json and can't be installed
  • types/env-node does not have @types/node as it's name, so I don't think that will work
  • none of my dependencies have their typings dependencies in the package.json, so I don't think installing mine via npm will work anyway

sorry, I meant using the @types version of those typings. If they don't work as nice (and for a reason), then we need to propagate down to types/npm-bluebird and types/env-node

@unional ah, gotcha. Those two should be fine, but relying on @types/rethinkdb would be problematic. What should we do about that one?

It's perfectly correct 👍 The thing we're considering is that, with NPM @types, we want to go for a kind of pseudo approach for a bit enabling both typings.json and package.json installs from GitHub. @unional, can you make a PR with the changes you'd like to see?

@blakeembrey yea I get what we're trying to do; and that should be fine for bluebird and node, but because of the way I rely on declaration merging for the rethinkdb module, it wouldn't really produce a useful definition if we relied on @types/rethinkdb.

Is there a solution to this? Could we just use a GitHub dependency for types/npm-rethinkdb? I myself would prefer to reference these definitions using NPM, so I hope we can figure something out.

Could we just use a GitHub dependency for types/npm-rethinkdb?

Absolutely, this is the end goal - allowing people to use from GitHub until microsoft/types-publisher#4 is done. All that's needed to support this should be in https://github.com/types/_guidelines (just add version and name to package.json).

@Blakeembery sorry, too busy at work. Didn't get a chance to get to this.

.... Embrey! XD

@unional @blakeembrey I have a PR up for this (#2), could one of you have a look?

I'm getting a failure on TS v1.8, typings bundle -o bundle.d.ts blows up with ts.getCombinedModifierFlags is not a function, not sure what the expected result is there. If you guys could document anything else that needs to be done, I'll update that PR tonight.