UNPKG

@teambit/workspace

Version:
51 lines (50 loc) 1.43 kB
import type { ComponentID, Snap, State } from '@teambit/component'; import { Component, TagMap } from '@teambit/component'; import type { IssuesList } from '@teambit/component-issues'; import type { Workspace } from '../workspace'; import type { ComponentStatus } from './component-status'; export declare class WorkspaceComponent extends Component { /** * component ID represented by the `ComponentId` type. */ readonly id: ComponentID; /** * head version of the component. can be `null` for new components. */ readonly head: Snap | null; /** * tags of the component. */ readonly tags: TagMap; /** * workspace extension. */ readonly workspace: Workspace; constructor( /** * component ID represented by the `ComponentId` type. */ id: ComponentID, /** * head version of the component. can be `null` for new components. */ head: (Snap | null) | undefined, /** * state of the component. */ workspaceState: State, /** * tags of the component. */ tags: TagMap | undefined, /** * workspace extension. */ workspace: Workspace); getStatus(): Promise<ComponentStatus>; /** * get all issues reported on the component. */ getIssues(): IssuesList | null; static fromComponent(component: Component, workspace: Workspace): WorkspaceComponent; }