Open wehrstedt opened 5 years ago
As a workaround you can switch the order of the types. Instead of string|object
you can pass object|string
.
Maybe the plugin should be "smarter". If properties are passed and of least one of the passed types is of type object
, everything is fine. But now it just takes the first type.
You can do something like this:
This will fail because the plugin tries to create a type alias definition but will reject because properties are defined. The code above should instead create a type definition for the passed object. Both types should be keep in the parameter type.