-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
env.d.ts
83 lines (70 loc) · 1.73 KB
/
env.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/// <reference types="vite/client" />
/// <reference types="vite-plugin-pwa/client" />
import { CSSProperties, Ref, Component } from "vue";
import { ChessInstance } from "chess.js";
declare global {
type StyleValueRefs = {
[K in keyof CSSProperties]: CSSProperties[K] | Ref<CSSProperties[K]>;
};
interface BeforeInstallPromptEvent extends Event {
readonly platforms: string[];
readonly userChoice: Promise<{
readonly outcome: "accepted" | "dismissed";
readonly platform: string;
}>;
prompt(): Promise<void>;
}
interface WindowEventMap {
beforeinstallprompt: BeforeInstallPromptEvent;
}
declare module "*.md" {
const file: Component;
export default file;
}
}
declare module "ace-builds" {
export function define(
name: string,
deps: string[],
factory: (...args: any[]) => void
): void;
}
// This is a temporary fix because @types/chess.js hasn't updated to support v0.13 yet.
declare module "chess.js" {
export interface Chess13Instance
extends Omit<
ChessInstance,
| "WHITE"
| "BLACK"
| "PAWN"
| "KNIGHT"
| "BISHOP"
| "ROOK"
| "QUEEN"
| "KING"
| "SQUARES"
| "FLAGS"
> {}
export const Chess: {
new (fen?: string): Chess13Instance;
(fen?: string): Chess13Instance;
};
export const WHITE: "w";
export const BLACK: "b";
export const PAWN: "p";
export const KNIGHT: "n";
export const BISHOP: "b";
export const ROOK: "r";
export const QUEEN: "q";
export const KING: "k";
export const FlAGS: {
BIG_PAWN: "b";
CAPTURE: "c";
EP_CAPTURE: "e";
KSIDE_CASTLE: "k";
NORMAL: "n";
PROMOTION: "p";
QSIDE_CASTLE: "q";
};
export const SQUARES: readonly Square[];
}