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

array-type doesn't consider "this" to be a simple type #2792

Closed
stogle opened this issue May 19, 2017 · 1 comment
Closed

array-type doesn't consider "this" to be a simple type #2792

stogle opened this issue May 19, 2017 · 1 comment

Comments

@stogle
Copy link

stogle commented May 19, 2017

Bug Report

  • TSLint version: 5.2.0
  • TypeScript version: 2.2.1
  • Running TSLint via: CLI

TypeScript code being linted

public children: this[];

with tslint.json configuration:

{
    "extends": "tslint:recommended",
    "array-type": [true, "array-simple"]
}

Actual behavior

ERROR: test.ts[x, y]: Array type using 'T[]' is forbidden for non-simple types. Use 'Array' instead.

Expected behavior

No warnings reported, since this should be considered a simple type along with e.g. object, number and string. See #2351

@adidahiya
Copy link
Contributor

agreed, this should be a really simple PR for anyone looking to contribute!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants