title: JsonSchema: how to create schema for inclusive array type?
body: <p>Consider the following type:</p>
  <pre><code>type oneOfTwoPossibleArrays = 
      | [1, 2]
      | [3, 4]
  </code></pre>
  <p>What would the schema for it look like? This is my current failing attempt:<br />
  &lt;Edit: this code works with <code>ajv: ^8.2.0</code>. I used 7.2.6 when I opened this post.&gt;</p>
  <pre><code>const schema: JSONSchemaType&lt;oneOfTwoPossibleArrays&gt; = {
      oneOf: [
          {
              type: 'array',
              minItems: 2,
              maxItems: 2,
              items: [{ type: 'number', const: 1 }, { type: 'number', const: 2 }]
          },
          {
              type: 'array',
              minItems: 2,
              maxItems: 2,
              items: [{ type: 'number', const: 3 }, { type: 'number', const: 4 }]
          }
      ]
  }
  </code></pre>
  <p>For some reason defining just one of the arrays in the schema doesn't generate typescript errors:</p>
  <pre><code>const schema: JSONSchemaType&lt;oneOfTwoPossibleArrays&gt; = {
      type: 'array',
      minItems: 2,
      maxItems: 2,
      items: [{ type: 'number', const: 1 }, { type: 'number', const: 2 }]
  }
  </code></pre>