blobs icon indicating copy to clipboard operation
blobs copied to clipboard

TS2306: File 'blobs/v2/animate/index.js' is not a module.

Open kareljan opened this issue 4 years ago • 3 comments

When I import the animate blobs like this (or any other way) in typescript import { canvasPath } from "blobs/v2/animate"; I keep getting the error TS2306: File 'blobs/v2/animate/index.js' is not a module. It works just fine. But it throws the error. Any ideas?

kareljan avatar Mar 20 '21 16:03 kareljan

Just to collaborate on this issue. If you adjust the animate.ts file to

export default statefulAnimationGenerator(
    canvasBlobGenerator,
    renderPath2D,
    canvasKeyframeChecker,
);

And import like import canvasPath from "pathToFiles";

All works and the error is gone.

kareljan avatar Mar 23 '21 11:03 kareljan

Hey, so sorry I missed this. Will take a look ASAP

g-harel avatar May 19 '21 00:05 g-harel

Could you paste your tsconfig for me to reproduce, I think a fix for this may look like #7

g-harel avatar May 19 '21 02:05 g-harel