Ver código fonte

Decouples storage types from real types

- Hopefully ensures we will get build errors if the types change
main
Eric Amodio 2 anos atrás
pai
commit
06b4982f9b
2 arquivos alterados com 5 adições e 2 exclusões
  1. +2
    -0
      src/plus/webviews/graph/protocol.ts
  2. +3
    -2
      src/storage.ts

+ 2
- 0
src/plus/webviews/graph/protocol.ts Ver arquivo

@ -21,6 +21,8 @@ import type { Subscription } from '../../../subscription';
import type { DateTimeFormat } from '../../../system/date';
import { IpcCommandType, IpcNotificationType } from '../../../webviews/protocol';
export type { GraphRefType } from '@gitkraken/gitkraken-components';
export type GraphColumnsSettings = Record<GraphColumnName, GraphColumnSetting>;
export type GraphSelectedRows = Record</*id*/ string, true>;
export type GraphAvatars = Record</*email*/ string, /*url*/ string>;

+ 3
- 2
src/storage.ts Ver arquivo

@ -1,4 +1,3 @@
import type { GraphRefType } from '@gitkraken/gitkraken-components';
import type { Disposable, Event, ExtensionContext, SecretStorageChangeEvent } from 'vscode';
import { EventEmitter } from 'vscode';
import type { ViewShowBranchComparison } from './config';
@ -235,10 +234,12 @@ export interface StoredGraphColumn {
width?: number;
}
export type StoredGraphRefType = 'head' | 'remote' | 'tag';
export interface StoredGraphHiddenRef {
id: string;
name: string;
type: GraphRefType;
type: StoredGraphRefType;
avatarUrl?: string;
}

Carregando…
Cancelar
Salvar