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

@types/mongodb wrong types for types with { [K: string]: any } #38786

Closed
1 task done
HosseinAgha opened this issue Oct 1, 2019 · 1 comment
Closed
1 task done

@types/mongodb wrong types for types with { [K: string]: any } #38786

HosseinAgha opened this issue Oct 1, 2019 · 1 comment

Comments

@HosseinAgha
Copy link
Contributor

HosseinAgha commented Oct 1, 2019

  • Mention the authors (see Definitions by: in index.d.ts) so they can respond.

Looks like TypeScript has a bug with the usage of Omit (Exclude to be precise) and types that contain { [K: string]: any }. For example we return a wrong type for the following:

interface BooksModel {
  _id: ObjectId,
  title: string,
  [K: string]: any
}

Take a look at following for more info:
microsoft/TypeScript#31153
microsoft/TypeScript#25987

@orta
Copy link
Collaborator

orta commented Jun 7, 2021

Hi thread, we're moving DefinitelyTyped to use GitHub Discussions for conversations the @types modules in DefinitelyTyped.

To help with the transition, we're closing all issues which haven't had activity in the last 6 months, which includes this issue. If you think closing this issue is a mistake, please pop into the TypeScript Community Discord and mention the issue in the definitely-typed channel.

@orta orta closed this as completed Jun 7, 2021
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

No branches or pull requests

2 participants