change Function to () => void

This commit is contained in:
Guanyunhan
2018-09-04 12:15:46 +08:00
parent 7d8ea3178e
commit 355d8e7112
2 changed files with 5 additions and 7 deletions
+4 -4
View File
@@ -90,7 +90,7 @@ declare module 'dplayer' {
export interface DPlayerContextMenuItem {
text: string;
link?: string;
click?: Function;
click?: () => void;
}
export interface DPlayerHighLightItem {
@@ -125,9 +125,9 @@ declare module 'dplayer' {
}
export interface DPlayerAPIBackend {
read(endpoint: any, callback: Function): void;
read(endpoint: any, callback: () => void): void;
send(endpoint: any, danmakuData: DPlayerDanmakuItem, callback: Function): void;
send(endpoint: any, danmakuData: DPlayerDanmakuItem, callback: () => void): void;
}
export default class DPlayer {
@@ -143,7 +143,7 @@ declare module 'dplayer' {
toggle(): void;
on(event: DPlayerEvents, handler: Function): void;
on(event: DPlayerEvents, handler: () => void): void;
switchVideo(video: DPlayerVideo, danmaku: DPlayerDanmaku): void;
+1 -3
View File
@@ -1,9 +1,7 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"lib": ["es5", "es6", "dom"],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,