mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
53 lines
964 B
TypeScript
53 lines
964 B
TypeScript
//// [tests/cases/conformance/functions/functionNameConflicts.ts] ////
|
|
|
|
//// [functionNameConflicts.ts]
|
|
//Function and variable of the same name in same declaration space
|
|
//Function overload with different name from implementation signature
|
|
|
|
namespace M {
|
|
function fn1() { }
|
|
var fn1;
|
|
|
|
var fn2;
|
|
function fn2() { }
|
|
}
|
|
|
|
function fn3() { }
|
|
var fn3;
|
|
|
|
function func() {
|
|
var fn4;
|
|
function fn4() { }
|
|
|
|
function fn5() { }
|
|
var fn5;
|
|
}
|
|
|
|
function over();
|
|
function overrr() {
|
|
|
|
}
|
|
|
|
|
|
//// [functionNameConflicts.js]
|
|
"use strict";
|
|
//Function and variable of the same name in same declaration space
|
|
//Function overload with different name from implementation signature
|
|
var M;
|
|
(function (M) {
|
|
function fn1() { }
|
|
var fn1;
|
|
var fn2;
|
|
function fn2() { }
|
|
})(M || (M = {}));
|
|
function fn3() { }
|
|
var fn3;
|
|
function func() {
|
|
var fn4;
|
|
function fn4() { }
|
|
function fn5() { }
|
|
var fn5;
|
|
}
|
|
function overrr() {
|
|
}
|