Skip to content

Commit d4d182b

Browse files
authored
Improved typescript tasks
1 parent eb660a9 commit d4d182b

File tree

28 files changed

+92
-85
lines changed

28 files changed

+92
-85
lines changed

src/main/kotlin/g2601_2700/s2618_check_if_object_instance_of_class/solution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function checkIfInstanceOf(obj: any, classFunction: any): boolean {
1111
return false
1212
}
1313

14-
/**
14+
/*
1515
* checkIfInstanceOf(new Date(), Date); // true
1616
*/
1717

src/main/kotlin/g2601_2700/s2619_array_prototype_last/solution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Array.prototype.last = function <T>(): T | -1 { //NOSONAR
1010
return this.length ? this.at(-1) : -1
1111
}
1212

13-
/**
13+
/*
1414
* const arr = [1, 2, 3];
1515
* arr.last(); // 3
1616
*/

src/main/kotlin/g2601_2700/s2620_counter/solution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function createCounter(n: number): () => number {
88
return fun
99
}
1010

11-
/**
11+
/*
1212
* const counter = createCounter(10)
1313
* counter() // 10
1414
* counter() // 11

src/main/kotlin/g2601_2700/s2621_sleep/solution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ async function sleep(millis: number): Promise<void> {
66
})
77
}
88

9-
/**
9+
/*
1010
* let t = Date.now()
1111
* sleep(100).then(() => console.log(Date.now() - t)) // 100
1212
*/

src/main/kotlin/g2601_2700/s2622_cache_with_time_limit/solution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class TimeLimitedCache {
2828
}
2929
}
3030

31-
/**
31+
/*
3232
* Your TimeLimitedCache object will be instantiated and called as such:
3333
* var obj = new TimeLimitedCache()
3434
* obj.set(1, 42, 1000); // false

src/main/kotlin/g2601_2700/s2623_memoize/solution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function memoize(fn: Fn): Fn {
1616
}
1717
}
1818

19-
/**
19+
/*
2020
* let callCount = 0;
2121
* const memoizedFn = memoize(function (a, b) {
2222
* callCount += 1;

src/main/kotlin/g2601_2700/s2624_snail_traversal/solution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Array.prototype.snail = function (rowsCount: number, colsCount: number): number[
1919
return res
2020
}
2121

22-
/**
22+
/*
2323
* const arr = [1,2,3,4];
2424
* arr.snail(1,4); // [[1,2,3,4]]
2525
*/

src/main/kotlin/g2601_2700/s2627_debounce/solution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function debounce(fn: F, t: number): F {
1212
}
1313
}
1414

15-
/**
15+
/*
1616
* const log = debounce(console.log, 100);
1717
* log('Hello'); // cancelled
1818
* log('Hello'); // cancelled

src/main/kotlin/g2601_2700/s2629_function_composition/solution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function compose(functions: F[]): F {
1515
}
1616
}
1717

18-
/**
18+
/*
1919
* const fn = compose([x => x + 1, x => 2 * x])
2020
* fn(4) // 9
2121
*/

src/main/kotlin/g2601_2700/s2630_memoize_ii/solution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function memoize(fn: Fn): Fn {
4343
}
4444
}
4545

46-
/**
46+
/*
4747
* let callCount = 0;
4848
* const memoizedFn = memoize(function (a, b) {
4949
* callCount += 1;

0 commit comments

Comments
 (0)