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
| | Color Favorito | Nombre Clase OOP 1 | Mes de Nacimiento | Nombre Clase OOP 2 | Comida Favorita | Nombre Clase OOP 3 | | |
| |----------------|--------------------|-------------------|--------------------|-----------------|--------------------| | |
| | Azul | Singleton | Enero | Factory | Pizza | Service | | |
| | Rojo | Facade | Febrero | Adapter | Sushi | Manager | | |
| | Verde | Decorator | Marzo | Observer | Hamburguesas | AbstractFactory | | |
| | Amarillo | Command | Abril | Proxy | Tacos | Iterator | | |
| | Morado | Template | Mayo | Bridge | Pasta | Builder | | |
| | Naranja | Visitor | Junio | Composite | Helado | Prototype | | |
| | Rosa | Strategy | Julio | Chai |
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
| [ | |
| "lodash", | |
| "chalk", | |
| "eslint", | |
| "react", | |
| "dotenv", | |
| "moment", | |
| "async", | |
| "debug", | |
| "semver", |
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
| type VerticalAlignment = "top" | "middle" | "bottom"; | |
| type HorizontalAlignment = "left" | "center" | "right"; | |
| declare function setAlignment(value: `${VerticalAlignment}-${HorizontalAlignment}`): void; | |
| setAlignment("top-left"); // works! | |
| setAlignment("top-middel"); // error! | |
| setAlignment("top-pot"); // error! |
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
| export function range(start: number, end?: number): number[] { | |
| return [...Array(end !== undefined ? end - start : start).keys()].map(i => i + (end !== undefined ? start : 0)) | |
| } |
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
| if (isProtected) { | |
| /** | |
| * We have to execute this code outside of the JavaScript's main context | |
| * in order to let Angular finish with the closing animation | |
| */ | |
| setTimeout(() => { | |
| this.router.navigate([paths.root]) | |
| }, 0) | |
| } |
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
| export type Paths = { | |
| [key: string]: string | Paths | |
| root: string | |
| } |
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
| export decorator @logged { | |
| @wrap(f => { | |
| const name = f.name; | |
| function wrapped(...args) { | |
| console.log(`starting ${name} with arguments ${args.join(", ")}`); | |
| f.call(this, ...args); | |
| console.log(`ending ${name}`); | |
| } | |
| Object.defineProperty(wrapped, "name", { | |
| value: name, |
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
| function f() { | |
| console.log("f(): evaluated"); | |
| return function (target, propertyKey: string, descriptor: PropertyDescriptor) { | |
| console.log("f(): called"); | |
| } | |
| } |
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
| { | |
| "name": "blog", | |
| "description": "César Alberca's blog", | |
| "version": "0.1.0", | |
| "license": "MIT", | |
| "private": true, | |
| "homepage": "https://www.cesalberca.es", | |
| "scripts": { | |
| "prestart": "run-s -l clean", | |
| "start": "run-p -l server copy:watch compile:watch", |
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
| name: CI | |
| on: | |
| pull_request: | |
| branches: [master] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: |
NewerOlder