Skip to content

Autoimport not working correctly after yield keyword #36933

@SantoJambit

Description

@SantoJambit

TypeScript Version: 3.9.0-dev.20200220

Search Terms:
yield in combination with looking for import in the title.

Code

import { call } from 'redux-saga/effects';

export function* test() {
  select(); // works
  const token = yield select(() => 0); // doesn't work
  yield call((a: string) => a, "");
}

Expected behavior:

Auto import should work

Actual behavior:

Auto import only works when no yield is in front of the statement.

Playground Link: https://codesandbox.io/s/affectionate-khorana-t6e9h
GitHub Repo: https://github.com/SantoJambit/yield-autoimport-issue

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions