Skip to content
This repository has been archived by the owner on Jan 19, 2019. It is now read-only.

Latest commit

 

History

History
34 lines (24 loc) · 682 Bytes

array-type.md

File metadata and controls

34 lines (24 loc) · 682 Bytes

Requires using either T[] or Array<T> for arrays (array-type)

class Foo<T = Array<Array<Bar>>> extends Bar<T, Array<T>>
    implements Baz<Array<T>> {
    private s: Array<T>;

    constructor(p: Array<T>) {
        return new Array();
    }
}

Rule Details

This rule aims to standardise usage of array.

Options

Default config:

{
    "array-type": ["error", "array"]
}
  • array enforces use of T[] for all types T.
  • generic enforces use of Array<T> for all types T.
  • array-simple enforces use of T[] if T is a simple type.

Related to