For example, the schema defined below is legal in json, but an error will occur if the Schema of the jsonschema package is defined in ts.
import { Schema } from 'jsonschema'
const s: Schema = {
type: 'string',
default: 'name' // Object literal may only specify known properties, and 'default' does not exist in type 'Schema'
}
Strangely, I noticed that the type definition in the github code does contain the default field, but it does not exist in the npm package. Why is it not published?
For example, the schema defined below is legal in json, but an error will occur if the Schema of the jsonschema package is defined in ts.
playground: https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAbzgZQMYAsCmICGcC+cAZlBCHAOQBWAzhAHY0bY4UBQbqDN8NAXCma44AXkRs4kuDACeYTAIo8owegHMKAGglSAJpiI4ArgBsYi+jhCZ2+IA
Strangely, I noticed that the type definition in the github code does contain the default field, but it does not exist in the npm package. Why is it not published?
https://github.com/tdegrunt/jsonschema/blob/b53e5853d88763b3de57be0250f46a55445789f6/lib/index.d.ts#L106