move ClassConstructor to avoid importing from another library

This commit is contained in:
Jacob Overgaard
2023-03-06 15:31:46 +01:00
parent d0c5945f8f
commit afd7c78aa4
4 changed files with 5 additions and 9 deletions

View File

@@ -22,7 +22,6 @@ import type { ManifestWorkspaceAction } from './workspace-action.models';
import type { ManifestWorkspaceView } from './workspace-view.models';
import type { ManifestWorkspaceViewCollection } from './workspace-view-collection.models';
import type { ManifestRepository } from './repository.models';
import type { ClassConstructor } from '@umbraco-cms/models';
export * from './collection-view.models';
export * from './dashboard-collection.models';
@@ -140,6 +139,8 @@ export interface ManifestWithMeta extends ManifestBase {
meta: unknown;
}
export type ClassConstructor<T> = new (...args: any[]) => T;
export interface ManifestEntrypoint extends ManifestBase {
type: 'entrypoint';
js: string;

View File

@@ -1,5 +1,4 @@
import type { ManifestBase } from './models';
import type { ClassConstructor } from '@umbraco-cms/models';
import type { ClassConstructor, ManifestBase } from './models';
export interface ManifestTree extends ManifestBase {
type: 'tree';

View File

@@ -1,7 +1,5 @@
import type { InterfaceColor, InterfaceLook } from '@umbraco-ui/uui-base/lib/types/index';
import type { ManifestElement } from './models';
import { UmbWorkspaceAction } from '@umbraco-cms/workspace';
import type { ClassConstructor } from '@umbraco-cms/models';
import type { ClassConstructor, ManifestElement } from './models';
export interface ManifestWorkspaceAction extends ManifestElement {
type: 'workspaceAction';
@@ -13,5 +11,5 @@ export interface MetaWorkspaceAction {
label?: string; //TODO: Use or implement additional label-key
look?: InterfaceLook;
color?: InterfaceColor;
api: ClassConstructor<UmbWorkspaceAction>;
api: ClassConstructor<any>;
}

View File

@@ -13,8 +13,6 @@ 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 {