girder / girder_web_components

Reusable Javascript and VueJS components for interacting with a Girder server.
https://gwc.girder.org
Apache License 2.0
16 stars 9 forks source link

Typescript/fix defs #304

Closed subdavis closed 3 years ago

subdavis commented 3 years ago

Typescript fixes for my needs on other projects. Apparently imports must happen outside the declare block.

Added [key: string]: any; to give downstream more flexibility to use the models.

subdavis commented 3 years ago

I misunderstood a lot about how module definitions work. In order to declare different modules, they have to be in different files.

Also, that export {} chunk isn't correct either. I thought I tested this with a real project before 3.0.0 but apparently I was just guessing. The really correct move would be to test this in CI with tsc, but I don't want to add the dep to this project.