Using the online schema to typescript coverter with the package.json schema I get a scripts? prop under CoreProperties with a list of optional props (I removed most of the props for brevity)
scripts?: {
prepublish?: string;
prepare?: string;
prepublishOnly?: string;
[k: string
]: string;
}
My compiler is freaking out because Property 'prepublish' of type 'string | undefined' is not assignable to string index type 'string'. The same goes for the entire list of props. To get around this issue, I had to change the last two lines to:
scripts?: {
prepublish?: string;
prepare?: string;
prepublishOnly?: string;
[k: string
]: string | undefined;
}
And it worked fine.