diff options
author | Chocobozzz <me@florianbigard.com> | 2018-10-18 14:35:31 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-10-18 14:35:31 +0200 |
commit | c199c427d4ae586339822320f20f512a7a19dc3f (patch) | |
tree | 9cbe8bebc25e97d2e8086c41bcd7180dd752dbac /client/src/app/shared/buttons | |
parent | cdf4cb9eaf5f6bc71f7c1e1963c07575f1d2593d (diff) | |
download | PeerTube-c199c427d4ae586339822320f20f512a7a19dc3f.tar.gz PeerTube-c199c427d4ae586339822320f20f512a7a19dc3f.tar.zst PeerTube-c199c427d4ae586339822320f20f512a7a19dc3f.zip |
Better typings
Diffstat (limited to 'client/src/app/shared/buttons')
-rw-r--r-- | client/src/app/shared/buttons/action-dropdown.component.ts | 6 | ||||
-rw-r--r-- | client/src/app/shared/buttons/button.component.ts | 6 | ||||
-rw-r--r-- | client/src/app/shared/buttons/edit-button.component.ts | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/client/src/app/shared/buttons/action-dropdown.component.ts b/client/src/app/shared/buttons/action-dropdown.component.ts index 9877f639d..d8026ef41 100644 --- a/client/src/app/shared/buttons/action-dropdown.component.ts +++ b/client/src/app/shared/buttons/action-dropdown.component.ts | |||
@@ -2,9 +2,9 @@ import { Component, Input } from '@angular/core' | |||
2 | 2 | ||
3 | export type DropdownAction<T> = { | 3 | export type DropdownAction<T> = { |
4 | label?: string | 4 | label?: string |
5 | handler?: (T: any) => any | 5 | handler?: (a: T) => any |
6 | linkBuilder?: (T: any) => (string | number)[] | 6 | linkBuilder?: (a: T) => (string | number)[] |
7 | isDisplayed?: (T: any) => boolean | 7 | isDisplayed?: (a: T) => boolean |
8 | } | 8 | } |
9 | 9 | ||
10 | @Component({ | 10 | @Component({ |
diff --git a/client/src/app/shared/buttons/button.component.ts b/client/src/app/shared/buttons/button.component.ts index cccf98bc3..1a1162f09 100644 --- a/client/src/app/shared/buttons/button.component.ts +++ b/client/src/app/shared/buttons/button.component.ts | |||
@@ -8,9 +8,9 @@ import { Component, Input } from '@angular/core' | |||
8 | 8 | ||
9 | export class ButtonComponent { | 9 | export class ButtonComponent { |
10 | @Input() label = '' | 10 | @Input() label = '' |
11 | @Input() className: any = undefined | 11 | @Input() className: string = undefined |
12 | @Input() icon: any = undefined | 12 | @Input() icon: string = undefined |
13 | @Input() title: any = undefined | 13 | @Input() title: string = undefined |
14 | 14 | ||
15 | getTitle () { | 15 | getTitle () { |
16 | return this.title || this.label | 16 | return this.title || this.label |
diff --git a/client/src/app/shared/buttons/edit-button.component.ts b/client/src/app/shared/buttons/edit-button.component.ts index ea552663a..1fe4f7b30 100644 --- a/client/src/app/shared/buttons/edit-button.component.ts +++ b/client/src/app/shared/buttons/edit-button.component.ts | |||
@@ -8,5 +8,5 @@ import { Component, Input } from '@angular/core' | |||
8 | 8 | ||
9 | export class EditButtonComponent { | 9 | export class EditButtonComponent { |
10 | @Input() label: string | 10 | @Input() label: string |
11 | @Input() routerLink: any = [] | 11 | @Input() routerLink: string[] = [] |
12 | } | 12 | } |