Skip to content

noImplicitThis + noUnusedLocals = impossible to use together #9567

@pocesar

Description

@pocesar

TypeScript Version: nightly

Code

// A *self-contained* demonstration of the problem follows...
TestSchema
.static('pages', function(this: IModelTest, query: mongoose.Query<IModelTest>){
  return this.paginate(query);
});

Expected behavior:

noUnusedLocals should ignore this typing, when noImplicitThis is enabled

Actual behavior:

this: IModelTest is showing as an unused variable, making it impossible to use both options at the same time

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions