mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
14 lines
309 B
TypeScript
14 lines
309 B
TypeScript
//// [tests/cases/compiler/functionOverloads.ts] ////
|
|
|
|
//// [functionOverloads.ts]
|
|
function foo(): string;
|
|
function foo(bar: string): number;
|
|
function foo(bar?: string): any { return "" };
|
|
var x = foo(5);
|
|
|
|
//// [functionOverloads.js]
|
|
"use strict";
|
|
function foo(bar) { return ""; }
|
|
;
|
|
var x = foo(5);
|