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

[TypeScript ]Add missing types for havingNull and havingNotNull #5529

Merged
merged 3 commits into from Mar 29, 2023

Conversation

ducher
Copy link
Contributor

@ducher ducher commented Mar 28, 2023

The documentation has the havingNull and havingNotNull methods but they are missing from the TS definition so I added them along with a simple type test.

Tell me if my PR is missing anything

Copy link
Collaborator

@OlivierCavadenti OlivierCavadenti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks !

@coveralls
Copy link

coveralls commented Mar 28, 2023

Coverage Status

Coverage: 92.392%. Remained the same when pulling 313ec19 on ducher:fix/havingNull-typings into 42b9198 on knex:master.

@ducher
Copy link
Contributor Author

ducher commented Mar 29, 2023

The CI is throwing this error, any idea what can cause this ? I don't see any JSDoc tag in my changes

The 'no-redundant-jsdoc' rule threw an error in '/home/runner/work/knex/knex/types/index.d.ts':
Error: Unexpected tag kind: JSDocDeprecatedTag
    at checkTag (/home/runner/work/knex/knex/node_modules/tslint/lib/rules/noRedundantJsdocRule.js:105:23)
    at cb (/home/runner/work/knex/knex/node_modules/tslint/lib/rules/noRedundantJsdocRule.js:62:25)
    at visitNodes (/home/runner/work/knex/knex/node_modules/typescript/lib/typescript.js:31095:30)
    at Object.forEachChild (/home/runner/work/knex/knex/node_modules/typescript/lib/typescript.js:31502:21)
    at cb (/home/runner/work/knex/knex/node_modules/tslint/lib/rules/noRedundantJsdocRule.js:67:19)
    at visitNodes (/home/runner/work/knex/knex/node_modules/typescript/lib/typescript.js:31095:30)
    at Object.forEachChild (/home/runner/work/knex/knex/node_modules/typescript/lib/typescript.js:31421:24)
    at cb (/home/runner/work/knex/knex/node_modules/tslint/lib/rules/noRedundantJsdocRule.js:67:19)
    at visitNode (/home/runner/work/knex/knex/node_modules/typescript/lib/typescript.js:31086:24)
    at Object.forEachChild (/home/runner/work/knex/knex/node_modules/typescript/lib/typescript.js:31521:21)

Only way to make it work for me is to remove all the comments with @deprecated in the index.d.ts file but they were already there, did the tslint rules change recently ?

EDIT: Sorry I just saw that I wrote the tests in the wrong file!

@OlivierCavadenti OlivierCavadenti merged commit 7dd5682 into knex:master Mar 29, 2023
52 checks passed
@ducher ducher deleted the fix/havingNull-typings branch March 29, 2023 14:51
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

Successfully merging this pull request may close these issues.

None yet

3 participants