defekt icon indicating copy to clipboard operation
defekt copied to clipboard

data attribute might not always be optional

Open dotKuro opened this issue 3 years ago • 0 comments

What is this issue about?

At the moment you can set a type for data attribute of a custom error, but it will still always be optional. This seems like an unnecessary restriction. By default the type of data is any, so therefore optional anyway and if you want it to be optional for the custom type you provide, you could just write it explicitly like t | undefined. So I think we can safely make it the data attribute required.

dotKuro avatar Sep 02 '22 09:09 dotKuro