1
0

feat: function attribute typing

This commit is contained in:
Dominik Pschenitschni
2022-06-23 03:20:07 +02:00
parent 8fb00653e4
commit 332acf012c
17 changed files with 48 additions and 41 deletions

View File

@ -1,15 +1,15 @@
import AbstractService from './abstractService'
export default class AccountDeleteService extends AbstractService {
request(password) {
return this.post('/user/deletion/request', {password: password})
request(password: string) {
return this.post('/user/deletion/request', {password})
}
confirm(token) {
return this.post('/user/deletion/confirm', {token: token})
confirm(token: string) {
return this.post('/user/deletion/confirm', {token})
}
cancel(password) {
return this.post('/user/deletion/cancel', {password: password})
cancel(password: string) {
return this.post('/user/deletion/cancel', {password})
}
}

View File

@ -22,9 +22,9 @@ export default class BackgroundUploadService extends AbstractService {
* @param file
* @returns {Promise<any|never>}
*/
create(listId, file) {
create(listId: ListModel['id'], file) {
return this.uploadFile(
this.getReplacedRoute(this.paths.create, {listId: listId}),
this.getReplacedRoute(this.paths.create, {listId}),
file,
'background',
)

View File

@ -2,11 +2,11 @@ import AbstractService from './abstractService'
import {downloadBlob} from '../helpers/downloadBlob'
export default class DataExportService extends AbstractService {
request(password) {
return this.post('/user/export/request', {password: password})
request(password: string) {
return this.post('/user/export/request', {password})
}
async download(password) {
async download(password: string) {
const clear = this.setLoading()
try {
const url = await this.getBlobUrl('/user/export/download', 'POST', {password})