-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathglobals.d.ts
38 lines (36 loc) · 1.16 KB
/
globals.d.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
31
32
33
34
35
36
37
38
import type * as core from "supi-core";
export declare type Message = string;
export declare type Emote = {
ID: string;
name: string;
type: "twitch-subscriber" | "twitch-global" | "ffz" | "bttv" | "7tv";
global: boolean;
animated: boolean | null;
};
export declare type Port = number;
export declare type URL = string;
export declare type Stringifiable = boolean | number | string;
export declare type JSONifiable = null | boolean | number | string | { [P: string]: JSONifiable } | JSONifiable[];
export declare type SimpleGenericData = Record<string, JSONifiable>;
export declare interface GenericFlagsObject {
[key: string]: boolean
}
export declare type Without<T, U> = {
[P in Exclude<keyof T, keyof U>]?: never
};
export declare type XOR<T, U> = (T | U) extends object
? (Without<T, U> & U) | (Without<U, T> & T)
: T | U;
export declare type OnlyKeysOfType<T, U> = {
[P in keyof T]: T[P] extends U ? P : never
}[keyof T];
export declare type TypeExtract<T, U> = {
[P in OnlyKeysOfType<T, U>]: U;
};
declare var sb: {
Date: core.Date,
Error: core.Error,
Promise: core.Promise,
Got: core.Got,
// TODO add others
}