rename map

This commit is contained in:
Niels Lyngsø
2024-09-13 11:36:30 +02:00
parent 69cd51e4f3
commit 24fceeb5dc
2 changed files with 17 additions and 9 deletions

View File

@@ -20,7 +20,7 @@ export interface ManifestBlockEditorCustomView extends ManifestElement<UmbBlockE
}
declare global {
interface UmbManifestType {
interface UmbExtensionManifestMap {
blockEditorCustomView: ManifestBlockEditorCustomView;
}
}

View File

@@ -226,15 +226,23 @@ declare global {
/**
* This global type allows to declare manifests types from its own module.
* @example
* ```js
declare global {
interface UmbManifestType {
My_UNIQUE_MANIFEST_NAME: ManifestTypes;
```js
declare global {
interface UmbExtensionManifestMap {
My_UNIQUE_MANIFEST_NAME: MyExtensionManifestType;
}
}
```
If you have multiple types, you can declare them in this way:
```js
declare global {
interface UmbExtensionManifestMap {
My_UNIQUE_MANIFEST_NAME: MyExtensionManifestTypeA | MyExtensionManifestTypeB;
}
}
}
* ```
```
*/
interface UmbManifestType {
interface UmbExtensionManifestMap {
UMB_CORE: ManifestTypes;
}
@@ -242,5 +250,5 @@ declare global {
* This global type provides a union of all declared manifest types.
* If this is a local package that declares additional Manifest Types, then these will also be included in this union.
*/
type UmbExtensionManifest = UnionOfProperties<UmbManifestType>;
type UmbExtensionManifest = UnionOfProperties<UmbExtensionManifestMap>;
}