Js-core: Typings

Created on 5 Jul 2019  ·  6Comments  ·  Source: imgix/js-core

Would it be possible to get some typescript typings for this package, either in the repo or on definitely typed?

Most helpful comment

Hey @hennessyevan, we've been getting more requests for this (and our other JS projects) lately, so it's definitely something we're planning to look into in the near future. I don't have an exact timeline at the moment but I'll be sure to update you when we get to it.

All 6 comments

Hey @hennessyevan, we've been getting more requests for this (and our other JS projects) lately, so it's definitely something we're planning to look into in the near future. I don't have an exact timeline at the moment but I'll be sure to update you when we get to it.

+1 on typings!

There should be typings for the param argument to buildURL.

I'm sorry but this is just lazy params?: {}.

The set of valid values are finite and well defined, there should be explicit types.

This is what your typings should look like. https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-imgix/index.d.ts

Hey @guanzo,

I agree that params deserves better typings. As a team, we are planning to pull in imgix-url-params as a dependency from which these definitions can be robustly constructed. This will help account for changes to the rendering API, as well as any new parameters that get added. To that end, params was assigned a very rudimentary type just to start out, but we expect to start work on pulling in these definitions in the near future. Hope that helps.

Ok great, thanks for clarifying. Sorry I called you guys lazy!

:tada: This issue has been resolved in version 0.3.0-beta.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

robdasilva picture robdasilva  ·  3Comments

andrewchch picture andrewchch  ·  3Comments

exortech picture exortech  ·  3Comments

konijn picture konijn  ·  3Comments

fuzihaofzh picture fuzihaofzh  ·  3Comments