fix(tl): fix optionals generation

i am fucking dumb
This commit is contained in:
teidesu 2021-07-05 22:46:36 +03:00
parent ed0198f057
commit 6215892090

View file

@ -170,9 +170,9 @@ const writeSingleSchemaEntry = (type) => {
if (arg.description) ts.comment(arg.description)
ts.write(
`readonly ${arg.name}${arg.optional}: ${fullTypeName(
arg.type
)};`
`readonly ${arg.name}${
arg.optional ? '?' : ''
}: ${fullTypeName(arg.type)};`
)
})
}