TypeScript/tests/baselines/reference/exportAssignmentOfDeclaredExternalModule.errors.txt
2014-07-12 17:30:19 -07:00

19 lines
923 B
Plaintext

==== tests/cases/compiler/exportAssignmentOfDeclaredExternalModule_1.ts (2 errors) ====
///<reference path='exportAssignmentOfDeclaredExternalModule_0.ts'/>
import Sammy = require('exportAssignmentOfDeclaredExternalModule_0');
var x = new Sammy(); // error to use as constructor as there is not constructor symbol
~~~~~
!!! Cannot find name 'Sammy'.
var y = Sammy(); // error to use interface name as call target
~~~~~
!!! Cannot find name 'Sammy'.
var z: Sammy; // no error - z is of type interface Sammy from module 'M'
var a = new z(); // constructor - no error
var b = z(); // call signature - no error
==== tests/cases/compiler/exportAssignmentOfDeclaredExternalModule_0.ts (0 errors) ====
interface Sammy {
new (): any; // a constructor signature
(): number; // a 0 arg call signature
}
export = Sammy;