TS6196

error TS6196: ‘MyAbstractClass‘ is declared but never used.

Broken Code ❌

1
2
3
abstract class MyAbstractClass {
abstract getResult(): boolean;
}

Fixed Code ✔️

You have three possibilities to fix the broken code:

  1. Make use of MyAbstractClass in your application
  2. Export MyAbstractClass
  3. Set “noUnusedLocals” to false in your “tsconfig.json”
1
2
3
export abstract class MyAbstractClass {
abstract getResult(): boolean;
}