Skip to content

Instantly share code, notes, and snippets.

View hyunbinseo's full-sized avatar

Hyunbin Seo hyunbinseo

View GitHub Profile
@hyunbinseo
hyunbinseo / tailwind-colors.ts
Created February 19, 2022 12:32
Typescript types for Tailwind CSS colors (background, text)
// Based on Tailwind CSS v3.0.23
// Requires TypeScript 4.1 or later (Template Literal Types)
// Reference https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-1.html#template-literal-types
type Name =
| 'amber'
| 'blue'
| 'cyan'
| 'emerald'
@hyunbinseo
hyunbinseo / type-object-values.ts
Created October 2, 2021 08:27
Set object's value type while keeping key autocomplete
/* Types */
type Person = {
age: number,
city: string
}
type People = { [name: string]: Person }
@hyunbinseo
hyunbinseo / about.md
Last active October 2, 2021 08:06
Sign JWT in Node.js using crypto-js library