Kaynağa Gözat

Names a `ViewsWithPullRequests` type

main
Eric Amodio 3 yıl önce
ebeveyn
işleme
4a4dc24dd7
2 değiştirilmiş dosya ile 10 ekleme ve 10 silme
  1. +3
    -10
      src/views/nodes/pullRequestNode.ts
  2. +7
    -0
      src/views/viewBase.ts

+ 3
- 10
src/views/nodes/pullRequestNode.ts Dosyayı Görüntüle

@ -3,25 +3,18 @@ import { ThemeColor, ThemeIcon, TreeItem, TreeItemCollapsibleState } from 'vscod
import { Colors } from '../../constants';
import { GitBranch, GitCommit, PullRequest, PullRequestState } from '../../git/git';
import { GitUri } from '../../git/gitUri';
import { BranchesView } from '../branchesView';
import { CommitsView } from '../commitsView';
import { ContributorsView } from '../contributorsView';
import { RemotesView } from '../remotesView';
import { RepositoriesView } from '../repositoriesView';
import { SearchAndCompareView } from '../searchAndCompareView';
import { ViewsWithPullRequests } from '../viewBase';
import { RepositoryNode } from './repositoryNode';
import { ContextValues, ViewNode } from './viewNode';
export class PullRequestNode extends ViewNode<
BranchesView | CommitsView | ContributorsView | RemotesView | RepositoriesView | SearchAndCompareView
> {
export class PullRequestNode extends ViewNode<ViewsWithPullRequests> {
static key = ':pullrequest';
static getId(repoPath: string, id: string, ref: string): string {
return `${RepositoryNode.getId(repoPath)}${this.key}(${id}):${ref}`;
}
constructor(
view: BranchesView | CommitsView | ContributorsView | RemotesView | RepositoriesView | SearchAndCompareView,
view: ViewsWithPullRequests,
parent: ViewNode,
public readonly pullRequest: PullRequest,
public readonly branchOrCommit: GitBranch | GitCommit,

+ 7
- 0
src/views/viewBase.ts Dosyayı Görüntüle

@ -66,6 +66,13 @@ export type ViewsWithCommits =
| RepositoriesView
| SearchAndCompareView
| TagsView;
export type ViewsWithPullRequests =
| BranchesView
| CommitsView
| ContributorsView
| RemotesView
| RepositoriesView
| SearchAndCompareView;
export interface TreeViewNodeCollapsibleStateChangeEvent<T> extends TreeViewExpansionEvent<T> {
state: TreeItemCollapsibleState;

Yükleniyor…
İptal
Kaydet