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

Export mediumZoom correctly as ESM style #82

Merged
merged 1 commit into from
Jan 20, 2019

Conversation

hmsk
Copy link
Contributor

@hmsk hmsk commented Jan 1, 2019

Summary

This PR fixes this compile error on TypeScript 3.x.

image

The actual exporting of mediumZoom is taking ESM way since last August.
https://github.com/francoischalifour/medium-zoom/blob/master/src/index.js#L4

TS expects the same way for typedefs.

export = Something on TS

https://www.typescriptlang.org/docs/handbook/modules.html

When exporting a module using export =, TypeScript-specific import module = require("module") must be used to import the module.

Copy link
Owner

@francoischalifour francoischalifour left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you for the fix!

@francoischalifour francoischalifour merged commit ed45fcb into francoischalifour:master Jan 20, 2019
@hmsk hmsk deleted the export-type branch February 11, 2019 05:02
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