altf4 / libenforcer

TypeScript library for the SLP enforcer app
GNU Lesser General Public License v2.1
1 stars 0 forks source link

error TS2300/TS2305 when importing slp-enforcer #2

Open jmlee337 opened 7 months ago

jmlee337 commented 7 months ago

looks like

export { type StatComputer, type StatOptions, Stats } from "./stats";

from src/slippi/stats/index.ts somehow becomes

export { type, StatComputer, type, StatOptions, Stats } from "./stats";

in slp-enforcer/dist/slippi/stats/index.d.ts in the exported module which tsc doesn't like

PS C:\Users\jmlee337\Documents\GitHub\replay-manager-for-slippi> npm exec tsc
node_modules/slp-enforcer/dist/slippi/stats/index.d.ts:7:10 - error TS2300: Duplicate identifier 'type'.

7 export { type, StatComputer, type, StatOptions, Stats } from "./stats";
           ~~~~

node_modules/slp-enforcer/dist/slippi/stats/index.d.ts:7:10 - error TS2305: Module '"./stats"' has no exported member 'type'.

7 export { type, StatComputer, type, StatOptions, Stats } from "./stats";
           ~~~~

node_modules/slp-enforcer/dist/slippi/stats/index.d.ts:7:30 - error TS2300: Duplicate identifier 'type'.

7 export { type, StatComputer, type, StatOptions, Stats } from "./stats";
                               ~~~~

node_modules/slp-enforcer/dist/slippi/stats/index.d.ts:7:30 - error TS2305: Module '"./stats"' has no exported member 'type'.

7 export { type, StatComputer, type, StatOptions, Stats } from "./stats";
jmlee337 commented 7 months ago

looks like I can work around this by adding

{
  "compilerOptions": {
    "skipLibCheck": true
  },
}

to tsconfig.json