Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Conversation

@Kronuz
Copy link

@Kronuz Kronuz commented Jun 20, 2018

When trying to compile as ECMAScript modules, errors about import assignment don't allow compilation. This pull request fixes that by changing such to use import * as XXX from YYY instead.

@codecov
Copy link

codecov bot commented Jun 20, 2018

Codecov Report

Merging #480 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #480   +/-   ##
=======================================
  Coverage   83.08%   83.08%           
=======================================
  Files          15       15           
  Lines        2052     2052           
  Branches      420      487   +67     
=======================================
  Hits         1705     1705           
  Misses        345      345           
  Partials        2        2
Impacted Files Coverage Δ
src/typescript-service.ts 85.13% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d107424...f8053bb. Read the comment docs.

import { castArray, merge, omit } from 'lodash'
import { toPairs } from 'lodash'
import hashObject = require('object-hash')
import * as hashObject from 'object-hash'
Copy link
Contributor

Choose a reason for hiding this comment

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

Using * as for functions that are exported with module.exports is not semantically correct - according to the ES6 spec hashObject would be a frozen module record object, not a function.

The right solution for this would be to use the new esModuleInterop flag and import the default import.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants