Procházet zdrojové kódy

Names a `ViewsWithPullRequests` type

main
Eric Amodio před 3 roky
rodič
revize
4a4dc24dd7
2 změnil soubory, kde provedl 10 přidání a 10 odebrání
  1. +3
    -10
      src/views/nodes/pullRequestNode.ts
  2. +7
    -0
      src/views/viewBase.ts

+ 3
- 10
src/views/nodes/pullRequestNode.ts Zobrazit soubor

@ -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 Zobrazit soubor

@ -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;

Načítá se…
Zrušit
Uložit