This repository was archived by the owner on May 21, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 617
Expand file tree
/
Copy pathInterfaces.ts
More file actions
61 lines (50 loc) · 1.81 KB
/
Interfaces.ts
File metadata and controls
61 lines (50 loc) · 1.81 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import {Weight, Brightness} from "./Enums";
import {Stats} from "fs";
import {ReactElement} from "react";
import {Job} from "./shell/Job";
import {Session} from "./shell/Session";
import {Suggestion} from "./plugins/completion_utils/Common";
import {Output} from "./Output";
import {Environment} from "./shell/Environment";
import {OrderedSet} from "./utils/OrderedSet";
import {Argument} from "./shell/Parser";
import {Aliases} from "./shell/Aliases";
export type ColorCode = number | number[];
export interface Attributes {
readonly inverse: boolean;
readonly color: ColorCode;
readonly backgroundColor: ColorCode;
readonly brightness: Brightness;
readonly weight: Weight;
readonly underline: boolean;
readonly crossedOut: boolean;
readonly blinking: boolean;
readonly cursor: boolean;
}
export interface PreliminaryAutocompletionContext {
readonly environment: Environment;
readonly historicalPresentDirectoriesStack: OrderedSet<string>;
readonly aliases: Aliases;
}
export interface AutocompletionContext extends PreliminaryAutocompletionContext {
readonly argument: Argument;
}
export type AutocompletionProvider = (context: AutocompletionContext) => Promise<Suggestion[]>;
export interface FileInfo {
name: string;
stat: Stats;
}
export interface Prettyfier {
isApplicable: (job: Job) => boolean;
prettify: (job: Job) => ReactElement<any>;
}
export interface EnvironmentObserverPlugin {
presentWorkingDirectoryWillChange: (session: Session, directory: string) => void;
presentWorkingDirectoryDidChange: (session: Session, directory: string) => void;
}
export interface TerminalLikeDevice {
output: Output;
write: (input: string | KeyboardEvent) => void;
}
export type UserEvent = KeyboardEvent | ClipboardEvent;
export type MouseEvent = DragEvent;