1

I have this import:

import { post } from '@loopback/rest'

and this is how I use it:

export class MyClass {
  @post('/example/test', {})
}

But I'm getting a lint error: 'post' is defined but never used, how can I fix this without updating my codebase, is there a lint comment for this?

Kevin Bryan
  • 1,846
  • 2
  • 22
  • 45
  • check this: https://stackoverflow.com/questions/51145180/how-to-use-ts-ignore-for-a-block – Rafael Oct 25 '22 at 09:51
  • For those unaware (and unable to search for an "@" symbol... :/). What does the `@post(...)` line do? – Andreas Oct 25 '22 at 09:57

1 Answers1

0

This seems like an error of a typescript-eslint. According to this comment, try updating typescript-eslint to the latest version.

Dmitriy Zhiganov
  • 1,060
  • 1
  • 5
  • 14