Skip to content

Commit a4a3329

Browse files
committed
remove redundant interface
1 parent 02cab79 commit a4a3329

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/packages/core/icon-registry/icon.registry.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1+
import type { UmbIconDefinition } from './types.js';
12
import { type UUIIconHost, UUIIconRegistry } from '@umbraco-cms/backoffice/external/uui';
23

3-
interface UmbIconDescriptor {
4-
name: string;
5-
path: string;
6-
}
7-
84
/**
95
* @export
106
* @class UmbIconRegistry
@@ -17,10 +13,10 @@ export class UmbIconRegistry extends UUIIconRegistry {
1713
this.#initResolve = resolve;
1814
});
1915

20-
#icons: UmbIconDescriptor[] = [];
16+
#icons: UmbIconDefinition[] = [];
2117
#unhandledProviders: Map<string, UUIIconHost> = new Map();
2218

23-
setIcons(icons: UmbIconDescriptor[]) {
19+
setIcons(icons: UmbIconDefinition[]) {
2420
const oldIcons = this.#icons;
2521
this.#icons = icons;
2622
if (this.#initResolve) {
@@ -39,7 +35,7 @@ export class UmbIconRegistry extends UUIIconRegistry {
3935
}
4036
});
4137
}
42-
appendIcons(icons: UmbIconDescriptor[]) {
38+
appendIcons(icons: UmbIconDefinition[]) {
4339
this.#icons = [...this.#icons, ...icons];
4440
}
4541
/**
@@ -56,7 +52,7 @@ export class UmbIconRegistry extends UUIIconRegistry {
5652

5753
async #loadIcon(iconName: string, iconProvider: UUIIconHost): Promise<boolean> {
5854
await this.#init;
59-
const iconManifest = this.#icons.find((i: UmbIconDescriptor) => i.name === iconName);
55+
const iconManifest = this.#icons.find((i: UmbIconDefinition) => i.name === iconName);
6056
// Icon not found, so lets add it to a list of unhandled requests.
6157
if (!iconManifest) {
6258
this.#unhandledProviders.set(iconName, iconProvider);

0 commit comments

Comments
 (0)