Skip to content

Commit

Permalink
fix(toast): fix type declaration[didi#167] (didi#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
xxyan0205 authored and moyus committed Jul 30, 2018
1 parent d9b8a2c commit 7807177
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions types/toast.d.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
export type ToastOptions = {
content: string
duration: number
parentNode: Element,
duration?: number
parentNode?: Element,
hasMask?: boolean
}

export type ToastConstructorOptions = {
icon: string,
icon?: string,
position?: string
} & ToastOptions

export interface Toast {
(options?: ToastConstructorOptions): void
info(options?: ToastOptions): void
succeed(options?: ToastOptions): void
failed(options?: ToastOptions): void
loading(options?: ToastOptions): void
info(content: string, duration?: number, hasMask?: boolean, parentNode?: Element): void
succeed(content: string, duration?: number, hasMask?: boolean, parentNode?: Element): void
failed(content: string, duration?: number, hasMask?: boolean, parentNode?: Element): void
loading(content: string, duration?: number, hasMask?: boolean, parentNode?: Element): void
hide(): void
}

Expand Down

0 comments on commit 7807177

Please sign in to comment.