修正部分类型

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