Skip to content

Commit

Permalink
Remove question mark in Data.Map instance
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasjm committed Dec 6, 2024
1 parent 35a6414 commit 0cf43e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Data/Aeson/TypeScript/Instances.hs
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ instance (TypeScript a, TypeScript b, A.ToJSONKey a) => TypeScript (Map a b) whe
let k = getTypeScriptKeyType @a Proxy
v = getTypeScriptType @b Proxy
in const $ case A.toJSONKey @a of
A.ToJSONKeyText{} -> "{[k in " <> k <> "]?: " <> v <> "}"
A.ToJSONKeyValue{} -> getTypeScriptType @[(a, b)] Proxy
A.ToJSONKeyText {} -> "{[k in " <> k <> "]: " <> v <> "}"
A.ToJSONKeyValue {} -> getTypeScriptType @[(a, b)] Proxy
getParentTypes = const $ L.nub [TSType @a Proxy, TSType @b Proxy]

instance (TypeScript a, TypeScript b, A.ToJSONKey a) => TypeScript (HashMap a b) where
Expand Down

0 comments on commit 0cf43e7

Please sign in to comment.