From 5f9cf9b31b63c1d12070cadcdf77c9112cca028a Mon Sep 17 00:00:00 2001 From: mkosir Date: Sun, 10 Dec 2023 10:35:51 +0100 Subject: [PATCH] update docusaurus --- website/src/pages/index.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/src/pages/index.mdx b/website/src/pages/index.mdx index 3817c96e..c1159d21 100644 --- a/website/src/pages/index.mdx +++ b/website/src/pages/index.mdx @@ -77,7 +77,7 @@ const userRole: string = 'admin'; // Type 'string' const employees = new Map([['gabriel', 32]]); const [isActive, setIsActive] = useState(false); -// ✅ Use +// ✅ Use type inference const USER_ROLE = 'admin'; // Type 'admin' const employees = new Map([['gabriel', 32]]); // Type 'Map' const [isActive, setIsActive] = useState(false); // Type 'boolean' @@ -89,7 +89,7 @@ employees.set('lea', 'foo-anything'); type UserRole = 'admin' | 'guest'; const [userRole, setUserRole] = useState('admin'); // Type 'string' -// ✅ Use +// ✅ Use explicit type declaration to narrow the type const employees = new Map(); // Type 'Map' employees.set('gabriel', 32); type UserRole = 'admin' | 'guest';