node-harvest icon indicating copy to clipboard operation
node-harvest copied to clipboard

Entities should be exported for people to use

Open Jameskmonger opened this issue 7 years ago • 1 comments

Since the webpack removal, the typings now directly match the TypeScript code.

This means that anything we want exported must be explicitly exported.

Currently, it is not possible to import entities:

import Harvest, { ProjectAssignment, TimeEntry, Project, TaskAssignment, Task } from "harvest";
Module "harvest" has no exported member 'ProjectAssignment'
Module "harvest" has no exported member 'TimeEntry'
Module "harvest" has no exported member 'Project'
Module "harvest" has no exported member 'TaskAssignment'
Module "harvest" has no exported member 'Task '

The solution for this is to export them all from index.ts.

Jameskmonger avatar Sep 10 '18 10:09 Jameskmonger

That is a problem,

I have a timeblock on Friday where I should be able to dig a little deeper into this problem.

simplyspoke avatar Sep 20 '18 02:09 simplyspoke