You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the best fix here is to replace the patternProperties section with a more lenient one:
"patternProperties": {
"^_": {
"description": "Any property starting with _ is valid.",
"type": "any"
}
},
This is a more correct definition, since _-prefixed package.json properties don't have to be objects.
If that's not an acceptable change to the schema, I'd like to get a discussion going to see if a middleground can be reached (here & w/ json-schema-to-typescript) that means we can have our schemas & type them too 😉
The text was updated successfully, but these errors were encountered:
schematoreupdate
usesjson-schema-to-typescript
to generate type definitions for the schemas provided byschemastore
, which are published to npm.However, the definition generated for the schema for
package.json
currently has type errors, due topatternProperties
.This was raised on
schematoreupdate
here, and raised (separately) onjson-schema-to-typescript
here.@bcherny provided a detailed explanation of the problem, along w/ a suggested fix that IMO sounds reasonable:
If that's not an acceptable change to the schema, I'd like to get a discussion going to see if a middleground can be reached (here & w/
json-schema-to-typescript
) that means we can have our schemas & type them too 😉The text was updated successfully, but these errors were encountered: