Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

no-unsafe-any: allow object spread #3439

Merged
merged 1 commit into from
Jan 9, 2018
Merged

no-unsafe-any: allow object spread #3439

merged 1 commit into from
Jan 9, 2018

Conversation

ajafff
Copy link
Contributor

@ajafff ajafff commented Nov 1, 2017

PR checklist

  • Addresses an existing issue: #0000
  • New feature, bugfix, or enhancement
    • Includes tests
  • Documentation update

Overview of change:

You can basically use everything in object spread. Therefore it should not be an error when spreading any.
The tests make sure we only allow object spread, not object rest.
any in array spread is not allowed. You need an Iterable there. I also added tests for this.

Is there anything you'd like reviewers to focus on?

CHANGELOG.md entry:

[bugfix] no-unsafe-any allows spreading an any-value into an object

[bugfix] `no-unsafe-any` allows spreading an `any`-value into an object
@adidahiya adidahiya merged commit 6dfa0f6 into palantir:master Jan 9, 2018
HyphnKnight pushed a commit to HyphnKnight/tslint that referenced this pull request Apr 9, 2018
[bugfix] `no-unsafe-any` allows spreading an `any`-value into an object
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 this pull request may close these issues.

2 participants