Skip to content

Commit 7c62d8a

Browse files
committed
rename map
1 parent 820fafa commit 7c62d8a

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

src/packages/block/block-custom-view/block-editor-custom-view.extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export interface ManifestBlockEditorCustomView extends ManifestElement<UmbBlockE
2020
}
2121

2222
declare global {
23-
interface UmbManifestType {
23+
interface UmbExtensionManifestMap {
2424
blockEditorCustomView: ManifestBlockEditorCustomView;
2525
}
2626
}

src/packages/core/extension-registry/models/index.ts

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -226,21 +226,29 @@ declare global {
226226
/**
227227
* This global type allows to declare manifests types from its own module.
228228
* @example
229-
* ```js
230-
declare global {
231-
interface UmbManifestType {
232-
My_UNIQUE_MANIFEST_NAME: ManifestTypes;
229+
```js
230+
declare global {
231+
interface UmbExtensionManifestMap {
232+
My_UNIQUE_MANIFEST_NAME: MyExtensionManifestType;
233+
}
234+
}
235+
```
236+
If you have multiple types, you can declare them in this way:
237+
```js
238+
declare global {
239+
interface UmbExtensionManifestMap {
240+
My_UNIQUE_MANIFEST_NAME: MyExtensionManifestTypeA | MyExtensionManifestTypeB;
241+
}
233242
}
234-
}
235-
* ```
243+
```
236244
*/
237-
interface UmbManifestType {
245+
interface UmbExtensionManifestMap {
238246
UMB_CORE: ManifestTypes;
239247
}
240248

241249
/**
242250
* This global type provides a union of all declared manifest types.
243251
* If this is a local package that declares additional Manifest Types, then these will also be included in this union.
244252
*/
245-
type UmbExtensionManifest = UnionOfProperties<UmbManifestType>;
253+
type UmbExtensionManifest = UnionOfProperties<UmbExtensionManifestMap>;
246254
}

0 commit comments

Comments
 (0)