Skip to content

Commit

Permalink
skip serializing types of parameters
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Cameron <[email protected]>
  • Loading branch information
nrc committed Jan 26, 2025
1 parent 6fc0b9c commit 38aeaee
Show file tree
Hide file tree
Showing 68 changed files with 10 additions and 460 deletions.
4 changes: 3 additions & 1 deletion docs/kcl/e.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ excerpt: "Return the value of Euler’s number `e`."
layout: manual
---

Return the value of Euler’s number `e`.
**WARNING:** This function is deprecated.

Return the value of Euler’s number `e`.

**DEPRECATED** use the constant E

```js
e() -> number
Expand Down
4 changes: 3 additions & 1 deletion docs/kcl/pi.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ excerpt: "Return the value of `pi`. Archimedes’ constant (π)."
layout: manual
---

Return the value of `pi`. Archimedes’ constant (π).
**WARNING:** This function is deprecated.

Return the value of `pi`. Archimedes’ constant (π).

**DEPRECATED** use the constant PI

```js
pi() -> number
Expand Down
4 changes: 3 additions & 1 deletion docs/kcl/tau.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ excerpt: "Return the value of `tau`. The full circle constant (τ). Equal to 2π
layout: manual
---

Return the value of `tau`. The full circle constant (τ). Equal to 2π.
**WARNING:** This function is deprecated.

Return the value of `tau`. The full circle constant (τ). Equal to 2π.

**DEPRECATED** use the constant TAU

```js
tau() -> number
Expand Down
3 changes: 1 addition & 2 deletions src/wasm-lib/kcl/src/parsing/ast/types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2983,8 +2983,7 @@ pub struct Parameter {
pub identifier: Node<Identifier>,
/// The type of the parameter.
/// This is optional if the user defines a type.
#[serde(default, skip_serializing_if = "Option::is_none")]
#[ts(skip)]
#[serde(skip)]
pub type_: Option<FnArgType>,
/// Is the parameter optional?
/// If so, what is its default value?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@ expression: actual
"start": 7,
"type": "Identifier"
},
"type_": {
"None": null,
"type": "Primitive",
"type": "Number"
},
"default_value": {
"type": "Literal",
"type": "Literal",
Expand Down
10 changes: 0 additions & 10 deletions src/wasm-lib/kcl/tests/add_lots/program_memory.snap
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,6 @@ description: Program memory after executing add_lots.kcl
"name": "num",
"start": 1414,
"type": "Identifier"
},
"type_": {
"Rad": null,
"type": "Primitive",
"type": "Number"
}
}
],
Expand Down Expand Up @@ -309,11 +304,6 @@ description: Program memory after executing add_lots.kcl
"name": "num",
"start": 1414,
"type": "Identifier"
},
"type_": {
"Rad": null,
"type": "Primitive",
"type": "Number"
}
}
],
Expand Down
5 changes: 0 additions & 5 deletions src/wasm-lib/kcl/tests/angled_line/program_memory.snap
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,6 @@ description: Program memory after executing angled_line.kcl
"name": "num",
"start": 1414,
"type": "Identifier"
},
"type_": {
"Rad": null,
"type": "Primitive",
"type": "Number"
}
}
],
Expand Down
5 changes: 0 additions & 5 deletions src/wasm-lib/kcl/tests/array_elem_pop/program_memory.snap
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,6 @@ description: Program memory after executing array_elem_pop.kcl
"name": "num",
"start": 1414,
"type": "Identifier"
},
"type_": {
"Rad": null,
"type": "Primitive",
"type": "Number"
}
}
],
Expand Down
5 changes: 0 additions & 5 deletions src/wasm-lib/kcl/tests/array_elem_push/program_memory.snap
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,6 @@ description: Program memory after executing array_elem_push.kcl
"name": "num",
"start": 1414,
"type": "Identifier"
},
"type_": {
"Rad": null,
"type": "Primitive",
"type": "Number"
}
}
],
Expand Down
5 changes: 0 additions & 5 deletions src/wasm-lib/kcl/tests/array_range_expr/program_memory.snap
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,6 @@ description: Program memory after executing array_range_expr.kcl
"name": "num",
"start": 1414,
"type": "Identifier"
},
"type_": {
"Rad": null,
"type": "Primitive",
"type": "Number"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,6 @@ description: Program memory after executing array_range_negative_expr.kcl
"name": "num",
"start": 1414,
"type": "Identifier"
},
"type_": {
"Rad": null,
"type": "Primitive",
"type": "Number"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,6 @@ description: Program memory after executing artifact_graph_example_code1.kcl
"name": "num",
"start": 1414,
"type": "Identifier"
},
"type_": {
"Rad": null,
"type": "Primitive",
"type": "Number"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,6 @@ description: Program memory after executing artifact_graph_example_code_no_3d.kc
"name": "num",
"start": 1414,
"type": "Identifier"
},
"type_": {
"Rad": null,
"type": "Primitive",
"type": "Number"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,6 @@ description: Program memory after executing artifact_graph_example_code_offset_p
"name": "num",
"start": 1414,
"type": "Identifier"
},
"type_": {
"Rad": null,
"type": "Primitive",
"type": "Number"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,6 @@ description: Program memory after executing artifact_graph_sketch_on_face_etc.kc
"name": "num",
"start": 1414,
"type": "Identifier"
},
"type_": {
"Rad": null,
"type": "Primitive",
"type": "Number"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,6 @@ description: Program memory after executing basic_fillet_cube_close_opposite.kcl
"name": "num",
"start": 1414,
"type": "Identifier"
},
"type_": {
"Rad": null,
"type": "Primitive",
"type": "Number"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,6 @@ description: Program memory after executing basic_fillet_cube_end.kcl
"name": "num",
"start": 1414,
"type": "Identifier"
},
"type_": {
"Rad": null,
"type": "Primitive",
"type": "Number"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,6 @@ description: Program memory after executing basic_fillet_cube_next_adjacent.kcl
"name": "num",
"start": 1414,
"type": "Identifier"
},
"type_": {
"Rad": null,
"type": "Primitive",
"type": "Number"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,6 @@ description: Program memory after executing basic_fillet_cube_previous_adjacent.
"name": "num",
"start": 1414,
"type": "Identifier"
},
"type_": {
"Rad": null,
"type": "Primitive",
"type": "Number"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,6 @@ description: Program memory after executing basic_fillet_cube_start.kcl
"name": "num",
"start": 1414,
"type": "Identifier"
},
"type_": {
"Rad": null,
"type": "Primitive",
"type": "Number"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,6 @@ description: Program memory after executing big_number_angle_to_match_length_x.k
"name": "num",
"start": 1414,
"type": "Identifier"
},
"type_": {
"Rad": null,
"type": "Primitive",
"type": "Number"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,6 @@ description: Program memory after executing big_number_angle_to_match_length_y.k
"name": "num",
"start": 1414,
"type": "Identifier"
},
"type_": {
"Rad": null,
"type": "Primitive",
"type": "Number"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,6 @@ description: Program memory after executing boolean_logical_and.kcl
"name": "num",
"start": 1414,
"type": "Identifier"
},
"type_": {
"Rad": null,
"type": "Primitive",
"type": "Number"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,6 @@ description: Program memory after executing boolean_logical_multiple.kcl
"name": "num",
"start": 1414,
"type": "Identifier"
},
"type_": {
"Rad": null,
"type": "Primitive",
"type": "Number"
}
}
],
Expand Down
5 changes: 0 additions & 5 deletions src/wasm-lib/kcl/tests/boolean_logical_or/program_memory.snap
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,6 @@ description: Program memory after executing boolean_logical_or.kcl
"name": "num",
"start": 1414,
"type": "Identifier"
},
"type_": {
"Rad": null,
"type": "Primitive",
"type": "Number"
}
}
],
Expand Down
5 changes: 0 additions & 5 deletions src/wasm-lib/kcl/tests/circle_three_point/program_memory.snap
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,6 @@ description: Program memory after executing circle_three_point.kcl
"name": "num",
"start": 1414,
"type": "Identifier"
},
"type_": {
"Rad": null,
"type": "Primitive",
"type": "Number"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,6 @@ description: Program memory after executing circular_pattern3d_a_pattern.kcl
"name": "num",
"start": 1414,
"type": "Identifier"
},
"type_": {
"Rad": null,
"type": "Primitive",
"type": "Number"
}
}
],
Expand Down
5 changes: 0 additions & 5 deletions src/wasm-lib/kcl/tests/comparisons/program_memory.snap
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,6 @@ description: Program memory after executing comparisons.kcl
"name": "num",
"start": 1414,
"type": "Identifier"
},
"type_": {
"Rad": null,
"type": "Primitive",
"type": "Number"
}
}
],
Expand Down
5 changes: 0 additions & 5 deletions src/wasm-lib/kcl/tests/computed_var/program_memory.snap
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,6 @@ description: Program memory after executing computed_var.kcl
"name": "num",
"start": 1414,
"type": "Identifier"
},
"type_": {
"Rad": null,
"type": "Primitive",
"type": "Number"
}
}
],
Expand Down
10 changes: 0 additions & 10 deletions src/wasm-lib/kcl/tests/cube/program_memory.snap
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,6 @@ description: Program memory after executing cube.kcl
"name": "num",
"start": 1414,
"type": "Identifier"
},
"type_": {
"Rad": null,
"type": "Primitive",
"type": "Number"
}
}
],
Expand Down Expand Up @@ -921,11 +916,6 @@ description: Program memory after executing cube.kcl
"name": "num",
"start": 1414,
"type": "Identifier"
},
"type_": {
"Rad": null,
"type": "Primitive",
"type": "Number"
}
}
],
Expand Down
Loading

0 comments on commit 38aeaee

Please sign in to comment.