You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Both shouldjs and chai add a .should to Object and a project where dependencies use each produces compilation problem verbatim as follows:
> tsc -d
node_modules/should/should.d.ts:237:5 - error TS2717: Subsequent property declarations must have the same type. Property 'should' must be of type 'Assertion', but here has type 'Assertion'.
237 should: should.Assertion;
~~~~~~
node_modules/@types/chai/index.d.ts:1975:5
1975 should: Chai.Assertion;
~~~~~~
'should' was also declared here.
Found 1 error.
Shouldjs has not been updated in 3 years and is abandoned at this point. I can rewrite current should assertions to use chai (will look basically the same as current just change the import statement) or assert - which is used in some of the tests; if this PR would be welcome and considered for a merge. Please let me know.
Other stuff
Everything is up to date.
The text was updated successfully, but these errors were encountered:
This issue seems to stem from a limitation of the Typescript types for either should.js or chai (or both). oas-kit only uses should/as-function which does not mutate the Object prototype.
I would be happy to migrate to chai or another maintained assertion library if:
size of transitive dependencies is roughly similar
all of oas-validator could be migrated, not just the tests.
A PR would be welcome, but please hold fire for now, as I have a few WIP branches to merge. I will update this issue when that block is removed.
Detailed Description
Both shouldjs and chai add a
.should
toObject
and a project where dependencies use each produces compilation problem verbatim as follows:Shouldjs has not been updated in 3 years and is abandoned at this point. I can rewrite current should assertions to use chai (will look basically the same as current just change the import statement) or assert - which is used in some of the tests; if this PR would be welcome and considered for a merge. Please let me know.
Other stuff
Everything is up to date.
The text was updated successfully, but these errors were encountered: