Closed guillaume-alvarez closed 4 years ago
Would this solve your issue:
import type { Hex, Point, FlatCompassDirection } from 'honeycomb-grid';
Source: https://github.com/webpack/webpack/issues/7378#issuecomment-605685470
Not, because the issue here is that the value is not imported. :-(
that seem to indicate you can fix the issue by changing the way it is declared
Can you point me to an example of that? And can you also supply an example of:
Many answers on stackoverflow seem to imply it could also work by declaring the enum as 'const' in the types declaration file
Ok, could you test if this solves your issue (by replacing the existing enum in your local honeycomb.d.ts with this):
export const enum FlatCompassDirection {
SE = 'SE',
S = 'S',
SW = 'SW',
NW = 'NW',
N = 'N',
NE = 'NE',
}
Sure I can (I did not think you could touch theses files).
It solves the issue!
You can change those files, but they'll be overridden when you run npm install
(and there's a change in the file).
Anyway, great! I'll publish a new version later today.
Fixed in 3.1.7
Please let me know if you have any more questions.
Hi,
I'm using this (very useful) library with typescript and webpack and run into this warning
for this code
It results in this error at runtime:
It looks a lot like this webpack issue, that seem to indicate you can fix the issue by changing the way it is declared.
Many answers on stackoverflow seem to imply it could also work by declaring the enum as 'const' in the types declaration file.