Last active
September 8, 2023 03:26
-
-
Save edezekiel/e5c78bfdbf56b8af16cfba5b9e67ad30 to your computer and use it in GitHub Desktop.
Demonstrating that Record<string, any> is not magic
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 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