2016-03-10 19:11:48 +01:00
|
|
|
// @module: commonjs
|
|
|
|
// @noImplicitReferences: true
|
|
|
|
|
|
|
|
// @filename: foo.d.ts
|
|
|
|
declare class Thing {
|
|
|
|
foo(): number;
|
|
|
|
}
|
2016-09-15 00:52:54 +02:00
|
|
|
declare namespace Thing {
|
|
|
|
interface SubThing { }
|
|
|
|
}
|
2016-03-10 19:11:48 +01:00
|
|
|
export = Thing;
|
|
|
|
export as namespace Foo;
|
|
|
|
|
|
|
|
// @filename: a.ts
|
|
|
|
/// <reference path="foo.d.ts" />
|
2016-09-15 00:52:54 +02:00
|
|
|
import * as ff from './foo';
|
2016-03-10 19:11:48 +01:00
|
|
|
|
2016-09-15 00:52:54 +02:00
|
|
|
let y: Foo; // OK in type position
|
|
|
|
y.foo();
|
|
|
|
let z: Foo.SubThing; // OK in ns position
|
|
|
|
let x: any = Foo; // Not OK in value position
|