Include all types, overriding JS defaults

master
qucchia 2022-07-22 08:21:47 +02:00
parent 61835e8d64
commit 2f7edabf87
3 changed files with 1836 additions and 26 deletions

View File

@ -8,6 +8,7 @@
"noImplicitOverride": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noLib": true,
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"noUnusedParameters": true,

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,4 @@
// Bangle.js globals
declare const g: Graphics;
type WidgetArea = "tl" | "tr" | "bl" | "br";
@ -7,3 +8,15 @@ type Widget = {
draw: (this: { x: number; y: number }) => void;
};
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;