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

Typescript Cannot add any headers in splitParameterString #75

Closed
MM25Zamanian opened this issue Mar 10, 2022 · 4 comments · Fixed by #77
Closed

Typescript Cannot add any headers in splitParameterString #75

MM25Zamanian opened this issue Mar 10, 2022 · 4 comments · Fixed by #77

Comments

@MM25Zamanian
Copy link
Contributor

Package(s)

router

Description

The first problem:

package/router/src/core.ts:105:9 - error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{}'.
  No index signature with a parameter of type 'string' was found on type '{}'.

105         parameterList[parameterArray[0]] = parameterArray[1] != null ? parseValue(parameterArray[1]) : null;
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The second problem

parameterList is a constant so I can not use the following model:

parameterList = {
  ...parameterList,
  [parameterArray[0]]: parameterArray[1] != null ? parseValue(parameterArray[1]) : null,
};

reproduction link

No response

Please provide the exception or error you saw (Preferably with a screenshot)

No response

Device or platform

Device: Desktop
OS: Arch Linux
Browser: Google Chrome

Vatr registered list

[]

Anything else?

No response

@MM25Zamanian
Copy link
Contributor Author

@AliMD Exactly the same problems exist in the i18n package.
Can I use let ??

AliMD added a commit that referenced this issue Mar 10, 2022
@AliMD AliMD changed the title Typescript Cannot add any headers to a fetch api Typescript Cannot add any headers in splitParameterString Mar 10, 2022
@AliMD
Copy link
Member

AliMD commented Mar 10, 2022

این خطاها قبلا کجا بودن!
چرا یهو اومدن !!!

@AliMD
Copy link
Member

AliMD commented Mar 10, 2022

نه راهش let نیست

@github-actions
Copy link

Issue closed and locked due to lack of activity.
If you encounter this same issue, please open a new issue and refer to this closed one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants