question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@casl/mongoose: TS2430: Interface 'AccessibleSchema' incorrectly extends interface 'Schema'.

See original GitHub issue

error

node_modules/@casl/mongoose/index.d.ts:21:18 - error TS2430: Interface 'AccessibleSchema' incorrectly extends interface 'Schema'.
  Types of property 'plugin' are incompatible.
    Type '(plugin: (schema: Schema) => void) => this' is not assignable to type '{ (plugin: (schema: Schema) => void): this; <T>(plugin: (schema: Schema, options: T) => void, opts: T): this; }'.
      Types of parameters 'plugin' and 'plugin' are incompatible.

21 export interface AccessibleSchema extends mongoose.Schema {

deps

    "@casl/mongoose": "^2.1.2",
    "typescript": "^3.0.1"

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
stalniycommented, Nov 7, 2018

I’ll publish a package today a bit later. PR is merged

1reaction
stalniycommented, Nov 2, 2018

I will try to solve the issue this weekend

Read more comments on GitHub >

github_iconTop Results From Across the Web

NestJS + CASL + Mongoose: CASL cannot infer subject type ...
My guess is that CASL cannot infer the subject type of my Mongoose model using the Cat class in InferSubject interface of the...
Read more >
CASL Mongoose
Suppose we have Post entity which can be described as: import mongoose from 'mongoose'; export interface Post extends mongoose.Document { ...
Read more >
@casl/mongoose - npm
Allows to query accessible records from MongoDB based on CASL rules. Latest version: 7.1.2, last published: 2 months ago.
Read more >
casl - @ casl / mongoose:TS2430:接口“ AccessibleSchema”错误 ...
node_modules/@casl/mongoose/index.d.ts:21:18 - error TS2430: Interface 'AccessibleSchema' incorrectly extends interface 'Schema'. Types of property 'plugin' ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found