@fern-api/go-dynamic-snippets 1.64.2 → 1.64.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -16,6 +16,17 @@ declare class DynamicTypeInstantiationMapper {
16
16
  context: DynamicSnippetsGeneratorContext;
17
17
  });
18
18
  convert(args: DynamicTypeInstantiationMapper.Args): go.TypeInstantiation;
19
+ /**
20
+ * Follows alias-of-alias hops (e.g. `type B = A`) and unwraps optional/nullable wrappers to
21
+ * find the type an alias ultimately renders as.
22
+ */
23
+ private resolveAliasTarget;
24
+ /**
25
+ * Go cannot take the address of an `any` value directly, so a pointer to an
26
+ * unknown alias is materialized through a local variable.
27
+ */
28
+ private convertUnknownAliasPointer;
29
+ private unwrapOptionalOrNullable;
19
30
  convertToPointerIfPossible(args: DynamicTypeInstantiationMapper.Args): go.TypeInstantiation;
20
31
  private convertList;
21
32
  private convertMap;
@@ -119,7 +130,12 @@ declare class DynamicTypeMapper {
119
130
  * Checks if a named type is an alias that already generates as a pointer in Go
120
131
  * (e.g. a nullable primitive like *time.Time). Traverses alias chains.
121
132
  */
122
- private isAliasToPointerType;
133
+ isAliasToPointerType(typeId: FernIr.dynamic.TypeId): boolean;
134
+ /**
135
+ * Lists, maps, sets, and unknown values are already nil-able, so an optional/nullable
136
+ * wrapper around them renders without a pointer.
137
+ */
138
+ private isPointerRequiredForOptionalInner;
123
139
  private convertLiteral;
124
140
  private convertNamed;
125
141
  private convertUnknown;
package/dist/index.d.ts CHANGED
@@ -16,6 +16,17 @@ declare class DynamicTypeInstantiationMapper {
16
16
  context: DynamicSnippetsGeneratorContext;
17
17
  });
18
18
  convert(args: DynamicTypeInstantiationMapper.Args): go.TypeInstantiation;
19
+ /**
20
+ * Follows alias-of-alias hops (e.g. `type B = A`) and unwraps optional/nullable wrappers to
21
+ * find the type an alias ultimately renders as.
22
+ */
23
+ private resolveAliasTarget;
24
+ /**
25
+ * Go cannot take the address of an `any` value directly, so a pointer to an
26
+ * unknown alias is materialized through a local variable.
27
+ */
28
+ private convertUnknownAliasPointer;
29
+ private unwrapOptionalOrNullable;
19
30
  convertToPointerIfPossible(args: DynamicTypeInstantiationMapper.Args): go.TypeInstantiation;
20
31
  private convertList;
21
32
  private convertMap;
@@ -119,7 +130,12 @@ declare class DynamicTypeMapper {
119
130
  * Checks if a named type is an alias that already generates as a pointer in Go
120
131
  * (e.g. a nullable primitive like *time.Time). Traverses alias chains.
121
132
  */
122
- private isAliasToPointerType;
133
+ isAliasToPointerType(typeId: FernIr.dynamic.TypeId): boolean;
134
+ /**
135
+ * Lists, maps, sets, and unknown values are already nil-able, so an optional/nullable
136
+ * wrapper around them renders without a pointer.
137
+ */
138
+ private isPointerRequiredForOptionalInner;
123
139
  private convertLiteral;
124
140
  private convertNamed;
125
141
  private convertUnknown;