Skip to content

Commit

Permalink
[changed] tslint to Array<type> syntax
Browse files Browse the repository at this point in the history
Summary: Google Style had required type[], but that is inconsistent with other collection types, like Set<type>.  Preferring consistency/simplicity/clarity over terseness.

Test Plan: lint passes

Reviewers: O3 Material JavaScript platform reviewers, #material_motion, O2 Material Motion, featherless

Reviewed By: #material_motion, O2 Material Motion, featherless

Tags: #material_motion

Differential Revision: http://codereview.cc/D2410
  • Loading branch information
appsforartists committed Dec 22, 2016
1 parent 1a19a32 commit b353d28
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/demos-react/src/map-scroll-to-css/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/


export function range({ start = 0, end = 1 }:{ start?: number, end?: number } = {}):number[] {
export function range({ start = 0, end = 1 }: { start?: number, end?: number } = {}): Array<number> {
const length = end - start;
return Array(length + 1).fill().map((_, i) => start + i);
}
2 changes: 1 addition & 1 deletion tslint.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"rules": {
"array-type": [true, "array-simple"],
"array-type": [true, "generic"],
"class-name": true,
"comment-format": [true, "check-space"],
"curly": true,
Expand Down

0 comments on commit b353d28

Please sign in to comment.