What is CI?
CI stands for Continuous Integration, which is continously deploying code to a shared repo several times a day. Each time it is checked in, it is verified by an automated build.- Enables automated testing
{"lastUpload":"2019-09-10T19:26:06.069Z","extensionVersion":"v3.4.2"} |
import { Primitive } from 'type-fest'; | |
type Resolver<T> = (...args: any) => T; | |
type AnyFunc = (...args: any[]) => any; | |
type ArrayType<T> = T extends Array<infer U> ? U : never; | |
export type Schema<T> = { | |
[P in keyof T]: P extends Primitive |
Given a list of N names, print out a schedule where each person meets with every other person in the list exactly once.
Bonus: Given a set amount of time in minutes, evenly distribute the time amongst each meeting round.
e.g.
names:
['Alex', 'Kate', 'Kyle', 'Liz']
import { options } from './lib' | |
/** | |
* Conditional Types in typescript are a subtype of generic types | |
* | |
* They are useful for deriving information from the type system | |
*/ | |
// Generics aka Parametric Types: Types which take types and return other types | |
namespace FrontendCoeRules { |
/** | |
* String template literal types | |
*/ | |
type FlagColor = "red" | "green" | "yellow"; | |
type LightFlagColor = `light${FlagColor}`; | |
let lightRed: LightFlagColor = "lightred"; |
import React from 'react'; | |
const Color = ({ color }) => <span style={{ color }}>{color}</span>; | |
const RecursiveText = ({ text }) => { | |
const words = text.split(' '); | |
const renderWord = (index) => { | |
if (index >= words.length) return null; | |
const word = words[index]; | |
if (['red', 'blue', 'green'].includes(word)) { |