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 TypeScript declarations for typing #62

Closed
wants to merge 1 commit into from

Conversation

aaronbroad
Copy link

@aaronbroad aaronbroad commented Sep 29, 2016

to resolve #59

@ikasparov
Copy link

👍 thanks man

@JamieMason
Copy link
Owner

Thanks a lot @aaronbroad, just an update as it's been a while. I started a branch locally to switch this project over to TypeScript and have been referencing this PR while doing it. 1. It means the generated declarations file should always be up to date and 2. personally, it's a good way for me to try out and learn TS.

I've not had time since then to work on any of my open source projects but this is high up the list when I do get time again.

Thanks.

@JamieMason
Copy link
Owner

Hey,
I've pushed https://github.com/JamieMason/Jasmine-Matchers/tree/pull-request/62-typings with your changes and some of the newer matchers added on top.

One thing I'm wondering is, should jasmine-matchers.d.ts reference jasmine's typings in some way? Like Definitely Typed does at DefinitelyTyped/jasmine-expect/jasmine-expect.d.ts#L6. Does TypeScript need to be told somehow that this library is extending jasmine and not creating something separate which uses the same namespaces?

@aaronbroad
Copy link
Author

I don't think you need to reference jasmine's typings. If you want, we could include jasmine's types in the package.json file (I don't believe jasmine includes typing definitions in its npm package yet.)

"devDependencies":
   ...
    "@types/jasmine": "2.4.1"

@JamieMason
Copy link
Owner

For people checking in here, I can't move this forward as I don't know TypeScript well enough to understand the typings files and how they relate to upstream projects like jasmine.

I'm open to converting this codebase to TypeScript, but there are other things higher up my to-learn list unfortunately – so this step may take a little time unless someone is willing to contribute and help in a hand-over.

Thanks all.

@JoshuaKGoldberg
Copy link

@JamieMason but can you merge pull requests for TypeScript typings so we're unblocked?

@JamieMason
Copy link
Owner

sure, give me 10-15 mins

@JamieMason
Copy link
Owner

This has been merged as 105bcc3. I've a better grasp of TypeScript now so will be able to maintain this from here.

Thanks a lot, and sorry for such a long wait.

@JamieMason JamieMason closed this Oct 30, 2017
matheo added a commit to matheo/Jasmine-Matchers that referenced this pull request Jan 7, 2018
Currently, there's a mismatch with `@types/jasmine` that throws the following error:
```
node_modules/@types/jasmine/index.d.ts(404,15): error TS2428: All declarations of 'Matchers' must have identical type parameters.
node_modules/jasmine-expect/jasmine-matchers.d.ts(2,13): error TS2428: All declarations of 'Matchers' must have identical type parameters.
```
this adjustment fix the Typescript definitions of the project. Refs JamieMason#62
JamieMason pushed a commit that referenced this pull request Jan 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding this library to an Angular 2 project using Jasmine
4 participants