Skip to content

Commit

Permalink
chore(README): add isAdult method to Person class in the example
Browse files Browse the repository at this point in the history
  • Loading branch information
takagiy committed Jul 21, 2024
1 parent 16cb6c7 commit 02c1c60
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ class Person extends Validated(schema) {
greet() {
console.log(`Hello, I'm ${this.name}.`);
}

isAdult() {
return this.age >= 18;
}
}

/* A constructor that is typed based on the zod schema is created */
Expand Down

0 comments on commit 02c1c60

Please sign in to comment.