feat: improve types
This commit is contained in:
@ -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 New Issue
Block a user