You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Parse a property that is type: string, but also contains the format hint, e.g. format: date-time
What happens?
There is config to parse these as a Date, but I want to be able to parse as a custom type.
What were you expecting to happen?
I was expecting this, but it would nice to have some more control.
I have a solution to allow a new config item, that will pass a format and return a type string:
if (context.output.override.customStringFormatResolver && item?.format) {
const type = context.output.override.customStringFormatResolver(item.format);
if (type) {
value = type;
}
}
What are the steps to reproduce this issue?
type: string
, but also contains the format hint, e.g.format: date-time
What happens?
There is config to parse these as a Date, but I want to be able to parse as a custom type.
What were you expecting to happen?
I was expecting this, but it would nice to have some more control.
I have a solution to allow a new config item, that will pass a format and return a type string:
Any logs, error output, etc?
N/A
Any other comments?
Happy to implement this as a PR
What versions are you using?
Operating System: …
Package Version: …
Browser Version: …
The text was updated successfully, but these errors were encountered: