Type annotations added to git

dependabot/npm_and_yarn/BuildServer/eslint-7.2.0
Inga 🏳‍🌈 8 years ago
parent 7bbefd1555
commit f3930a7894
  1. 1
      BuildServer/.gitignore
  2. 64
      BuildServer/global.d.ts

@ -18,6 +18,5 @@ data
*.crt
settings.js
settings.ts
*.d.ts
iisnode

@ -0,0 +1,64 @@
interface Message {
readonly message: string;
readonly prefix: string;
}
interface PartialMessagesLeaf {
readonly $messages?: string[];
}
interface PartialMessagesRecursive {
readonly [propName: string]: Messages | string[] | Message[]; // workaround for compatibility with PartialMessagesLeaf and PartialMessagesRoot
}
interface PartialMessagesRoot {
readonly $allMessages: Message[];
}
type Messages = PartialMessagesLeaf & PartialMessagesRecursive;
type MessagesRoot = PartialMessagesLeaf & PartialMessagesRecursive & PartialMessagesRoot;
interface ReportResult {
readonly errors: MessagesRoot;
readonly warns: MessagesRoot;
readonly infos: MessagesRoot;
readonly messages: MessagesRoot;
}
interface Report {
readonly date: number;
readonly err?: string;
readonly result?: ReportResult;
}
interface TaskProcessorCallback {
(err: string): void;
}
interface TaskProcessorCore {
readonly onError: (message: string | Error, prefix?: string) => void;
readonly onWarn: (message: string, prefix?: string) => void;
readonly onInfo: (message: string, prefix?: string) => void;
readonly context?: any;
}
interface TaskProcessor extends TaskProcessorCore {
readonly process: () => void;
readonly processTask: (task: TaskInfo, innerCallback: TaskProcessorCallback) => void;
readonly done: () => void;
}
interface TaskInfo {
name?: string;
type: string;
params: any;
}
interface Task {
(params: any, processor: TaskProcessor): () => void;
}
interface Tasks {
readonly [taskName: string]: Task;
}
Loading…
Cancel
Save