Open
Description
#1895 Revealed a conflict between the project type definitions and @types/node
.
It causes the same error the PR aims to prevent:
TS2403: Subsequent variable declarations must have the same type.
It's probably the reason why exports
was previously typed as any
.
Using "skipLibCheck": true
in the tsconfig.json
fixes the error and seems to be a somewhat adequate solution, but it reduces type accuracy. More information about the skipLibCheck
flag can be found at https://www.typescriptlang.org/tsconfig#skipLibCheck
I'm not sure what would be the best approach here. Reverting the PR would be the easiest fix but considering that FiveM uses a modified version of Node, the type definitions from @citizenfx/*
should be the preferred ones in my opinion.