Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: allow readonly arrays in interfaces
Before this change, a readonly array would be inferred as "object": ```ts interface TransactionInput { items: readonly { count: number, productId: string }[] } const transactionInputValidator = ajv.compile<TransactionInput>({ additionalProperties: false, properties: { items: { type: 'array' }, // <--- Error: TS wants this to be "object" }, required: ['items'], type: 'object' }) ``` Now this is properly inferred as "array".
- Loading branch information