rewrite module to typescript
This commit is contained in:
11
src/toggl-extend.ts
Normal file
11
src/toggl-extend.ts
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user