KCL: Reduce can take and return any KCL values (#4094)

Previously it only took Array of Number and could only return Sketch.

Now it has been unshackled from the chains of poor type signatures.
This commit is contained in:
Adam Chalmers
2024-10-04 13:26:16 -05:00
committed by GitHub
parent 4e0dd12f5a
commit ec8cacb788
7 changed files with 12576 additions and 1384 deletions

View File

@ -83,6 +83,8 @@ impl StdLibFnArg {
return Ok(Some((index, format!("${{{}:{}}}", index, "myTag"))));
} else if self.type_ == "[KclValue]" && self.required {
return Ok(Some((index, format!("${{{}:{}}}", index, "[0..9]"))));
} else if self.type_ == "KclValue" && self.required {
return Ok(Some((index, format!("${{{}:{}}}", index, "3"))));
}
get_autocomplete_snippet_from_schema(&self.schema.schema.clone().into(), index)
}