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
{ | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"definitions": { | |
"Permission": { | |
"title": "Permission", | |
"description": "An enumeration.", | |
"enum": [ | |
"MANAGE_USERS", | |
"MANAGE_STAFF", | |
"IMPERSONATE_USER", |
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 { Stripe } from "stripe"; | |
type StripeWebhookEventTypes = Stripe.WebhookEndpointCreateParams.EnabledEvent; | |
type StripeWebhookEvent<EventType extends StripeWebhookEventTypes, Payload> = { | |
type: EventType; | |
data: { | |
object: Payload; | |
}; | |
}; |
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 Fetch from 'node-fetch'; | |
interface JJITOffer { | |
title: string; | |
street: string; | |
city: string; | |
country_code: string; | |
address_text: string; | |
marker_icon: string; | |
workplace_type: string; |
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 LogicValues = [true, false] as const; | |
type Logic = typeof LogicValues[number]; | |
const CARDINALITY = LogicValues.length; | |
type Literal = { __t: "Literal"; symbol: string }; | |
type UnaryOperator = { __t: "Unary"; e: (a: Logic) => Logic }; | |
type BinaryOperator = { __t: "Binary"; e: (a: Logic, b: Logic) => Logic }; | |
type Token = Literal | UnaryOperator | BinaryOperator; |
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
/* eslint-disable functional/no-this-expression -- it's a class */ | |
/* eslint-disable functional/prefer-readonly-type -- it's a class */ | |
export const useBodyFix = () => { | |
return fixBodyService; | |
}; | |
class FixBodyService { | |
private windowOffsetY: number = 0; | |
private scrollbarWidth: number = 0; |
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
function getHexValue(intInput: number) { | |
return intInput.toString(16).padStart(2, "0"); | |
} | |
function getTintValue(tint: number, bgTint: number, alpha: number) { | |
return Math.min(Math.floor((1 - alpha) * bgTint + alpha * tint), 255); | |
} | |
class Color { | |
constructor( |
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 getAllCSSVariableNames = () => | |
Array.from(document.styleSheets) | |
.filter((s) => s.href === null || s.href.startsWith(window.location.origin)) | |
.flatMap((s) => Array.from(s.cssRules)) | |
.filter((r): r is CSSStyleRule => r.type === CSSRule.STYLE_RULE) | |
.flatMap((r) => (r.selectorText === ":root" ? Array.from(r.style) : [])) | |
.filter((name) => name.startsWith("--")) | |
.sort(); | |
const getCSSColorVariableNames = () => |
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 { definitions as Api } from './apitypes'; | |
{ | |
function id1(arg: unknown): unknown { | |
return arg; | |
} | |
function id<Argument>(arg: Argument): Argument { | |
return arg; | |
} |
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-ignore | |
const pairs = [ | |
[0x00E5,0x212B],[0x00C5,0x212B],[0x0399,0x1FBE],[0x03B9,0x1FBE],[0x03B2,0x03D0], | |
[0x03B5,0x03F5],[0x03B8,0x03D1],[0x03B8,0x03F4],[0x03D1,0x03F4],[0x03B9,0x1FBE], | |
[0x0345,0x03B9],[0x0345,0x1FBE],[0x03BA,0x03F0],[0x00B5,0x03BC],[0x03C0,0x03D6], | |
[0x03C1,0x03F1],[0x03C2,0x03C3],[0x03C6,0x03D5],[0x03C9,0x2126],[0x0392,0x03D0], | |
[0x0395,0x03F5],[0x03D1,0x03F4],[0x0398,0x03D1],[0x0398,0x03F4],[0x0345,0x1FBE], | |
[0x0345,0x0399],[0x0399,0x1FBE],[0x039A,0x03F0],[0x00B5,0x039C],[0x03A0,0x03D6], | |
[0x03A1,0x03F1],[0x03A3,0x03C2],[0x03A6,0x03D5],[0x03A9,0x2126],[0x0398,0x03F4], | |
[0x03B8,0x03F4],[0x03B8,0x03D1],[0x0398,0x03D1],[0x0432,0x1C80],[0x0434,0x1C81], |
NewerOlder