Skip to content

Commit

Permalink
add test files
Browse files Browse the repository at this point in the history
  • Loading branch information
BrentBlanckaert committed Nov 14, 2024
1 parent 07c0709 commit 3602bb8
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/exercises/echo-function/solution/top-level-output.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
function echo(content: Object) {
return content;
}

function noEcho(content: Object) {
// Do nothing.
}

function toString(number: Object): string {
return number.toString();
}

console.log("This is top-level output");
15 changes: 15 additions & 0 deletions tests/exercises/echo-function/solution/unknown-return-type.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
class Coord {

public x: number;
public y: number;

constructor(x: number, y: number ) {
this.x = x;
this.y = y;
}

}

function echo(content: unknown) {
return new Coord(5, 7);
}

0 comments on commit 3602bb8

Please sign in to comment.