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

Fix 2792 this simple type #2982

Merged
merged 2 commits into from
Jul 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/rules/arrayTypeRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ function isSimpleType(nodeType: ts.TypeNode): boolean {
case ts.SyntaxKind.SymbolKeyword:
case ts.SyntaxKind.VoidKeyword:
case ts.SyntaxKind.NeverKeyword:
case ts.SyntaxKind.ThisType:
return true;
case ts.SyntaxKind.TypeReference:
// TypeReferences must be non-generic or be another Array with a simple type
Expand Down
1 change: 1 addition & 0 deletions test/rules/array-type/array-simple/test.ts.fix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ interface ArrayClass<T> {
foo: T[];
bar: T[];
baz: Arr<T>;
xyz: this[];
}

function fooFunction(foo: Array<ArrayClass<string>>) {
Expand Down
1 change: 1 addition & 0 deletions test/rules/array-type/array-simple/test.ts.lint
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ interface ArrayClass<T> {
~~~~~~~~ [0]
bar: T[];
baz: Arr<T>;
xyz: this[];
}

function fooFunction(foo: Array<ArrayClass<string>>) {
Expand Down