Skip to content

Commit

Permalink
Fix fields in TS (rust-diplomat#557)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertbastian authored Jul 17, 2024
1 parent 540a68f commit 3b875c6
Show file tree
Hide file tree
Showing 12 changed files with 2 additions and 29 deletions.
2 changes: 0 additions & 2 deletions example/js2/api/FixedDecimalFormatterOptions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ import type { FixedDecimalGroupingStrategy } from "./FixedDecimalGroupingStrateg
import type { pointer, char } from "./diplomat-runtime.d.ts";

export class FixedDecimalFormatterOptions {
#groupingStrategy;
get groupingStrategy() : FixedDecimalGroupingStrategy;
set groupingStrategy(value: FixedDecimalGroupingStrategy);
#someOtherConfig;
get someOtherConfig() : boolean;
set someOtherConfig(value: boolean);

Expand Down
3 changes: 0 additions & 3 deletions feature_tests/js2/api/BorrowedFields.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion feature_tests/js2/api/BorrowedFieldsReturning.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions feature_tests/js2/api/BorrowedFieldsWithBounds.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion feature_tests/js2/api/CyclicStructA.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion feature_tests/js2/api/CyclicStructB.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions feature_tests/js2/api/ErrorStruct.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions feature_tests/js2/api/ImportedStruct.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions feature_tests/js2/api/MyStruct.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions feature_tests/js2/api/NestedBorrowedFields.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions feature_tests/js2/api/OptionStruct.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions tool/templates/js2/struct.js.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
{% endif -%}
export class {{type_name}} {
{%- for field in fields %}
{% if !typescript -%}
#{{field.field_name}};
{% endif -%}
get {{field.field_name}}() {% if typescript %}: {{field.js_type_name}};{% else %} {
return this.#{{field.field_name}};
}{% endif %}
Expand Down

0 comments on commit 3b875c6

Please sign in to comment.