|
|
@ -1,24 +1,3 @@ |
|
|
|
declare global { |
|
|
|
export type PartialDeep<T> = T extends Record<string, unknown> ? { [K in keyof T]?: PartialDeep<T[K]> } : T; |
|
|
|
export type PickPartialDeep<T, K extends keyof T> = Omit<Partial<T>, K> & { [P in K]?: Partial<T[P]> }; |
|
|
|
|
|
|
|
export type Mutable<T> = { -readonly [P in keyof T]: T[P] }; |
|
|
|
export type PickMutable<T, K extends keyof T> = Omit<T, K> & { -readonly [P in K]: T[P] }; |
|
|
|
|
|
|
|
export type ExcludeSome<T, K extends keyof T, R> = Omit<T, K> & { [P in K]-?: Exclude<T[P], R> }; |
|
|
|
|
|
|
|
export type ExtractAll<T, U> = { [K in keyof T]: T[K] extends U ? T[K] : never }; |
|
|
|
export type ExtractSome<T, K extends keyof T, R> = Omit<T, K> & { [P in K]-?: Extract<T[P], R> }; |
|
|
|
|
|
|
|
export type RequireSome<T, K extends keyof T> = Omit<T, K> & { [P in K]-?: T[P] }; |
|
|
|
|
|
|
|
export type AllNonNullable<T> = { [P in keyof T]-?: NonNullable<T[P]> }; |
|
|
|
export type SomeNonNullable<T, K extends keyof T> = Omit<T, K> & { [P in K]-?: NonNullable<T[P]> }; |
|
|
|
|
|
|
|
export type NarrowRepo<T extends { repo?: unknown }> = ExcludeSome<T, 'repo', string | undefined>; |
|
|
|
export type NarrowRepos<T extends { repos?: unknown }> = ExcludeSome<T, 'repos', string | string[] | undefined>; |
|
|
|
} |
|
|
|
|
|
|
|
export const quickPickTitleMaxChars = 80; |
|
|
|
export const ImageMimetypes: Record<string, string> = { |
|
|
|
'.png': 'image/png', |
|
|
@ -67,6 +46,7 @@ export const enum Colors { |
|
|
|
|
|
|
|
export const enum Commands { |
|
|
|
ActionPrefix = 'gitlens.action.', |
|
|
|
|
|
|
|
AddAuthors = 'gitlens.addAuthors', |
|
|
|
BrowseRepoAtRevision = 'gitlens.browseRepoAtRevision', |
|
|
|
BrowseRepoAtRevisionInNewWindow = 'gitlens.browseRepoAtRevisionInNewWindow', |
|
|
|