mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
33 lines
598 B
TypeScript
33 lines
598 B
TypeScript
//// [tests/cases/compiler/funClodule.ts] ////
|
|
|
|
//// [funClodule.ts]
|
|
declare function foo();
|
|
declare namespace foo {
|
|
export function x(): any;
|
|
}
|
|
declare class foo { } // Should error
|
|
|
|
|
|
declare class foo2 { }
|
|
declare namespace foo2 {
|
|
export function x(): any;
|
|
}
|
|
declare function foo2(); // Should error
|
|
|
|
|
|
function foo3() { }
|
|
namespace foo3 {
|
|
export function x(): any { }
|
|
}
|
|
class foo3 { } // Should error
|
|
|
|
//// [funClodule.js]
|
|
"use strict";
|
|
function foo3() { }
|
|
(function (foo3) {
|
|
function x() { }
|
|
foo3.x = x;
|
|
})(foo3 || (foo3 = {}));
|
|
class foo3 {
|
|
} // Should error
|