Skip to content

Commit

Permalink
fixed returning only data type number in fib.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
mkhin24 committed Sep 1, 2024
1 parent e94c33c commit 9598d49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fib.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// util function that computes the fibonacci numbers
module.exports = function fibonacci(n) {
export function fibonacci(n: number): number {
if (n < 0) {
return -1;
} else if (n == 0) {
Expand Down

0 comments on commit 9598d49

Please sign in to comment.