Skip to content

Better TypeScript handling #177

Closed
Closed
@kartsims

Description

@kartsims

Trying to use your lib with TypeScript here and can't import the component properly.

As per these recommendations, one should export either a structured object or have a default export.

I personally prefer the default path since it would allow to use the same syntax for TS as for JS (so no need to add anything in the README)

Here is the diff that did the trick for me (types/index.d.ts) :

50c50
< export default InfiniteLoading;
---
> export = InfiniteLoading;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions