Cannot assign to Type

import { scope, Type } from "arktype";

const ValidationErrorResponse = scope({
  ErrorDescription: {
    message: "string",
    code: "'VALIDATION'",
  },
  Response: {
    code: "400",
    contents: {
      errors: "ErrorDescription[]>0",
    },
  },
}).export().Response;

const mytype: Type = ValidationErrorResponse;

This works fine in version 2.0.0-dev.19. However, updating to 2.0.0-dev.20 or above it throws this error:
Type 'Type<{ code: 400; contents: { errors: of<{ message: string; code: "VALIDATION"; }[], MoreThanLength<0>>; }; }, { Response: { code: 400; contents: { errors: of<{ message: string; code: "VALIDATION"; }[], MoreThanLength<...>>; }; }; ErrorDescription: { ...; }; }>' is not assignable to type 'Type<unknown, {}>'.
  The types returned by '$.type(...)' are incompatible between these types.
    Type 'Type<any, { Response: { code: 400; contents: { errors: of<{ message: string; code: "VALIDATION"; }[], MoreThanLength<0>>; }; }; ErrorDescription: { message: string; code: "VALIDATION"; }; }>' is not assignable to type 'Type<any, {}>'.
      Type '{}' is not assignable to type '{ Response: { code: 400; contents: { errors: of<{ message: string; code: "VALIDATION"; }[], MoreThanLength<0>>; }; }; ErrorDescription: { message: string; code: "VALIDATION"; }; }'.
Was this page helpful?