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
| <mat-autocomplete #auto="matAutocomplete" [displayWith]="displayFn"> | |
| <mat-option *ngIf="isLoading" class="is-loading"><mat-spinner diameter="50"></mat-spinner></mat-option> | |
| <ng-container *ngIf="!isLoading"> | |
| <mat-option *ngFor="let user of filteredUsers" [value]="user"> | |
| <span>{{ user.name }}</span> | |
| <small> | ID: {{user.id}}</small> | |
| </mat-option> | |
| </ng-container> | |
| </mat-autocomplete> |
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
| // Use !{var} to use unescaped conent | |
| style(type="text/css") !{compiledStyle} | |
| h1.title Invoice number ##{invoice.id} | |
| p.created-at #{invoice.createdAt} | |
| h3 For: #{invoice.customer.number} | |
| table |
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
| body { | |
| padding: 20px; | |
| font-family: Halvetica, sans-serif; | |
| .title { | |
| margin-bottom: 4px; | |
| } | |
| .created-at { | |
| font-size: 14px; |
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
| import TeaSchool from 'tea-school'; | |
| import * as pug from 'pug'; | |
| import * as path from 'path'; | |
| import {PDFOptions} from 'puppeteer'; | |
| import {Options as SassOptions} from 'node-sass'; | |
| (async () => { | |
| /******************************** | |
| * STYLE OPTIONS * | |
| ********************************/ |
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 MargheritaToppings = { | |
| mushrooms?: boolean; | |
| olives?: boolean; | |
| onion?: boolean; | |
| basil?: boolean; | |
| }; | |
| type HawaiianToppings = { | |
| pineapple?: boolean; | |
| }; |
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 purchasePizzaIngredients<P, T>() { | |
| return { | |
| purchaseToppings: (toppings: T) => {}, | |
| }; | |
| } |
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 ExtractToppings<P> = P extends Pizza<infer T> ? T : never; |
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 MargheritaToppings = { | |
| mushrooms?: boolean; | |
| olives?: boolean; | |
| onion?: boolean; | |
| basil?: boolean; | |
| }; | |
| type MargheritaCheeses = { | |
| mozzarella?: boolean; | |
| parmesan?: boolean; |
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 ExtractToppings<P> = P extends Pizza<infer T, any> ? T : never; |
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 purchasePizzaIngredients<P>() { | |
| return { | |
| purchaseToppings: (toppings: ExtractToppings<P>) => {}, | |
| }; | |
| } |