Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: replaceEsm typings #500

Merged
merged 1 commit into from Nov 16, 2022
Merged

fix: replaceEsm typings #500

merged 1 commit into from Nov 16, 2022

Conversation

quinnturner
Copy link
Contributor

@quinnturner quinnturner commented Nov 14, 2022

Currently, as of the latest version 3.16.7: (#499, CC @asdftd @searls)

// `subscriptions` is `void`
const subscriptions = await td.replaceEsm(
      '../../subscriptions.js',
);

image

Now:

// `subscriptions` is `{ [namedExport: string]: any; default?: any; }`
const subscriptions = await td.replaceEsm(
      '../../subscriptions.js',
);

Currently:

```ts
// `subscriptions` is `void`
const subscriptions = await td.replaceEsm(
      '../../subscriptions.js',
);
```

Now:

```ts
// `subscriptions` is `{ [namedExport: string]: any; default?: any; }`
const subscriptions = await td.replaceEsm(
      '../../subscriptions.js',
);
```
@quinnturner quinnturner deleted the patch-1 branch November 14, 2022 20:07
@quinnturner quinnturner restored the patch-1 branch November 14, 2022 20:09
@quinnturner quinnturner reopened this Nov 14, 2022
@searls
Copy link
Member

searls commented Nov 14, 2022

I take it to mean the ordering matters here?

@quinnturner
Copy link
Contributor Author

quinnturner commented Nov 14, 2022

Yes it does. Sorry, my description was unintentionally lazy 😅

The order of type definition overloading matters:
microsoft/TypeScript#1860 (comment)

@searls searls merged commit ffdf3ad into testdouble:main Nov 16, 2022
@searls
Copy link
Member

searls commented Nov 16, 2022

Thanks! Fixed this in 3.16.8!

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.

None yet

2 participants