This repository was archived by the owner on Oct 5, 2021. It is now read-only.
This repository was archived by the owner on Oct 5, 2021. It is now read-only.
Typewiz error on overloaded functions in this simple create-react-app repro #85
Closed
Description
I've gotten a taste of typewiz by running some of my codebase in node, and it's awesome! But now when I turned to run it over the create-react-app-based codebase, I'm seeing errors when encountering exported function overloads, for some reason (which I didn't see occur in typewiz-node, oddly).
I've created a repro of this, which requires the following two repos:
- https://github.com/zxti/cra-typewiz-example: A fresh create-react-app-ts project but with an exported overloaded function added.
- https://github.com/zxti/react-scripts-ts: The react-scripts-ts.
To get started, clone both repos, then run:
cd react-scripts-ts
yarn link
yarn install
cd ../cra-typewiz-example
yarn link react-scripts-ts
yarn install
yarn start
When the dev server starts, it spits out the error:
./src/App.tsx 6:16
Module parse failed: Identifier 'foo' has already been declared (6:16)
You may need an appropriate loader to handle this file type.
| import logo from "./logo.svg";
| export function foo(x) { }
> export function foo(x) { }
| export function foo(x) { }
Any ideas around this? I hope my creating these repos helps!