这是一篇关于MDX语法特性的技术文档,主要包含以下内容:
Test MDX
| First Header | Second Header |
|---|---|
| Content Cell | Content Cell |
| Content Cell | Content Cell |
test 哔哩哔哩 (゜-゜)つロ 干杯~-bilibili
Codesandbox:
Checkout this video:
Here is an inline code
npm i foointerface Todo {
Todo.title: stringtitle: string
}
const const todo: Readonly<Todo>todo: type Readonly<T> = { readonly [P in keyof T]: T[P]; }Make all properties in T readonlyReadonly<Todo> = {
title: stringtitle: 'Delete inactive users'.String.toUpperCase(): stringConverts all the alphabetic characters in a string to uppercase.toUpperCase(),
}
const todo: Readonly<Todo>todo.title = 'Hello'
var Number: NumberConstructorAn object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers.Number.p- parseFloat
- parseInt
- prototype
NumberConstructor.parseInt(string: string, radix?: number): numberConverts A string to an integer.arseInt('123', 10)
var window: Window & typeof globalThis[MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/window)window.function setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number (+2 overloads)[MDN Reference](https://developer.mozilla.org/docs/Web/API/setTimeout)setTimeout
//const const a: 1a = 1Custom log messageconst const b: 1b = 1Custom error messageconst const c: 1c = 1Custom warning messageCustom annotation message,
blockquotes
Note
Highlights information that users should take into account, even when skimming.
console.log('hello world')Tip
Optional information to help a user be more successful.
Important
Crucial information necessary for users to succeed.
Warning
Critical content demanding immediate user attention due to potential risks.
Caution
Negative potential consequences of an action.
console.log('hewwo')
console.log('hello')
console.log('goodbye')import { useEffect } from 'react';
import '@/styles/global.css';
const MyApp = ({ pageProps }) => {
useEffect(() => {
document.title = 'hello world';
}, []);
return <Component {...pageProps} />;
};
export default MyApp;