mirror of
https://github.com/BrianHicks/elm-duet.git
synced 2024-08-17 01:20:49 +03:00
this doesn't need quoting
This commit is contained in:
parent
595396604b
commit
74990e6ce9
@ -52,7 +52,7 @@ type Flags = {
|
||||
}
|
||||
|
||||
(config: {
|
||||
flags: "Flags";
|
||||
flags: Flags;
|
||||
node: HTMLElement;
|
||||
}): void
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -12,7 +12,7 @@ type Flags = {
|
||||
}
|
||||
|
||||
(config: {
|
||||
flags: "Flags";
|
||||
flags: Flags;
|
||||
node: HTMLElement;
|
||||
}): void
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user