feat: improve types
This commit is contained in:
parent
42e72d14a4
commit
c9e85cb52b
14 changed files with 52 additions and 45 deletions
|
|
@ -29,6 +29,6 @@ export async function uploadFiles(attachmentService: AttachmentService, taskId:
|
|||
}
|
||||
}
|
||||
|
||||
export function generateAttachmentUrl(taskId: number, attachmentId: number) : any {
|
||||
export function generateAttachmentUrl(taskId: number, attachmentId: number) {
|
||||
return `${window.API_URL}/tasks/${taskId}/attachments/${attachmentId}`
|
||||
}
|
||||
|
|
@ -11,11 +11,11 @@ export function includesById(array: [], id: string | number) {
|
|||
}
|
||||
|
||||
// https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_isnil
|
||||
export function isNil(value: any) {
|
||||
export function isNil(value: unknown) {
|
||||
return value == null
|
||||
}
|
||||
|
||||
export function omitBy(obj: {}, check: (value: any) => boolean): {} {
|
||||
export function omitBy(obj: {}, check: (value: unknown) => boolean) {
|
||||
if (isNil(obj)) {
|
||||
return {}
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue