forked from rescript-lang/rescript-vscode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprojectFiles.ts
27 lines (22 loc) · 912 Bytes
/
projectFiles.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
import * as cp from "node:child_process";
import * as p from "vscode-languageserver-protocol";
export type filesDiagnostics = {
[key: string]: p.Diagnostic[];
};
interface projectFiles {
openFiles: Set<string>;
filesWithDiagnostics: Set<string>;
filesDiagnostics: filesDiagnostics;
rescriptVersion: string | undefined;
bscBinaryLocation: string | null;
namespaceName: string | null;
bsbWatcherByEditor: null | cp.ChildProcess;
// This keeps track of whether we've prompted the user to start a build
// automatically, if there's no build currently running for the project. We
// only want to prompt the user about this once, or it becomes
// annoying.
// The type `never` means that we won't show the prompt if the project is inside node_modules
hasPromptedToStartBuild: boolean | "never";
}
export let projectsFiles: Map<string, projectFiles> = // project root path
new Map();