This project is read-only.

External Import statement can be used with predefined types but doesn't work as expected

Topics: Language Specification
Jul 15, 2013 at 11:10 AM
One can write this code.
declare module "a" { export class P {} }
import any = module("a");
But then it can be used in limited contexts:
var p = new any.P(); // OK
var p : any.P = null; // Error!
class Q extends any.P {} // Error!
Either it is must be prohibited or fixed.
Jul 15, 2013 at 3:02 PM
Since 'any' is a reserved type name, do you still see the same issue when you use a different name for the import?
Jul 15, 2013 at 3:49 PM
For instance, string, number, boolean.