Skip to content

@giphy/js-components throws error for throttle-debounce #182

@MickL

Description

@MickL

I followed the sdk and sandbox to simply render a single gif: https://codesandbox.io/s/1wq52x1w44?fontsize=14&file=/src/gif.ts

But when I import renderGif:

import { renderGif } from '@giphy/js-components';

It throws an error:

ERROR in /my-project-dir/node_modules/@giphy/js-components/dist/components/carousel.d.ts
ERROR in /my-project-dir/node_modules/@giphy/js-components/dist/components/carousel.d.ts(42,21):
TS7016: Could not find a declaration file for module 'throttle-debounce'. '/my-project-dir/node_modules/throttle-debounce/index.cjs.js' implicitly has an 'any' type.
  Try `npm install @types/throttle-debounce` if it exists or add a new declaration (.d.ts) file containing `declare module 'throttle-debounce';`

ERROR in /my-project-dir/node_modules/@giphy/js-components/dist/components/grid.d.ts
ERROR in /my-project-dir/node_modules/@giphy/js-components/dist/components/grid.d.ts(58,21):
TS7016: Could not find a declaration file for module 'throttle-debounce'. '/my-project-dir/node_modules/throttle-debounce/index.cjs.js' implicitly has an 'any' type.
  Try `npm install @types/throttle-debounce` if it exists or add a new declaration (.d.ts) file containing `declare module 'throttle-debounce';`

The docs do not state any dependency to throttle-debounce. If there are no dependencies but the types are needed in order @giphy/js-components to work, then they should be included in the package.json of @giphy/js-components imo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions