We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 80973af commit 1bb52f1Copy full SHA for 1bb52f1
src/app.ts
@@ -21,13 +21,20 @@ type Numeric = number | boolean;
21
22
type Universal = Combinable & Numeric;
23
24
+function add(a: number, b: number): number;
25
+function add(a: string, b: string): string;
26
+function add(a: number, b: string): string;
27
+function add(a: string, b: number): string;
28
function add(a: Combinable, b: Combinable) {
29
if (typeof a === "string" || typeof b === "string") {
30
return a.toString() + b.toString();
31
}
32
return a + b;
33
34
35
+const result = add("Dan", "the Man");
36
+result.split(" ");
37
+
38
type UnkownEmployee = Employee | Admin;
39
40
function printEmployeeInformation(emp: UnkownEmployee) {
0 commit comments