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
{ | |
"id" : "728320a7-a4e2-4a16-aa38-621b084c1014", | |
"name" : "mentorOnboardingFlow", | |
"type" : "INFRASTRUCTURE", | |
"processingType" : "SEQUENTIAL", | |
"author" : null, | |
"createDate" : "2024-02-28T12:39:35.030+00:00", | |
"modifyDate" : "2024-02-28T12:39:35.030+00:00", | |
"parameters" : { | |
"Sample Selection" : { |
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
'prettier/prettier': [ | |
'error', | |
{ | |
printWidth: 120, | |
singleQuote: true, | |
semi: true, | |
tabWidth: 2, | |
trailingComma: 'all', | |
}, | |
], |
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
import type { Operation, Stream } from "./types.ts"; | |
import { action, resource, suspend } from "./instructions.ts"; | |
import { createChannel } from "./channel.ts"; | |
import { useScope } from "./run/scope.ts"; | |
type EventMap<T extends EventTarget> = T extends WebSocket ? WebSocketEventMap | |
: T extends MediaQueryList | |
? MediaQueryListEventMap | |
: T extends Document | |
? DocumentEventMap |
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
type Equal<X, Y> = (<T>() => T extends X ? 1 : 2) extends (<T>() => T extends Y ? 1 : 2) ? true : false | |
type Test1 = Equal<[1, 2, '3'], [1, 2, '3']> | |
// ^? - type Test1 = true | |
type Test2 = Equal<[1, 2, '3'], [1, 2, 3]> | |
// ^? - type Test2 = false |
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
Show hidden characters
{ | |
"extends": "@cutting/eslint-config/react", | |
"rules": { | |
"@typescript-eslint/ban-types": [ | |
"error", | |
{ | |
"types": { | |
"{}": { | |
"message": "Use Record<string, unknown> instead", |
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
type BadUndefinedKeys<T> = { | |
[P in keyof T]-?: T[P] extends undefined ? P : never | |
}[keyof T]; | |
type Bad = BadUndefinedKeys<{ foo: number, bar?: string}>; // never | |
type GoodUndefinedKeys<T> = { | |
[P in keyof T]-?: undefined extends T[P] ? P : never; | |
}[keyof T]; |
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
// both examples below start | |
type UnionToXXX<T> = (T extends any ? (t: T) => T : never) extends infer U ? // rest | |
// Converts { x: string } | { y: number } to { x: string, y: number } | |
type UnionToIntersection<T, U = T> = (U extends any ? (arg: U) => any : never) extends ((arg: infer I) => void) ? I : never; | |
// Converts string | number | boolean to [string, number, boolean] | |
type UnionToTuple<T> = ( | |
( | |
( |
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
// HERE IS MY ANSWER WITH THE TIME CONSTRAINT REMOVED | |
// https://github.com/dagda1/guardian-interview/blob/v0/src/index.ts | |
import inquirer from 'inquirer'; | |
const { prompt } = inquirer; | |
const commands = ['N', 'S', 'E', 'W'] as const; | |
type RobotState = 'IDLE' | 'CARRYING'; |
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
{ | |
"data": { | |
"search": { | |
"repositoryCount": 104, | |
"pageInfo": { | |
"endCursor": "Y3Vyc29yOjEwMA==", | |
"startCursor": "Y3Vyc29yOjE=" | |
}, | |
"nodes": [ | |
{ |
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
export type PreserveAspectRatioAlignment = | |
| 'xMinYMin' | |
| 'xMidYMin' | |
| 'xMaxYMin' | |
| 'xMinYMid' | |
| 'xMidYMid' | |
| 'xMaxYMid' | |
| 'xMinYMax' | |
| 'xMidYMax' | |
| 'xMaxYMax'; |
NewerOlder