修正部分类型

This commit is contained in:
shijian 2023-12-31 23:52:08 +08:00
parent 28c7dba845
commit c790f509f1
1 changed files with 15 additions and 15 deletions

View File

@ -7,21 +7,21 @@ interface HTMLDivElement {
* @param name className
* @param time
*/
addTempClass(name: string, time?: number): HTMLDivElement;
addTempClass(name: string, time?: number): this;
/**
*
*/
hide(): HTMLDivElement;
unfocus(): HTMLDivElement;
refocus(): HTMLDivElement;
show(): HTMLDivElement;
hide(): this;
unfocus(): this;
refocus(): this;
show(): this;
/**
* div
* @param time
* @param callback
*/
delete(time: number, callback?: () => void): HTMLDivElement;
delete(): HTMLDivElement;
delete(time: number, callback?: () => void): this;
delete(): this;
/**
* div移除
*
@ -29,11 +29,11 @@ interface HTMLDivElement {
* @param position
* @param time
*/
goto(position: HTMLDivElement, time?: number): HTMLDivElement;
goto(position: HTMLDivElement, time?: number): this;
/**
*
*/
fix(): HTMLDivElement;
fix(): this;
/**
* /
* @param name 自定义格式名: xxx:xxxxxxxx:xx
@ -41,22 +41,22 @@ interface HTMLDivElement {
* @param ext :.jpg,noskin".jpg"
* @param subfolder ,
*/
setBackground(name: string, type?: string, ext?: string, subfolder?: string): HTMLDivElement;
setBackground(name: string, type?: string, ext?: string, subfolder?: string): this;
/**
*
* @param img
*/
setBackgroundDB(img: string): HTMLDivElement;
setBackgroundDB(img: string): this;
/**
*
* @param img
*/
setBackgroundImage(img: string): HTMLDivElement;
setBackgroundImage(img: string): this;
/**
* /
* @param func
*/
listen(func: (this: HTMLDivElement, event: Event) => void): HTMLDivElement;
listen(func: (this: HTMLDivElement, event: Event) => void): this;
/**
* webkitTransitionEnd
* @param func
@ -67,12 +67,12 @@ interface HTMLDivElement {
*
* @param args
*/
setPosition(...args: number[]): HTMLDivElement;
setPosition(...args: number[]): this;
/**
* css样式
* @param style
*/
css<T extends keyof CSSStyleDeclaration>(style: {
[key in T]?: string
}): void;
}): this;
}