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
const chromium = require('chrome-aws-lambda'); | |
module.exports.handler = async (event, context) => { | |
const browser = await chromium.puppeteer.launch({ | |
executablePath: await chromium.executablePath, | |
args: chromium.args, | |
defaultViewport: chromium.defaultViewport, | |
headless: chromium.headless, | |
}); |
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 Beverage { | |
protected description: string; | |
getDescription(): string { | |
return this.description; | |
} | |
abstract cost(): 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
class Espresso extends Beverage { | |
constructor() { | |
super(); | |
this.description = "에스프레소~"; | |
} | |
cost() { | |
return 3000; | |
} | |
} |
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
class EspressoIce extends Beverage { | |
constructor() { | |
super(); | |
this.description = "에스프레소~"; | |
} | |
cost() { | |
return 3500; | |
} | |
} |
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
class GreenTea extends Beverage { | |
constructor() { | |
super(); | |
this.description = "그린티~"; | |
} | |
cost() { | |
return 3500; | |
} | |
} |
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 Beverage { | |
protected description: string; | |
private ice: boolean; // 얼름 | |
private mocha: boolean; // 모카 | |
private whip: boolean; // 휘핑 | |
getDescription(): string { | |
return this.description; | |
} |
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 Beverage { | |
protected description: string; | |
public getDescription(): string { | |
return this.description; | |
} | |
abstract cost(): 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
class Americano extends Beverage { | |
constructor() { | |
super(); | |
this.description = "아메리카노"; | |
} | |
cost() { | |
return 3000; | |
} | |
} |
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 BeverageDecorator extends Beverage { | |
abstract getDescription(): string; | |
} |
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
class Ice extends BeverageDecorator { | |
private beverage: Beverage; | |
constructor(beverage: Beverage) { | |
super(); | |
this.beverage = beverage; | |
} | |
getDescription() { | |
return this.beverage.getDescription() + ", 아이스"; | |
} |
OlderNewer