typescript.api
typescript.api copied to clipboard
using imports in a file prevents references being able to find any type info
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.