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

Fix Typescript Mismatch with @types/jasmine #93

Closed
wants to merge 1 commit into from

Conversation

matheo
Copy link
Contributor

@matheo matheo commented 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 #62

My package.json looks like:

    "devDependencies": {
        "@types/jasmine": "^2.7.3",
        "@types/lodash": "^4.14.88",
        "@types/moment-timezone": "^0.2.35",
        "@types/node": "^8.0.57",
        "jasmine": "^2.8.0",
        "jasmine-expect": "^3.8.1",
        "tslint": "~5.7.0",
        "typescript": "~2.4.2"
    },

and the tsconfig.json:

{
    "compilerOptions": {
        "target": "es5",
        "module": "commonjs",
        "alwaysStrict": true,
        "noImplicitReturns": true,
        "noImplicitThis": true,
        "noUnusedParameters": true,
        "noUnusedLocals": true,
        "noEmitOnError": true,
        "noImplicitAny": true,
        "preserveConstEnums": true,
        "experimentalDecorators": false,
        "sourceMap": false,
        "inlineSourceMap": true,
        "declaration": true,
        "strict": true,
        "strictNullChecks": true,
        "lib": [
            "es5",
            "es2015",
            "dom"
        ],
        "types": [
            "node",
            "jasmine",
            "jasmine-expect"
        ],
        "rootDir": "./",
        "sourceRoot": "./",
        "outDir": "./dist/"
    },
    "exclude": [
        "dist",
        "node_modules"
    ]
}

Probably a minor release will be needed to not cause a breaking change to the projects using 3.8.* without problems.

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
@matheo matheo changed the title Fix Typescript Mismatch Fix Typescript Mismatch with @types/jasmine Jan 7, 2018
@JamieMason
Copy link
Owner

Thanks so much for this, I will take a look as soon as I can. there is also #92 from @shaungrady which I need to get to as well, sorry for the wait.

As mentioned over there too, please see https://github.com/JamieMason/expect-more/tree/master/packages/expect-more-jest which is a TypeScript rewrite of Jasmine-Matchers.

@matheo
Copy link
Contributor Author

matheo commented Jan 8, 2018

@JamieMason Great to read that!
I will be using my fork while the new version is released. Thanks for your time!

@JamieMason
Copy link
Owner

Released in 3.8.3 add credit added to contributors in package.json, thanks a lot for helping out!

@JamieMason JamieMason closed this 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.

2 participants