Skip to content

Commit

Permalink
Recommend to use ReadonlyArray (DefinitelyTyped#18429)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy authored and sheetalkamat committed Aug 1, 2017
1 parent ec42f81 commit 4fddc63
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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; }`:
Expand Down

0 comments on commit 4fddc63

Please sign in to comment.