Differences between two TypeScript error class styles

what's the difference between errors of the style (other than the message which I assume constructor on 2nd version would make the same)?
export class HttpError extends Data.TaggedError("HttpError")<{
    message: string;
}> {}

and
class HttpError {
  readonly _tag = "HttpError"
}
Was this page helpful?