I have a series of documents which look like this:
{
"name": "useMessageIDSeenTimestamp",
"parameters": [{ "name": "messageID", "type": "MessageID" }],
"module": "@electricui/components-core",
"returnType": "number | null"
}
However I'm having trouble typing the parameters field well enough. Using a nested type, the type parameter is overwritten:
{
"name": "useMessageIDSeenTimestamp",
"module": "@electricui/components-core",
"parameters": [
{
"name": "messageID",
"type": "Parameter",
"_raw": {}
}
]
}
Currently we're just using the json type and the TypeScript type is reverting to any, which gives us the data but means we lose TypeScript typing.
Is there a way to 'rename' my type parameter to something like tsType, to avoid having to do it upstream?
I have a series of documents which look like this:
However I'm having trouble typing the
parametersfield well enough. Using a nested type, thetypeparameter is overwritten:Currently we're just using the
jsontype and the TypeScript type is reverting toany, which gives us the data but means we lose TypeScript typing.Is there a way to 'rename' my
typeparameter to something liketsType, to avoid having to do it upstream?