Cope with unit type in JSON (#262)

This commit is contained in:
Patrick Stevens
2024-09-15 15:37:50 +01:00
committed by GitHub
parent e22525c200
commit 9a3ebbf28f
7 changed files with 29 additions and 1 deletions

View File

@@ -280,6 +280,7 @@ module internal JsonParseGenerator =
parseNumberType options propertyName node primType
|> SynExpr.pipeThroughFunction (Measure.getLanguagePrimitivesMeasure primType)
| JsonNode -> node
| Unit -> SynExpr.CreateConst ()
| _ ->
// Let's just hope that we've also got our own type annotation!
let typeName =