0

I wish to improve the developer experience of the flatten-js library by fixing an issue I encountered with it.

When I do

import { point } from '@flatten-js/core';

I get a TS error that point doesn't exist but if I do

import Flatten from "@flatten-js/core";
const { point } = Flatten;

then point is recognized as a member of the library. I've documented the issue here. Anyone know what might be going on?

J. Barca
  • 538
  • 6
  • 19
  • https://stackoverflow.com/questions/43814830/destructuring-a-default-export-object - as they export flatten object as default you can destructure it only after importing that default. That's I don't like exporting defaults. – Roman Kurbatov Oct 14 '21 at 22:23
  • Add `allowSyntheticDefaultImports` in your `tsconfig` under `compilerOptions` – Tushar Mistry Dec 16 '21 at 18:15

0 Answers0