Skip to content

Commit f62bf34

Browse files
committed
恢复ts文件错误
1 parent 5efd90c commit f62bf34

File tree

1 file changed

+89
-90
lines changed

1 file changed

+89
-90
lines changed

src/openBSE.d.ts

Lines changed: 89 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,100 @@
1-
declare module "openBSE" {
2-
interface generalOptions {
3-
verticalInterval?: number;
4-
playSpeed?: number;
5-
clock?: clockCallback;
6-
scaling?: number;
7-
defaultStyle?: GeneralBulletScreenStyle;
8-
hiddenTypes?: GeneralType;
9-
opacity?: number;
10-
cursorOnMouseOver?: string;
11-
}
12-
13-
type clockCallback = () => number;
1+
interface generalOptions {
2+
verticalInterval?: number;
3+
playSpeed?: number;
4+
clock?: clockCallback;
5+
scaling?: number;
6+
defaultStyle?: GeneralBulletScreenStyle;
7+
hiddenTypes?: GeneralType;
8+
opacity?: number;
9+
cursorOnMouseOver?: string;
10+
}
1411

15-
interface GeneralBulletScreen {
16-
text: string;
17-
canDiscard: boolean;
18-
startTime: number;
19-
type?: GeneralType;
20-
style?: GeneralBulletScreenStyle;
21-
layer?: number;
22-
[propName: string]: any;
23-
}
12+
type clockCallback = () => number;
2413

25-
interface GeneralBulletScreenStyle {
26-
shadowBlur?: number;
27-
fontWeight?: string | number;
28-
fontFamily?: string;
29-
size?: number;
30-
boxColor?: string;
31-
color?: string;
32-
borderColor?: string;
33-
speed?: number;
34-
residenceTime?: number;
35-
}
14+
interface GeneralBulletScreen {
15+
text: string;
16+
canDiscard: boolean;
17+
startTime: number;
18+
type?: GeneralType;
19+
style?: GeneralBulletScreenStyle;
20+
layer?: number;
21+
[propName: string]: any;
22+
}
3623

37-
interface GeneralBulletScreenEvent {
38-
getBulletScreen(): GeneralBulletScreen;
39-
setBulletScreen(bulletScreen: GeneralBulletScreen, redraw?: boolean): void;
40-
getPlayState(): boolean;
41-
setPlayState(play: boolean): void;
42-
readonly type: string;
43-
readonly screenX: number;
44-
readonly screenY: number;
45-
readonly clientX: number;
46-
readonly clientY: number;
47-
readonly pageX: number;
48-
readonly pageY: number;
49-
}
24+
interface GeneralBulletScreenStyle {
25+
shadowBlur?: number;
26+
fontWeight?: string | number;
27+
fontFamily?: string;
28+
size?: number;
29+
boxColor?: string;
30+
color?: string;
31+
borderColor?: string;
32+
speed?: number;
33+
residenceTime?: number;
34+
}
5035

51-
interface DebugInfo {
52-
time: number;
53-
realTimeBulletScreenCount: number;
54-
bufferBulletScreenCount: number;
55-
delay: number;
56-
delayBulletScreenCount: number;
57-
fps: number;
58-
}
36+
interface GeneralBulletScreenEvent {
37+
getBulletScreen(): GeneralBulletScreen;
38+
setBulletScreen(bulletScreen: GeneralBulletScreen, redraw?: boolean): void;
39+
getPlayState(): boolean;
40+
setPlayState(play: boolean): void;
41+
readonly type: string;
42+
readonly screenX: number;
43+
readonly screenY: number;
44+
readonly clientX: number;
45+
readonly clientY: number;
46+
readonly pageX: number;
47+
readonly pageY: number;
48+
}
5949

60-
interface VersionInfo {
61-
version: string;
62-
home: string;
63-
name: string;
64-
description: string;
65-
}
50+
interface DebugInfo {
51+
time: number;
52+
realTimeBulletScreenCount: number;
53+
bufferBulletScreenCount: number;
54+
delay: number;
55+
delayBulletScreenCount: number;
56+
fps: number;
57+
}
6658

67-
export class GeneralEngine {
68-
constructor(element: Element, options?: generalOptions,
69-
renderMode?: ['canvas' | 'css3' | 'webgl' | 'svg']);
70-
visibility: boolean;
71-
readonly renderMode: ['canvas' | 'css3' | 'webgl' | 'svg'];
72-
readonly playState: boolean;
73-
readonly debugInfo: DebugInfo;
74-
bind(name: ['click' | 'contextmenu' | 'mouseleave' | 'mouseenter'], fun: (e: GeneralBulletScreenEvent) => boolean): void;
75-
unbind(name: ['click' | 'contextmenu' | 'mouseleave' | 'mouseenter'], fun: (e: GeneralBulletScreenEvent) => boolean): void;
76-
add(bulletScreen: GeneralBulletScreen): void;
77-
play(): void;
78-
playAllBulletScreens(): void;
79-
pause(): void;
80-
cleanBuffer(): void;
81-
cleanScreen(): void;
82-
stop(): void;
83-
}
59+
interface VersionInfo {
60+
version: string;
61+
home: string;
62+
name: string;
63+
description: string;
64+
}
8465

85-
export class BrowserNotSupportError extends Error {
86-
constructor(message: string);
87-
}
66+
export class GeneralEngine {
67+
constructor(element: Element, options?: generalOptions,
68+
renderMode?: ['canvas' | 'css3' | 'webgl' | 'svg']);
69+
visibility: boolean;
70+
readonly renderMode: ['canvas' | 'css3' | 'webgl' | 'svg'];
71+
readonly playState: boolean;
72+
readonly debugInfo: DebugInfo;
73+
bind(name: ['click' | 'contextmenu' | 'mouseleave' | 'mouseenter'], fun: (e: GeneralBulletScreenEvent) => boolean): void;
74+
unbind(name: ['click' | 'contextmenu' | 'mouseleave' | 'mouseenter'], fun: (e: GeneralBulletScreenEvent) => boolean): void;
75+
add(bulletScreen: GeneralBulletScreen): void;
76+
play(): void;
77+
playAllBulletScreens(): void;
78+
pause(): void;
79+
cleanBuffer(): void;
80+
cleanScreen(): void;
81+
stop(): void;
82+
}
8883

89-
export enum GeneralType {
90-
rightToLeft = 1,
91-
leftToRight = 2,
92-
top = 4,
93-
bottom = 8
94-
}
84+
export class BrowserNotSupportError extends Error {
85+
constructor(message: string);
86+
}
9587

96-
export class Contextmenu {
97-
constructor(generalEngine, element: Element, layer?: number, pause?: boolean);
98-
}
88+
export enum GeneralType {
89+
rightToLeft = 1,
90+
leftToRight = 2,
91+
top = 4,
92+
bottom = 8
93+
}
9994

100-
export function getVersion() : VersionInfo;
95+
export class Contextmenu {
96+
constructor(generalEngine, element: Element, layer?: number, pause?: boolean);
10197
}
98+
99+
export function getVersion(): VersionInfo;
100+

0 commit comments

Comments
 (0)