this doesn't need quoting

This commit is contained in:
Brian Hicks 2024-04-11 06:09:34 -05:00
parent 595396604b
commit 74990e6ce9
No known key found for this signature in database
GPG Key ID: C4F324B9CAAB0D50
3 changed files with 5 additions and 3 deletions

View File

@ -52,7 +52,7 @@ type Flags = {
}
(config: {
flags: "Flags";
flags: Flags;
node: HTMLElement;
}): void

View File

@ -6,6 +6,7 @@ pub enum TSType {
Object(BTreeMap<String, TSType>),
Scalar(&'static str),
StringScalar(String),
TypeRef(String),
Union(Vec<TSType>),
Function {
args: BTreeMap<String, TSType>,
@ -59,6 +60,7 @@ impl TSType {
out.push_str(string);
out.push('"');
}
Self::TypeRef(ref_) => out.push_str(ref_),
Self::Union(types) => {
for (i, type_) in types.iter().enumerate() {
if i != 0 {
@ -113,7 +115,7 @@ impl TSType {
}
pub fn new_ref(name: String) -> Self {
Self::StringScalar(name)
Self::TypeRef(name)
}
pub fn to_init(self) -> Self {

View File

@ -12,7 +12,7 @@ type Flags = {
}
(config: {
flags: "Flags";
flags: Flags;
node: HTMLElement;
}): void