Skip to content

Instantly share code, notes, and snippets.

View joeyfigaro's full-sized avatar
🦀
Becoming a Rustacean

Jay Figaro joeyfigaro

🦀
Becoming a Rustacean
View GitHub Profile
@joeyfigaro
joeyfigaro / tsconfig-oneliners.csv
Created January 3, 2025 13:46 — forked from orta/tsconfig-oneliners.csv
TSConfig one-liners
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 9.
Name,Site,Schema
compilerOptions,"The set of compiler options for your project","Instructs the TypeScript compiler how to compile .ts files"
allowJs,"Let TS include .JS files in imports","Allow javascript files to be compiled."
allowSyntheticDefaultImports,"Allow 'import x from y' when a module doesn't have a default export","Allow default imports from modules with no default export. This does not affect code emit, just typechecking."
allowUmdGlobalAccess,"Assume UMD imports are all globally available","Allow accessing UMD globals from modules."
allowUnreachableCode,"Error when code will never be called","Do not report errors on unreachable code."
allowUnusedLabels,"Error when accidentally creating a label","Do not report errors on unused labels."
alwaysStrict,"Ensure 'use strict' is always emitted","Parse in strict mode and emit 'use strict' for each source file. Requires TypeScript version 2.1 or later."
assumeChangesOnlyAffectDirectDependencies,"A drastically faster, but occasionally inaccurate watch mode
import React from "react";
import { Link } from "react-router-dom";
export function createResource(getPromise) {
let cache = {};
let inflight = {};
let errors = {};
function load(key) {
inflight[key] = getPromise(key)
import React from "react";
import { Link } from "react-router-dom";
export function createResource(getPromise) {
let cache = {};
let inflight = {};
let errors = {};
function load(key) {
inflight[key] = getPromise(key)
@joeyfigaro
joeyfigaro / PaginationCalculator.ts
Created July 18, 2024 19:33 — forked from jimjam88/PaginationCalculator.ts
TypeScript Pagination Values Calculator
import range from "lodash.range";
type PageRangeArgs = {
size?: number,
last: number,
current: number,
}
type PageRangeReturnValue = number[];
@joeyfigaro
joeyfigaro / _mixin_verticalLoop.scss
Created July 26, 2016 14:53 — forked from jathayde/_mixin_verticalLoop.scss
A SCSS loop to combine verticals (product offerings) with icons and color backgrounds.
@mixin verticalLoop($vertical) {
$vertical-image-path: "#{$image-path-content}/icons/verticals/";
@each $color in color-black, color-white, color-honeycomb, color-clementine,
color-slushie, color-frosting, color-aloe, color-berry, color-wasabi,
color-grape, color-spice, color-wine, color-whale, color-honeycombLight,
color-clementineLight, color-slushieLight, color-frostingLight,
color-teaLight, color-berryLight, color-grapeLight, color-grayLightest,
color-grayLighter, color-grayLight, color-gray, color-grayDark,
color-grayDarker, color-grayDarkest {
&.vertical-icon {