From 4fddc63dab728d4bf1ce9c7916ab059fdcf79aed Mon Sep 17 00:00:00 2001 From: Andy Date: Tue, 1 Aug 2017 13:21:00 -0700 Subject: [PATCH] Recommend to use ReadonlyArray (#18429) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f6d2e5d585..b43e3592e4 100644 --- a/README.md +++ b/README.md @@ -133,6 +133,7 @@ For a good example package, see [base64-js](https://github.com/DefinitelyTyped/D * First, follow advice from the [handbook](http://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html). * Formatting: Either use all tabs, or always use 4 spaces. +* `function sum(nums: number[]): number`: Use `ReadonlyArray` if a function does not write to its parameters. * `interface Foo { new(): Foo; }`: This defines a type of objects that are new-able. You probably want `declare class Foo { constructor(); }`. * `const Class: { new(): IClass; }`: