Skip to content

Commit 5f86d74

Browse files
Update part9c.md
change diaries.ts to entries.ts since we are importing the diaries below as "import diaries from '../../data/entries';"
1 parent 5468de6 commit 5f86d74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/9/en/part9c.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ We should never use type assertion unless there is no other way to proceed, as t
541541
While the compiler trusts you to know what you are doing when using *as*, by doing this, we are not using the full power of TypeScript but relying on the coder to secure the code.
542542

543543
In our case, we could change how we export our data so we can type it within the data file.
544-
Since we cannot use typings in a JSON file, we should convert the JSON file to a ts file *diaries.ts* which exports the typed data like so:
544+
Since we cannot use typings in a JSON file, we should convert the JSON file to a ts file *entries.ts* which exports the typed data like so:
545545

546546
```js
547547
import { DiaryEntry } from "../src/types"; // highlight-line

0 commit comments

Comments
 (0)