Skip to content

Instantly share code, notes, and snippets.

@edezekiel
Last active September 8, 2023 03:26
Show Gist options
  • Save edezekiel/e5c78bfdbf56b8af16cfba5b9e67ad30 to your computer and use it in GitHub Desktop.
Save edezekiel/e5c78bfdbf56b8af16cfba5b9e67ad30 to your computer and use it in GitHub Desktop.
Demonstrating that Record<string, any> is not magic
interface Hero { name: string; } // Still no string index signature
const hero: Hero = { name: 'codey' };
const generic: { [key: string]: any } = hero; // Somehow still works with Record
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment