rewrite module to typescript

This commit is contained in:
2025-01-14 17:36:15 +01:00
parent 9dc24f2d7b
commit b9f7615cd0
13 changed files with 435 additions and 491 deletions

11
src/toggl-extend.ts Normal file
View File

@@ -0,0 +1,11 @@
import { Toggl } from 'toggl-track'
export interface IWorkspace {
id: number
name: string
}
export async function togglGetWorkspaces(toggl: Toggl): Promise<IWorkspace[]> {
const resp: IWorkspace[] = await toggl.request<IWorkspace[]>('workspaces', {})
return resp
}