Last active
September 8, 2023 12:38
-
-
Save edezekiel/81bb1089765ee615e46f00b08bbaca80 to your computer and use it in GitHub Desktop.
parseObject function expected to error when invoked with interface
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 { Hero } from 'third-party-library' | |
const hero: Hero = { name: 'codey' }; | |
function parseObject<T>(obj: Record<string, unknown>) { | |
return JSON.stringify(obj); | |
} | |
parseObject(hero); // Error |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment