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

Missing Typings for QueryInterface #11027

Closed
1 of 2 tasks
a88zach opened this issue Jun 3, 2019 · 3 comments
Closed
1 of 2 tasks

Missing Typings for QueryInterface #11027

a88zach opened this issue Jun 3, 2019 · 3 comments
Labels
type: typescript For issues and PRs. Things that involve typescript, such as typings and intellisense.

Comments

@a88zach
Copy link

a88zach commented Jun 3, 2019

Many of the QueryInterface methods accept string | { tableName: string, schema: string } as the first argument. For instance, the following is valid and will run successfully.

queryInterface.bulkDelete({ tableName: 'foo', schema: 'bar' } as any, {}, {});

However, the typings only support a string as the first argument.

To Reproduce
Create a migration with the above code using typescript

What do you expect to happen?

The code should compile without error

What is actually happening?

TSC will not compile without casting to any

Environment

TypeScript version: XXX
Tested with latest release: 3.4.5

  • No
  • Yes, specify that version:
@papb papb added the type: typescript For issues and PRs. Things that involve typescript, such as typings and intellisense. label Jul 22, 2019
@papb
Copy link
Member

papb commented Jul 22, 2019

Would you be willing to submit a PR?

@github-actions
Copy link
Contributor

github-actions bot commented Nov 9, 2021

This issue has been automatically marked as stale because it has been open for 14 days without activity. It will be closed if no further activity occurs within the next 14 days. If this is still an issue, just leave a comment or remove the "stale" label. 🙂

@github-actions github-actions bot added the stale label Nov 9, 2021
@WikiRik WikiRik removed the stale label Nov 15, 2021
@ephys
Copy link
Member

ephys commented Apr 16, 2022

I believe this has since been fixed, as these methods now accept TableName which is equal to

export type TableName = string | TableNameWithSchema;

@ephys ephys closed this as completed Apr 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: typescript For issues and PRs. Things that involve typescript, such as typings and intellisense.
Projects
None yet
Development

No branches or pull requests

4 participants