From 7b4418085451e20c0ced3b2e6974dbe924364acb Mon Sep 17 00:00:00 2001 From: DrMoshtael Date: Thu, 29 Feb 2024 13:24:40 +0000 Subject: [PATCH] Corrected filename from diaries.ts to entries.ts The example code has the file that was previously entries.json become entries.ts. However, the description calls it diaries.ts. It is imported as entries.ts below. --- src/content/9/en/part9c.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/9/en/part9c.md b/src/content/9/en/part9c.md index 5026e0f2bd3..8512ed3609e 100644 --- a/src/content/9/en/part9c.md +++ b/src/content/9/en/part9c.md @@ -533,7 +533,7 @@ We should never use type assertion unless there is no other way to proceed, as t 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. In our case, we could change how we export our data so we can type it within the data file. -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: +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: ```js import { DiaryEntry } from "../src/types"; // highlight-line