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
# This setting ensures we always install the Linux binaries when running `yarn install`. This is needed for running | |
# swc natively in Docker from a Mac host. | |
supportedArchitectures: | |
cpu: | |
- current | |
- x64 | |
- arm64 | |
libc: | |
- current | |
- glibc |
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
<body class="b-using-keyboard"> | |
<noscript>You need to enable JavaScript to run this app.</noscript> | |
<div id="root" style="position: relative; z-index: 0;"> | |
<div class="css-32lf3s"> | |
<img src="/wordmark.svg" alt="Homebound" class="css-u1jr60" /> | |
<div class="css-1k9buc6">Purchase Order</div> | |
<div class="css-1yduzul"> | |
<div class="css-11ykhmt">Prime Contractor ("Homebound")</div> | |
<div class="css-11ykhmt">Trade Partner</div> | |
</div> |
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
# In your home directory ~.gitconfig | |
[user] | |
name = <your name> | |
email = <personal-email>@gmail.com | |
# If all Homebound-related code is in your ~/homebound directory | |
[includeIf "gitdir:~/homebound/"] | |
path = .gitconfig-homebound |
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
const { EnvironmentContext, JestEnvironment } = require("@jest/environment"); | |
const { LegacyFakeTimers, ModernFakeTimers } = require("@jest/fake-timers"); | |
const { Config, Global } = require("@jest/types"); | |
const { ModuleMocker } = require("jest-mock"); | |
const JestUtil = require("jest-util"); | |
const { parseHTML } = require("linkedom"); | |
const VM = require("vm"); | |
const { Script } = VM; | |
/** |
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 { $mobx, isObservable, makeObservable } from "mobx"; | |
const annotationsSymbol = Symbol("annotationsSymbol"); | |
const objectPrototype = Object.prototype; | |
/** | |
* A purposefully-limited version of `makeAutoObservable` that supports subclasses. | |
* | |
* There is valid complexity in supporting `makeAutoObservable` across disparate/edge-casey | |
* class hierarchies, and so mobx doesn't support it out of the box. See: |
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 Args = { | |
id?: string | undefined | null; | |
firstName?: string | undefined | null; | |
parentId?: string | undefined | null; | |
different?: string | undefined | null; | |
}; | |
type Opts = { | |
id?: string | undefined | null; | |
firstName?: string | undefined | null; |
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
class Target { | |
ref = new Ref(); | |
foo() { | |
return this.bar(); | |
} | |
bar() { | |
return this.ref; | |
} | |
} | |
class Ref { |
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
interface AstNode<T> { | |
value: T; | |
} | |
const n1: AstNode<number> = { value: 1 }; | |
const n2: AstNode<string> = { value: "asdf" }; | |
// https://github.com/microsoft/TypeScript/pull/26063 says that if T is a tuple | |
// type, the mapped type will map each specific type in the tuple. | |
type Values<T> = { [P in keyof T]: T[P] extends AstNode<infer V> ? V : never }; |
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 path from "path"; | |
import { Polly, PollyConfig } from "@pollyjs/core"; | |
// @ts-ignore polly's typings aren't great but we don't really need them for this small init code | |
import { setupPolly } from "setup-polly-jest"; | |
import { MODES } from "@pollyjs/utils"; | |
import { env } from "@src/env"; | |
Polly.register(require("@pollyjs/adapter-node-http")); | |
Polly.register(require("@pollyjs/persister-fs")); |
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
class Foo { | |
a = 1; | |
b(): void {} | |
c(): boolean { | |
return true; | |
} | |
} | |
// https://medium.com/dailyjs/typescript-create-a-condition-based-subset-types-9d902cea5b8c | |
type FilterFlags<Base, Condition> = { |
NewerOlder