Skip to content

noUnusedLocals checks don't work with private modifier #15775

@falsandtru

Description

@falsandtru

TypeScript Version: master

Code

class C {
  constructor(private parent: void) {
    parent;
  }
}

Expected behavior:

pass

Actual behavior:

$ node built/local/tsc.js --noEmit --noUnusedLocals index.ts
index.ts(2,23): error TS6138: Property 'parent' is declared but never used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Working as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions