Skip to content

fix(types): correct type for default export - #18

Merged
ncjones merged 1 commit into
ncjones:masterfrom
harelmo:fix-typings
Dec 3, 2025
Merged

ncjones merged 1 commit into
ncjones:masterfrom
harelmo:fix-typings

Conversation

@harelmo

@harelmo harelmo commented Nov 25, 2025

Copy link
Copy Markdown
Contributor

Using the example code from the readme:

import retry from 'retry-assert';

results in:

    TypeError: (0 , retry_assert_1.default) is not a function

changing it to:

import * as retry from 'retry-assert';

results in TS throwing the following error:

This expression is not callable.
  Type 'typeof import("/Users/.../node_modules/retry-assert/retry-assert")' has no call signatures. ts(2349)

From what I understand, since this is a CommonJS default export, the d.ts signature should be export = retry.

@harelmo

harelmo commented Dec 3, 2025

Copy link
Copy Markdown
Contributor Author

@ncjones care to take a look please? 🙏

@ncjones

ncjones commented Dec 3, 2025

Copy link
Copy Markdown
Owner

@harelmo Apologies I missed your PR. Thanks for submitting this.

@ncjones
ncjones merged commit f4bb308 into ncjones:master Dec 3, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants