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 typing #418

Merged
merged 2 commits into from
Nov 11, 2021
Merged

Fix typing #418

merged 2 commits into from
Nov 11, 2021

Conversation

bartduisters
Copy link
Contributor

This fixes the error thrown when compiling the project:

node_modules/feathers-mongoose/types/index.d.ts:25:35 - error TS2344: Type 'T & Document<any, any, any>' does not satisfy the constraint 'Document<any, any, any>'.
  The types of 'replaceOne(...).$where(...).and' are incompatible between these types.
    Type '(array: FilterQuery<T & Document<any, any, any>>[]) => Query<(T & Document<any, any, any>)[], T & Document<any, any, any>, {}, T & Document<...>>' is not assignable to type '(array: FilterQuery<Document<any, any, any>>[]) => Query<Document<any, any, any>[], Document<any, any, any>, {}, Document<any, any, any>>'.
      Types of parameters 'array' and 'array' are incompatible.
        Type 'FilterQuery<Document<any, any, any>>[]' is not assignable to type 'FilterQuery<T & Document<any, any, any>>[]'.
          Type 'FilterQuery<Document<any, any, any>>' is not assignable to type 'FilterQuery<T & Document<any, any, any>>'.
            Type 'FilterQuery<Document<any, any, any>>' is not assignable to type '{ [P in keyof (T & Document<any, any, any>)]?: Condition<[Extract<(T & Document<any, any, any>)[P], ObjectId>] extends [never] ? (T & Document<any, any, any>)[P] : string | (T & Document<...>)[P]> | undefined; }'.

25   options: MongooseServiceOptions<T & Document>;

Summary

(If you have not already please refer to the contributing guideline as described
here
)

  • Tell us about the problem your pull request is solving.
  • Are there any open issues that are related to this?
  • Is this PR dependent on PRs in other repos?

If so, please mention them to keep the conversations linked together.

Other Information

If there's anything else that's important and relevant to your pull
request, mention that information here. This could include
benchmarks, or other information.

Your PR will be reviewed by a core team member and they will work with you to get your changes merged in a timely manner. If merged your PR will automatically be added to the changelog in the next release.

If your changes involve documentation updates please mention that and link the appropriate PR in feathers-docs.

Thanks for contributing to Feathers! ❤️

bartduisters and others added 2 commits November 11, 2021 20:03
This fixes the error thrown when compiling the project:
```sh
node_modules/feathers-mongoose/types/index.d.ts:25:35 - error TS2344: Type 'T & Document<any, any, any>' does not satisfy the constraint 'Document<any, any, any>'.
  The types of 'replaceOne(...).$where(...).and' are incompatible between these types.
    Type '(array: FilterQuery<T & Document<any, any, any>>[]) => Query<(T & Document<any, any, any>)[], T & Document<any, any, any>, {}, T & Document<...>>' is not assignable to type '(array: FilterQuery<Document<any, any, any>>[]) => Query<Document<any, any, any>[], Document<any, any, any>, {}, Document<any, any, any>>'.
      Types of parameters 'array' and 'array' are incompatible.
        Type 'FilterQuery<Document<any, any, any>>[]' is not assignable to type 'FilterQuery<T & Document<any, any, any>>[]'.
          Type 'FilterQuery<Document<any, any, any>>' is not assignable to type 'FilterQuery<T & Document<any, any, any>>'.
            Type 'FilterQuery<Document<any, any, any>>' is not assignable to type '{ [P in keyof (T & Document<any, any, any>)]?: Condition<[Extract<(T & Document<any, any, any>)[P], ObjectId>] extends [never] ? (T & Document<any, any, any>)[P] : string | (T & Document<...>)[P]> | undefined; }'.

25   options: MongooseServiceOptions<T & Document>;
```
@daffl daffl merged commit ff1dec9 into feathersjs-ecosystem:master Nov 11, 2021
@daffl
Copy link
Member

daffl commented Nov 11, 2021

Published in 8.4.2

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.

2 participants