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

Index signature parameter does not accept redefined valid types #10130

Closed
dbaeumer opened this issue Aug 4, 2016 · 2 comments
Closed

Index signature parameter does not accept redefined valid types #10130

dbaeumer opened this issue Aug 4, 2016 · 2 comments
Labels
Duplicate An existing issue was already created

Comments

@dbaeumer
Copy link
Member

dbaeumer commented Aug 4, 2016

From @danibishop on July 26, 2016 8:31

  • VSCode Version: 1.3.0
  • OS Version: Windows 10 Pro - 64 bits

Steps to Reproduce:

  1. Create an alias type for string
  2. Create an index signature parameter using the new type

This makes the spellcheck fail in the parameter name for the index because "An index signature parameter type must be 'string' or 'number'"

`
var d1: { [id: string]: {}; } = {} // Spellcheck Ok

type otherString = string;

var d2: { [id: otherString]: {}; } = {} // Spellcheck complains about 'id'
`

Copied from original issue: microsoft/vscode#9745

@arusakov
Copy link
Contributor

arusakov commented Sep 28, 2016

Same exception with enums:

enum X { one, two }

type Obj = {
    [ind: X]: any // An index signature parameter type must be 'string' or 'number'.
}

@RyanCavanaugh RyanCavanaugh added the Duplicate An existing issue was already created label Sep 28, 2016
@RyanCavanaugh
Copy link
Member

Duplicate of #1778, #7374, #8336, #5683, #2491, or #7656 depending on what you want to do.

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

3 participants