Open
Description
> tsc --strictNullChecks Broken.d.ts
Broken.d.ts:11:3 - error TS2411: Property 'message' of type 'string | undefined' is not assignable to string index type 'string'.
Generated via v10.0.0:
...
export interface FormObject {
message?: string;
[k: string]: string;
}
Schema
{
"allOf": [{ "$ref": "#/definitions/FormObject" }],
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"FormObject": {
"properties": {
"message": {
"type": "string",
"maxLength": 4000
}
},
"additionalProperties": {
"type": "string",
"maxLength": 100
},
"type": "object"
}
}
}
I left the maxLength properties in so you can see why I wrote the schema like this.