correct type usages

This commit is contained in:
Niels Lyngsø
2023-01-23 22:44:37 +01:00
parent 40e6ad99c8
commit 30b1bb4abc
2 changed files with 10 additions and 8 deletions

View File

@@ -3,12 +3,13 @@ import { css, html } from 'lit';
import { customElement, state } from 'lit/decorators.js';
import '../collection.element';
import { ifDefined } from 'lit-html/directives/if-defined.js';
import { UmbMediaDetailStore } from 'src/backoffice/media/media/media.detail.store';
import { UmbMediaTreeStore } from '../../../media/media/media.tree.store';
import {
UmbCollectionContext,
UMB_COLLECTION_CONTEXT_TOKEN,
} from 'src/backoffice/shared/collection/collection.context';
import type { ManifestDashboardCollection, MediaDetails } from '@umbraco-cms/models';
} from '../../../shared/collection/collection.context';
import type { ManifestDashboardCollection } from '@umbraco-cms/models';
import type { FolderTreeItem } from '@umbraco-cms/backend-api';
import { UmbLitElement } from '@umbraco-cms/element';
@customElement('umb-dashboard-collection')
@@ -26,7 +27,8 @@ export class UmbDashboardCollectionElement extends UmbLitElement {
`,
];
private _collectionContext?: UmbCollectionContext<MediaDetails, UmbMediaDetailStore>;
// TODO: Use the right type here:
private _collectionContext?: UmbCollectionContext<FolderTreeItem, UmbMediaTreeStore>;
public manifest!: ManifestDashboardCollection;

View File

@@ -3,16 +3,16 @@ import { UUITextStyles } from '@umbraco-ui/uui-css/lib';
import { customElement } from 'lit/decorators.js';
import { ifDefined } from 'lit-html/directives/if-defined.js';
import { UmbWorkspaceContentContext } from '../../workspace-content.context';
import { UmbMediaTreeStore } from '../../../../../../media/media/media.tree.store';
import {
UmbCollectionContext,
UMB_COLLECTION_CONTEXT_TOKEN,
} from 'src/backoffice/shared/collection/collection.context';
import { UmbMediaDetailStore } from 'src/backoffice/media/media/media.detail.store';
} from '../../../../../../shared/collection/collection.context';
import '../../../../../../shared/components/content-property/content-property.element';
import '../../../../../../shared/collection/dashboards/dashboard-collection.element';
import { UmbLitElement } from '@umbraco-cms/element';
import type { MediaDetails } from '@umbraco-cms/models';
import { FolderTreeItem } from '@umbraco-cms/backend-api';
@customElement('umb-workspace-view-collection')
export class UmbWorkspaceViewCollectionElement extends UmbLitElement {
@@ -28,7 +28,7 @@ export class UmbWorkspaceViewCollectionElement extends UmbLitElement {
private _workspaceContext?: UmbWorkspaceContentContext;
private _collectionContext?: UmbCollectionContext<MediaDetails, UmbMediaDetailStore>;
private _collectionContext?: UmbCollectionContext<FolderTreeItem, UmbMediaTreeStore>;
constructor() {
super();