expo-modules-macros 0.18.0 → 0.19.0

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/build/types.d.ts CHANGED
@@ -44,7 +44,9 @@ export type TypeNode = {
44
44
  throws: boolean;
45
45
  }
46
46
  /**
47
- * Any other named type; `name` may be qualified.
47
+ * Any other named type. When `refKind` is present, `name` is the declaration's qualified name,
48
+ * equal to the `name` of the matching entry in the surface (`Encoding` written in `Options` reports
49
+ * `Options.Encoding`). Otherwise it is the spelling as written, which may be qualified.
48
50
  *
49
51
  * `refKind` says which of this surface's arrays declares that name, so you don't have to look it
50
52
  * up. It is absent when the scan declares no such type: a platform convertible (`CGPoint`, `URL`)
@@ -106,6 +108,7 @@ export interface ExportedRecordProperty {
106
108
  }
107
109
  /** An `@ExpoModule` type and its `@JS` surface. */
108
110
  export interface ExportedModule {
111
+ /** The Swift class name. A module is always declared at file scope. */
109
112
  name: string;
110
113
  /** The JS module name: `@ExpoModule("Foo")` override, else the class name. */
111
114
  jsName: string;
@@ -122,7 +125,11 @@ export interface ExportedModule {
122
125
  }
123
126
  /** One entry of `@ExpoModule(classes: [...])`. */
124
127
  export interface ExportedClass {
125
- /** The Swift name as spelled in the argument, e.g. `Database` or `Outer.Statement`. */
128
+ /**
129
+ * The `name` of the matching shared object, which is qualified when the class is nested
130
+ * (`Outer.Statement`). The Swift name as spelled in the argument when the scan found no shared
131
+ * object with this name.
132
+ */
126
133
  name: string;
127
134
  /**
128
135
  * The name of the module member JS reads the class from: the matching shared object's `jsName`.
@@ -147,7 +154,12 @@ export interface ExportedEvent {
147
154
  }
148
155
  /** A `@SharedObject` type: a JS class with an optional constructor plus its `@JS` members. */
149
156
  export interface ExportedSharedObject {
157
+ /** The Swift class name, qualified with the types it is nested in (`Outer.Player`). */
150
158
  name: string;
159
+ /**
160
+ * The JS class name: `@SharedObject("Foo")` override, else the class name without the enclosing
161
+ * types.
162
+ */
151
163
  jsName: string;
152
164
  /** The `@JS init` parameters, or absent when there's none. At most one constructor. */
153
165
  constructorParameters?: ExportedParameter[];
@@ -158,6 +170,7 @@ export interface ExportedSharedObject {
158
170
  }
159
171
  /** A `@Record` type and its properties. */
160
172
  export interface ExportedRecord {
173
+ /** The Swift type name, qualified with the types it is nested in (`Outer.Options`). */
161
174
  name: string;
162
175
  properties: ExportedRecordProperty[];
163
176
  file: string;
@@ -184,6 +197,7 @@ export interface ExportedEnumCase {
184
197
  * Detected by conformance, not by a macro attribute, so it carries no `jsName`.
185
198
  */
186
199
  export interface ExportedEnum {
200
+ /** The Swift enum name, qualified with the types it is nested in (`Options.Encoding`). */
187
201
  name: string;
188
202
  /** The raw value type as written, absent for a bare `Enumerable` conformance with no raw type. */
189
203
  rawType?: TypeNode;
@@ -208,6 +222,7 @@ export interface ExportedUnionMember {
208
222
  * wins. Reordering them describes a different union than the one the module runs.
209
223
  */
210
224
  export interface ExportedUnion {
225
+ /** The Swift enum name, qualified with the types it is nested in (`Options.Value`). */
211
226
  name: string;
212
227
  members: ExportedUnionMember[];
213
228
  file: string;
@@ -277,4 +292,4 @@ export interface ScanExportsResult {
277
292
  * as a clear error instead of silently misread fields.
278
293
  */
279
294
  export declare const SUPPORTED_SCAN_MODULES_SCHEMA_VERSION = 2;
280
- export declare const SUPPORTED_SCAN_EXPORTS_SCHEMA_VERSION = 6;
295
+ export declare const SUPPORTED_SCAN_EXPORTS_SCHEMA_VERSION = 7;
package/build/types.js CHANGED
@@ -12,4 +12,4 @@ exports.SUPPORTED_SCAN_EXPORTS_SCHEMA_VERSION = exports.SUPPORTED_SCAN_MODULES_S
12
12
  * as a clear error instead of silently misread fields.
13
13
  */
14
14
  exports.SUPPORTED_SCAN_MODULES_SCHEMA_VERSION = 2;
15
- exports.SUPPORTED_SCAN_EXPORTS_SCHEMA_VERSION = 6;
15
+ exports.SUPPORTED_SCAN_EXPORTS_SCHEMA_VERSION = 7;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-modules-macros",
3
- "version": "0.18.0",
3
+ "version": "0.19.0",
4
4
  "description": "Swift macro plugin for Expo modules",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -23,7 +23,7 @@
23
23
  "typescript": "^5.4.0"
24
24
  },
25
25
  "optionalDependencies": {
26
- "@expo/modules-macros-win32-arm64": "0.18.0",
27
- "@expo/modules-macros-win32-x64": "0.18.0"
26
+ "@expo/modules-macros-win32-arm64": "0.19.0",
27
+ "@expo/modules-macros-win32-x64": "0.19.0"
28
28
  }
29
29
  }