Created
October 6, 2022 16:18
-
-
Save mrclay/b418e2ad2842dac6e76567921d211df3 to your computer and use it in GitHub Desktop.
Example d.ts file for a JSON file
This file contains hidden or 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
// filename.json <-- the data | |
// filename.json.d.ts <-- type definition (this file) | |
// Just an example type | |
const value: Record<string, string>; | |
export default value; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This will also work for any data file webpack can import but typescript doesn't recognize (yet), like yaml or "json5".