Include all types, overriding JS defaults
parent
61835e8d64
commit
2f7edabf87
|
|
@ -8,6 +8,7 @@
|
||||||
"noImplicitOverride": true,
|
"noImplicitOverride": true,
|
||||||
"noImplicitReturns": true,
|
"noImplicitReturns": true,
|
||||||
"noImplicitThis": true,
|
"noImplicitThis": true,
|
||||||
|
"noLib": true,
|
||||||
"noUncheckedIndexedAccess": true,
|
"noUncheckedIndexedAccess": true,
|
||||||
"noUnusedLocals": true,
|
"noUnusedLocals": true,
|
||||||
"noUnusedParameters": true,
|
"noUnusedParameters": true,
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,3 +1,4 @@
|
||||||
|
// Bangle.js globals
|
||||||
declare const g: Graphics;
|
declare const g: Graphics;
|
||||||
|
|
||||||
type WidgetArea = "tl" | "tr" | "bl" | "br";
|
type WidgetArea = "tl" | "tr" | "bl" | "br";
|
||||||
|
|
@ -7,3 +8,15 @@ type Widget = {
|
||||||
draw: (this: { x: number; y: number }) => void;
|
draw: (this: { x: number; y: number }) => void;
|
||||||
};
|
};
|
||||||
declare const WIDGETS: { [key: string]: Widget };
|
declare const WIDGETS: { [key: string]: Widget };
|
||||||
|
|
||||||
|
// Required for TypeScript to work properly
|
||||||
|
interface NewableFunction extends Function {}
|
||||||
|
interface CallableFunction extends Function {}
|
||||||
|
interface IArguments {
|
||||||
|
[index: number]: any;
|
||||||
|
length: number;
|
||||||
|
callee: Function;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Helper type
|
||||||
|
type Exclude<T, U> = T extends U ? never : T;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue