clutz icon indicating copy to clipboard operation
clutz copied to clipboard

Can't use type previously imported type from TS in newly converted TS file

Open mtaran-google opened this issue 8 years ago • 0 comments

Repro:

  1. Have file a.js, b.js. b imports a
  2. Convert a into TS. The import in b will be changed to something like const aModule = goog.require('...'); const {a} = aModule;
  3. Convert b into TS.

Expected: The import of a will be changed to import {a} from '...';

Actual: The import of a will be changed to something like import * as aModule from '...'; const {a} = aModule;. When you try using a in type position, TS compiler complains that it can't find the name.

mtaran-google avatar Jul 20 '17 22:07 mtaran-google