Support legacy check callback with `error: Error`

Legacy callback system would not present an array of errors to the
callback unless absolutely necessary. Updated the typescript version to
support this, since removal resulted in breaking of ORM.