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 const ToastTheme: ComponentMultiStyleConfig = { | |
parts: ['container', 'icon', 'action', 'content'], | |
type: { // 1. This is not supported by th `ComponentStyleConfig` type | |
info: { // 2. Who will handle the assigning to `theme.type[props.type]`? | |
container: {} // 3. Who will handle the `theme.type[props.type][part]`? | |
} | |
}, | |
variants: { | |
default: {} // This is b | |
} |
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 { Component, Input, Output, EventEmitter, OnInit, OnChanges, SimpleChanges } from '@angular/core'; | |
import { CategoryModel } from './category/model'; | |
import { Observable } from 'rxjs'; | |
import { CategoryQuery } from './category/store.query'; | |
import { CategoryStoreService } from './category/store.service'; | |
export type SearchEvent = { searchTerm: string, selectedCategory: CategoryModel}; | |
@Component({ | |
selector: 'app-search', |
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 { Injectable } from '@angular/core'; | |
import { categoriesMock } from './categories-mock'; | |
import { of } from 'rxjs'; | |
@Injectable({ | |
providedIn: 'root' | |
}) | |
export class CategoryApiService { | |
search() { | |
return of(categoriesMock) |
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>) => {}, | |
}; | |
} |
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
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> ? 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, 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 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
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 * | |
********************************/ |
NewerOlder