Feat(jsonschema): convert deferredModule to unknown
This commit is contained in:
@@ -304,6 +304,17 @@ rec {
|
||||
# return jsonschema property definition for raw
|
||||
then
|
||||
exposedModuleInfo // default // example // description // { type = allBasicTypes; }
|
||||
else if
|
||||
# This is a special case for the deferred clan.service 'settings', we assume it is JSON serializable
|
||||
# To get the type of a Deferred modules we need to know the interface of the place where it is evaluated.
|
||||
# i.e. in case of a clan.service this is the interface of the service which dynamically changes depending on the service
|
||||
# We assign "type" = []
|
||||
# This means any value is valid — or like TypeScript’s unknown.
|
||||
# We can assign the type later, when we know the exact interface.
|
||||
# tsType = "unknown" is a type that we preload for json2ts, such that it gets the correct type in typescript
|
||||
(option.type.name == "deferredModule")
|
||||
then
|
||||
exposedModuleInfo // default // example // description // { tsType = "unknown"; }
|
||||
# parse enum
|
||||
else if
|
||||
option.type.name == "enum"
|
||||
|
||||
Reference in New Issue
Block a user