Skip to content

Commit

Permalink
Add private field comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Salinas authored and Daniel Salinas committed Sep 10, 2024
1 parent db5d739 commit 2dd764a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,15 @@ export const {{ decl_type_name }} = (() => {
{%- call ts::docstring(variant, 4) %}
{%- let variant_name = variant.name()|class_name(ci) %}
class {{ variant_name }} extends UniffiError {
/**
* @private
* This field is private and should not be used.
*/
readonly __uniffiTypeName = "{{ type_name }}";
/**
* @private
* This field is private and should not be used.
*/
readonly __variant = {{ loop.index }};
constructor(message: string) {
super("{{ type_name }}", "{{ variant_name }}", message);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ export const {{ decl_type_name }} = (() => {

{% call ts::docstring(variant, 4) %}
class {{ variant_name }} extends {{ superclass }} implements {{ variant_interface }} {
/**
* @private
* This field is private and should not be used, use `tag` instead.
*/
readonly __uniffiTypeName = "{{ type_name }}";
readonly tag = {{ variant_tag }};
{%- if has_fields %}
Expand Down

0 comments on commit 2dd764a

Please sign in to comment.