Skip to content

Commit c3a7da3

Browse files
authored
[bug] Allow "undefined" like if it was its "null" brethren (#103)
Why === JavaScript likes to have nullish types. We have `null` already, but we missed `undefined`. What changed ============ This change allows `undefined` to be defined. Test plan ========= Codegen gen'd!
1 parent 1c06a0b commit c3a7da3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

replit_river/codegen/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ def extract_props(tpe: RiverType) -> list[dict[str, RiverType]]:
302302
elif type.type == "boolean":
303303
typeddict_encoder.append("x")
304304
return ("bool", ())
305-
elif type.type == "null":
305+
elif type.type == "null" or type.type == "undefined":
306306
typeddict_encoder.append("None")
307307
return ("None", ())
308308
elif type.type == "Date":

0 commit comments

Comments
 (0)