@openpkg-ts/sdk 0.47.2 → 0.48.1
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.ts +24 -0
- package/dist/index.js +398 -347
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -156,6 +156,16 @@ interface ExportVerification {
|
|
|
156
156
|
interface OpenpkgConfig {
|
|
157
157
|
/** Configuration for resolving external package re-exports */
|
|
158
158
|
externals?: ExternalsConfig;
|
|
159
|
+
/**
|
|
160
|
+
* Expand referenced types from third-party packages instead of recording
|
|
161
|
+
* them as opaque stubs. `true` follows every dependency; a string[] follows
|
|
162
|
+
* only the named packages (by declaring package name). Default: stub.
|
|
163
|
+
*/
|
|
164
|
+
followExternal?: boolean | string[];
|
|
165
|
+
/** Only extract these exports (supports * wildcards). */
|
|
166
|
+
only?: string[];
|
|
167
|
+
/** Ignore these exports (supports * wildcards). */
|
|
168
|
+
ignore?: string[];
|
|
159
169
|
}
|
|
160
170
|
/** Default config filename */
|
|
161
171
|
declare const CONFIG_FILENAME = "openpkg.config.json";
|
|
@@ -1197,6 +1207,20 @@ interface SerializerContext {
|
|
|
1197
1207
|
* of the full member surface. Unset → expand everything (unit-test contexts).
|
|
1198
1208
|
*/
|
|
1199
1209
|
shouldExpandExternal?: (symbol: ts.Symbol) => boolean;
|
|
1210
|
+
/**
|
|
1211
|
+
* Collision-safe type identity, keyed by DECLARATION (so an import alias and
|
|
1212
|
+
* the original type collapse to one id, but two genuinely different types
|
|
1213
|
+
* named `Logger` get distinct ids). `typeIds` caches symbol → id; `declIds`
|
|
1214
|
+
* maps a declaration key → id; `idOwner` maps an assigned id → the declaration
|
|
1215
|
+
* key that owns it. The first declaration to claim a bare name keeps it (no
|
|
1216
|
+
* churn for the common case); later distinct declarations with the same name
|
|
1217
|
+
* get a package-scoped id. Both ref emission and registration read these.
|
|
1218
|
+
*/
|
|
1219
|
+
typeIds: Map<ts.Symbol, string>;
|
|
1220
|
+
declIds: Map<string, string>;
|
|
1221
|
+
idOwner: Map<string, string>;
|
|
1222
|
+
/** Workspace package name → dir, used to package-scope colliding type ids. */
|
|
1223
|
+
workspacePackages: ReadonlyMap<string, string>;
|
|
1200
1224
|
}
|
|
1201
1225
|
declare class TypeRegistry {
|
|
1202
1226
|
private types;
|