-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
internal.ts
30 lines (22 loc) · 848 Bytes
/
internal.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* eslint-disable @typescript-eslint/camelcase */
import Git from "nodegit";
import { AskQuestion } from "./util/createQuestion";
export const editor__internal = Symbol("editor__internal");
export const getGitConfig__internal = Symbol("getGitConfig__internal");
export const noEditor = {
[editor__internal]: () => void 0,
};
export const askQuestion__internal = Symbol("askQuestion__internal");
/**
* meant to NOT be exported to the end user of the library
*/
export type InternalOnlyOptions = {
[editor__internal]?: EitherEditor;
[getGitConfig__internal]?: GetGitConfig;
[askQuestion__internal]?: AskQuestion;
};
export type EitherEditor = string | ((ctx: { filePath: string }) => void | Promise<void>);
export type GetGitConfig = (ctx: {
GitConfig: typeof Git.Config;
repo: Git.Repository;
}) => Promise<Git.Config> | Git.Config;