Skip to content

Commit ae18f42

Browse files
committed
solution 1 and 2
1 parent 022c356 commit ae18f42

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/01-number.problem.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { expect, it } from "vitest";
22

3-
export const addTwoNumbers = (a, b) => {
3+
export const addTwoNumbers = (a: number, b: number) => {
44
return a + b;
55
};
66

src/02-object-param.problem.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { expect, it } from "vitest";
22

3-
export const addTwoNumbers = (params) => {
3+
type NewType = { first: number; second: number}
4+
5+
export const addTwoNumbers = (params: NewType) => {
46
return params.first + params.second;
57
};
68

0 commit comments

Comments
 (0)