TypeScript/tests/baselines/reference/funClodule.types
Nathan Shively-Sanders de4a69cb72
In source files and blocks, bind function declarations before other statements (#22766)
* Add test case and temporarily disable inference

(Inference of class members from this-assignments inside a
prototype-assigned function.)

* Update baselines

* In blocks and source files, bind functions first

* Add tests from other bugs

* Remove temporary failsafe

* Update tests to restore intent and clean up errors

* Restore intent even better

* Restore intent even better x2

* Add missed baselines
2018-03-21 14:22:09 -07:00

40 lines
625 B
Plaintext

=== tests/cases/compiler/funClodule.ts ===
declare function foo();
>foo : typeof foo
declare module foo {
>foo : typeof foo
export function x(): any;
>x : () => any
}
declare class foo { } // Should error
>foo : foo
declare class foo2 { }
>foo2 : foo2
declare module foo2 {
>foo2 : typeof foo2
export function x(): any;
>x : () => any
}
declare function foo2(); // Should error
>foo2 : typeof foo2
function foo3() { }
>foo3 : typeof foo3
module foo3 {
>foo3 : typeof foo3
export function x(): any { }
>x : () => any
}
class foo3 { } // Should error
>foo3 : foo3