- Development
- Open pull-requests are deployed here for manual & automated testing
- Staging
- Pre-production stage for testing changes before green-lighting to users
- Production
- Fully-exercised build is rolled out to mobile stores & prod web-app
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
abstract class Repo<T> { | |
constructor(private db: DbDriver, private repo: string) {} | |
public get(id: string): T { | |
return this.db[this.repo].get(id); | |
} | |
public delete(id: string): void { | |
return this.db[this.repo].delete(id); | |
} |
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
struct Number(i32); | |
const SUITCASE_LEN: Number = Number(55); | |
const SUITCASE_HGT: Number = Number(40); | |
enum Shape { | |
Circle { diameter: Number }, | |
Rect { length: Number, height: Number }, | |
Triangle { base: Number, height: Number }, | |
} |
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
type Circle = { diameter: number }; | |
type Rectangle = { length: number, height: number }; | |
type Triangle = { base: number, height: number }; | |
type Shape = | |
| Circle | |
| Triangle | |
| Rectangle; | |
const suitcase = { |
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
import {strike, match, otherwise} from '@matchbook/ts'; | |
type Coin = | |
| 'penny' | |
| 'nickel' | |
| 'dime' | |
| 'quarter'; | |
const getValue = (c: Coin): number => strike( | |
c, |
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
type Coin = | |
| 'penny' | |
| 'nickel' | |
| 'dime' | |
| 'quarter'; | |
function getValue(coin: Coin): number { | |
switch(coin) { | |
case 'penny': return 0.01; | |
case 'nickel': return 0.05; |
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
abstract class Coin | |
{ | |
public float GetValue() | |
{ | |
return this switch | |
{ | |
Penny => 0.01, | |
Nickel => 0.05, | |
Dime => 0.10, | |
Quarter => 0.25, |
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
enum Coin { | |
Penny, | |
Nickel, | |
Dime, | |
Quarter, | |
} | |
impl Coin { | |
pub fn get_value(&self) -> f16 { | |
use Coin::*; |
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
type Coin = | |
| Penny | |
| Nickel | |
| Dime | |
| Quarter | |
let getValue c = | |
match c with | |
| Penny -> 0.01 | |
| Nickel -> 0.05 |
NewerOlder