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

Setting query was still not possible #1439

Closed
wants to merge 1 commit into from
Closed

Conversation

MickL
Copy link
Contributor

@MickL MickL commented Jan 26, 2021

Having type Object was still not possible to set values, e.g.:

    if (!this.socket.io.opts.query) {
      this.socket.io.opts.query = {};
    }

    this.socket.io.opts.query.token = 'abc123';

Results in error:

Element implicitly has an 'any' type because expression of type '"token"' can't be used to index type 'Object'.

The kind of change this PR does introduce

  • a bug fix
  • a new feature
  • an update to the documentation
  • a code change that improves performance
  • other

Other information (e.g. related issues)

When this is published to npm, please leave a comment, THANK YOU ! :)

Having type `Object` it was not possible to set values, e.g.:

```ts
if (!this.socket.io.opts.query) {
      this.socket.io.opts.query = {};
    }

    this.socket.io.opts.query.token = 'abc123';
```

Results in error:
> Element implicitly has an 'any' type because expression of type '"token"' can't be used to index type 'Object'.
darrachequesne pushed a commit that referenced this pull request Feb 2, 2021
Having type `Object` it was not possible to set values, e.g.:

```ts
if (!this.socket.io.opts.query) {
  this.socket.io.opts.query = {};
}
this.socket.io.opts.query.token = 'abc123';
```

Results in error:

> Element implicitly has an 'any' type because expression of type '"token"' can't be used to index type 'Object'.
@darrachequesne
Copy link
Member

Merged as f02ab3b. Thanks!

This was referenced Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants