Skip to content

An index signature parameter type cannot be a union type #3057

Open
@Identity-labs

Description

@Identity-labs

What happened?

@citizen/client type is not usable without adding "skipLibCheck": true

This error happen at compilation :

node_modules/@citizenfx/client/index.d.ts:136:10 - error TS1337: An index signature parameter type cannot be a union type. Consider using a mapped object type instead.

136         [exportKey: string | number]: Function

which type should be declared here ?

Expected result

No error

Reproduction steps

include @citizen/client type in node/typescript project

Importancy

There's a workaround

Area(s)

ScRT: JS

Specific version(s)

FiveM/RedM

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    ScRT: JSIssues/PRs related to the JavaScript scripting runtimebugtriageNeeds a preliminary assessment to determine the urgency and required action

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions