The lint funciton expects a variable of type Schema as input. As I understand it, if the input is already a Schema it is already a valid JSON Schema, and hence does not need any linting. I think the lint function should take an any or unknown as input. This way the function can be used to check wheter or not an arbitrary value is a valid JSON Schema and hence can be cast to Schema.
The way it is now, in order to check whether a value is a valid JSON Schema, I have to first cast it to Schema. It is better to this cast after running lint, when I know that it is safe.
The
lintfunciton expects a variable of typeSchemaas input. As I understand it, if the input is already aSchemait is already a valid JSON Schema, and hence does not need any linting. I think thelintfunction should take ananyorunknownas input. This way the function can be used to check wheter or not an arbitrary value is a valid JSON Schema and hence can be cast toSchema.The way it is now, in order to check whether a value is a valid JSON Schema, I have to first cast it to
Schema. It is better to this cast after runninglint, when I know that it is safe.