Skip to content

Commit e49134a

Browse files
refactor(enhanced): use SharePluginOptions['experiments'] inline
Drop local ShareExperiments alias in SharePlugin and rely on declaration-derived type. Keeps schema and types in sync.
1 parent 5055669 commit e49134a

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

packages/enhanced/src/lib/sharing/SharePlugin.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,13 @@ const validate = createSchemaValidation(
2828
},
2929
);
3030

31-
type ShareExperiments = {
32-
// Enable alias-aware consuming via NormalModuleFactory.afterResolve (experimental)
33-
aliasConsumption?: boolean;
34-
};
31+
// Use declaration-derived type directly where needed; no local alias.
3532

3633
class SharePlugin {
3734
private _shareScope: string | string[];
3835
private _consumes: Record<string, ConsumesConfig>[];
3936
private _provides: Record<string, ProvidesConfig>[];
40-
private _experiments?: ShareExperiments;
37+
private _experiments?: SharePluginOptions['experiments'];
4138

4239
constructor(options: SharePluginOptions) {
4340
validate(options);
@@ -106,7 +103,9 @@ class SharePlugin {
106103
this._provides = provides;
107104
// keep experiments object if present (validated by schema)
108105
// includes only aliasConsumption (experimental)
109-
this._experiments = options.experiments as ShareExperiments | undefined;
106+
this._experiments = options.experiments as
107+
| SharePluginOptions['experiments']
108+
| undefined;
110109
}
111110

112111
/**

0 commit comments

Comments
 (0)