Last active
January 4, 2019 04:46
-
-
Save dpashkevich/1a9ddf6427a8d363cdff58dc2b4e5a59 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Person { | |
firstName: string; | |
lastName: string; | |
} | |
function greeter(person: Person): string { | |
return "Hello, " + person.firstName + " " + person.lastName; | |
} | |
// Jasmine spec: | |
describe("greeter", function() { | |
it("returns greeting", function() { | |
expect( | |
greeter({firstName: 'James', lastName: 'Hetfield'}) | |
).toEqual('Hello, James Hetfield'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment