Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

'await-promise' rule is not compatible with AxiosPromise #3381

Closed
stackia opened this issue Oct 23, 2017 · 0 comments · Fixed by #3383
Closed

'await-promise' rule is not compatible with AxiosPromise #3381

stackia opened this issue Oct 23, 2017 · 0 comments · Fixed by #3383

Comments

@stackia
Copy link

stackia commented Oct 23, 2017

Bug Report

  • TSLint version: 5.8.0
  • TypeScript version: 2.5.3
  • Running TSLint via: angelozerr/tslint-language-service

TypeScript code being linted

const res = await axios.get(`/users`)

with tslint.json configuration:

// other rules...
"await-promise": true

Actual behavior

AxiosPromise is inherited from Promise, but tslint gives ERROR Invalid 'await' of a non-Promise value.

Expected behavior

Types inherited from Promise should be recognized as normal promise.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants