typescript.api icon indicating copy to clipboard operation
typescript.api copied to clipboard

using imports in a file prevents references being able to find any type info

Open vjpr opened this issue 12 years ago • 0 comments

a.ts

/// <reference path="./d.ts/DefinitelyTyped/underscore/underscore.d.ts" />
import _ = require('underscore')

class Mapper {}

b.ts

/// <reference path="./a.ts" />

var a: Mapper;
> error TS2095: Could not find symbol 'Mapper'.

Removing the import and everything works as expected.

Changing the import to var _ = require('underscore') works too but without type-checking.

vjpr avatar Oct 02 '13 05:10 vjpr