1
1
mirror of https://github.com/github/semantic.git synced 2024-12-28 09:21:35 +03:00

Update Greeter example to Adder

This commit is contained in:
joshvera 2018-12-10 16:21:42 -05:00
parent ea4c9462bd
commit 75ac094409
2 changed files with 10 additions and 10 deletions

View File

@ -1,4 +1,4 @@
import { Greeter } from "./class2" import { Adder } from "./class2"
const foo = new Greeter("world") var foo = new Adder(5)
foo.greet() foo.add()

View File

@ -1,11 +1,11 @@
class Greeter { class Adder {
greeting: string; summand: number;
constructor(message: string) { constructor(summand: number) {
this.greeting = message; this.summand = summand;
} }
greet() { add() {
return "Hello, " + this.greeting; return 4 + this.summand;
} }
} }
export { Greeter } export { Adder }