Skip to content

Commit 9a42855

Browse files
committed
(feat:TS) add string type to toggleSign()
1 parent 75fa997 commit 9a42855

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ function deleteEverythingFromScreen(button: string) {
176176
// The shift() method of Array instances removes the first element from an array and returns
177177
// that removed element. This method changes the length of the array.
178178

179-
minus.addEventListener("click", toggleSign);
179+
minus.addEventListener("click", () => toggleSign("minus"));
180180

181181
// function toggleSign(button) {
182182
// let value = Number(data.join(""))
@@ -196,7 +196,7 @@ minus.addEventListener("click", toggleSign);
196196
// }
197197
// }
198198

199-
function toggleSign(button: any) {
199+
function toggleSign(button: string): void {
200200
let value = Number(data.join(""));
201201
if (button === "minus") {
202202
if (value > 0) {

0 commit comments

Comments
 (0)