Skip to content

Commit b3bf600

Browse files
[typescript/rna-transcription] Update mentoring.md (#2324)
* Update mentoring.md added another way of types * Update mentoring.md * Update mentoring.md
1 parent 2db546d commit b3bf600

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tracks/typescript/exercises/rna-transcription/mentoring.md

+5
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,8 @@ sequence.replace(/[CGAT]g/, (nucleotide) => /* */)
5656

5757
- Encourage streams because it's harder to use intermediary variables (which can lead to bugs) and forces "one-by-one" approach. It is easier to explain the [`Object`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) solution over multiple conditionals when it's a stream.
5858
- If a student uses an `Object`, point them to `falsy` values.
59+
- Highlight TypeScript's ability to infer types automatically, reducing the need for explicit type declarations in many cases.
60+
- For example, TypeScript can infer the types of objects like TRANSCRIPTION without the need for explicit type declarations, making code more concise and readable.
61+
- However, in more complex applications where types like DnaNucleotide and RnaNucleotide are externally provisioned, explicitly defining types using constructs like Record<X, Y> might be more appropriate.
62+
- Additionally, if those types exist, one may also expect all the transitions/transcriptions to exist as types.
63+
- This balance between conciseness and explicitness is crucial for maintaining clarity and robustness in the codebase.

0 commit comments

Comments
 (0)