-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
Description
Tell us about your environment
I'm running this inside a vscode extension to parse the extensions.json
- Node Version: 18.16.1
- comment-json Version 4.2.3
Please show your use case / code slices / code link that could reproduce the issue
I want to have the returned value of parse correctly typed. It should return an json with recommendations as string[], but I can't get it to work.
let extensions: CommentJSONValue<{ recommendations: string[] }> | undefined // doesn't work
extensions = parse(fs.readFileSync(extensionsJsonPath, "utf8"))
extensions?.recommendations?.includes("example.extension") || false // doesn't workWhat did you expect to happen?
I want to have the recommendations typed correctly.
Thank you for your help!!