ClassConstructor and ManifestClass type

This commit is contained in:
Niels Lyngsø
2023-02-03 11:54:26 +01:00
parent 5158d1884b
commit ab2d551af3
4 changed files with 66 additions and 57 deletions

View File

@@ -4,11 +4,8 @@ import {
DocumentTypeTreeItem,
EntityTreeItem,
FolderTreeItem,
PagedEntityTreeItem,
ProblemDetails,
} from '@umbraco-cms/backend-api';
import { UmbTreeRepository } from 'libs/repository/tree-repository.interface';
import { Observable } from 'rxjs';
// Extension Manifests
export * from '@umbraco-cms/extensions-registry';
@@ -16,6 +13,8 @@ export * from '@umbraco-cms/extensions-registry';
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export type HTMLElementConstructor<T = HTMLElement> = new (...args: any[]) => T;
export type ClassConstructor<T> = new (...args: any[]) => T;
// Users
// TODO: would the right name be Node? as entity is just something with a Key. But node is something in a content structure, aka. with hasChildren and parentKey.
export interface Entity {
@@ -158,8 +157,3 @@ export interface DataSourceResponse<T = undefined> {
data?: T;
error?: ProblemDetails;
}
// TODO; figure out why we can't add UmbControllerHostInterface as host type
export interface UmbRepositoryFactory {
new (host: any): UmbTreeRepository;
}