Skip to content

v8 exports type definitions conflict with @types/node #1910

Open
@pedr0fontoura

Description

@pedr0fontoura

#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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ScRT: JSIssues/PRs related to the JavaScript scripting runtime

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions