Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add typings #5

Open
atrakeur opened this issue May 6, 2016 · 5 comments
Open

Add typings #5

atrakeur opened this issue May 6, 2016 · 5 comments

Comments

@atrakeur
Copy link

atrakeur commented May 6, 2016

Typing is the new definition manager for typescript.
Basicaly it aims to replace the old tsd tool.

What about adding typings registration with tsd ones?

More info:

@asvetliakov
Copy link
Owner

Thanks for letting me know, basically i'm using typings in my other work projects. Regarding huject, i'll probably provide definition to work with just TS module resolve system (i.e without typings and tsd)

@atrakeur
Copy link
Author

atrakeur commented May 6, 2016

And if I provide it myself, will you accept the PR?

Thé current project I'm on is using typings and I plan to integrate your
injector in it.

Le ven. 6 mai 2016 16:31, Alexey Svetliakov [email protected] a
écrit :

Thanks for letting me know, basically i'm using typings in my other work
projects. Regarding huject, i'll probably provide definition to work with
just TS module resolve system (i.e without typings and tsd)


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#5 (comment)

@asvetliakov
Copy link
Owner

Yes, the fix should be:

  1. Remove ambient declarations
  2. Add "typings" to package.json to allow to work with TS module resolver
  3. Optionally add typings.json

2 & 3 could be done easily by just renaming huject.d.ts to index.d.ts, the lib has no runtime dependencies, so with index.d.ts typings and TS resolver will work fine even without typings.json.

Also optionally you might replace tsd in project to use typings instead too

@pyrossh
Copy link

pyrossh commented Oct 4, 2016

I think since typescript version 2.0 you can have the typings inbuilt in the package so we won't need typings.

@codeandcats
Copy link
Contributor

Consumer shouldn't be using tsd, typings or /// <reference path="node_modules/huject/huject.d.ts" /> to get typings.

Instead, the package.json should simply specify the path to the (already included) typings so all a consumer needs to do is import {Container} from 'huject' and have immediate access to the typings. Many libraries do this now.

See the offical TypeScript docs on publishing for more info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants