This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using Ploeh.AutoFixture; | |
using Ploeh.AutoFixture.Kernel; | |
using Xunit; | |
namespace AutoFixtureSandbox.Tests | |
{ |
This file contains hidden or 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
//1.0 TypeScript Inheritance | |
class Diety { | |
constructor(protected name: string) { | |
} | |
} | |
interface IDietyAction { | |
(name: string): void | |
}; |
This file contains hidden or 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
//1.0 Interface declared on function | |
function printBirthday(birthday: { Date: Date, Age: number, Name: string}) { | |
console.log(birthday.Name + "'s " + (birthday.Age + 1) + "th birthday" | |
+ " is on " + birthday.Date + "."); | |
} | |
let person = { Name: "Karl", Age: 32, Date: new Date(), Occupation: "Painter" }; | |
printBirthday(person); |
This file contains hidden or 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
//Destructuring Examples | |
//1.0 Array destructing | |
let travelClasses = [200, 500, 1000]; | |
let [economy, business, first] = travelClasses; | |
console.log("Business class price:" + business); //500 |