fix(tl): made randomId field required
i wanted to make it auto-fill itself but decided it would be too much hassle
This commit is contained in:
parent
8b6d587399
commit
ed0198f057
1 changed files with 5 additions and 7 deletions
|
@ -170,12 +170,9 @@ const writeSingleSchemaEntry = (type) => {
|
||||||
if (arg.description) ts.comment(arg.description)
|
if (arg.description) ts.comment(arg.description)
|
||||||
|
|
||||||
ts.write(
|
ts.write(
|
||||||
`readonly ${arg.name}${
|
`readonly ${arg.name}${arg.optional}: ${fullTypeName(
|
||||||
arg.optional ||
|
arg.type
|
||||||
(arg.name === 'randomId' && arg.type === 'Long')
|
)};`
|
||||||
? '?'
|
|
||||||
: ''
|
|
||||||
}: ${fullTypeName(arg.type)};`
|
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -228,7 +225,8 @@ const writeSingleSchemaEntry = (type) => {
|
||||||
)} = function (obj) {
|
)} = function (obj) {
|
||||||
switch (obj._) {
|
switch (obj._) {
|
||||||
${union.subtypes
|
${union.subtypes
|
||||||
.map((typ) => `case '${prefix_}${typ}':`).join('')}return true;
|
.map((typ) => `case '${prefix_}${typ}':`)
|
||||||
|
.join('')}return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
};`)
|
};`)
|
||||||
|
|
Loading…
Reference in a new issue