Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Identity-labs opened this issue Jan 7, 2025 · 0 comments
Open

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

Identity-labs opened this issue Jan 7, 2025 · 0 comments
Labels
bug ScRT: JS Issues/PRs related to the JavaScript scripting runtime triage Needs a preliminary assessment to determine the urgency and required action

Comments

@Identity-labs
Copy link
Contributor

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

@Identity-labs Identity-labs added bug triage Needs a preliminary assessment to determine the urgency and required action labels Jan 7, 2025
@github-actions github-actions bot added the ScRT: JS Issues/PRs related to the JavaScript scripting runtime label Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug ScRT: JS Issues/PRs related to the JavaScript scripting runtime triage Needs a preliminary assessment to determine the urgency and required action
Projects
None yet
Development

No branches or pull requests

1 participant