Skip to content
Open
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
2 changes: 1 addition & 1 deletion tsguide.html
Original file line number Diff line number Diff line change
Expand Up @@ -1562,7 +1562,7 @@ <h4 id="functions-as-callbacks" class="numbered">Prefer passing arrow functions
the named callback.</p>

<pre><code class="language-ts good">// GOOD: Arguments are explicitly passed to the callback
const numbers = ['11', '5', '3'].map((n) =&gt; parseInt(n));
const numbers = ['11', '5', '3'].map((n) =&gt; parseInt(n, 10));
// &gt; [11, 5, 3]

// GOOD: Function is locally defined and is designed to be used as a callback
Expand Down