Vitepress

This commit is contained in:
Robert Jelic
2025-02-10 06:53:23 +01:00
parent 3818128521
commit b0a4a6da9c
2428 changed files with 1005324 additions and 0 deletions

23
node_modules/shiki/samples/hack.sample generated vendored Normal file
View File

@@ -0,0 +1,23 @@
<<__EntryPoint>>
async function my_example(): Awaitable<void> {
$user_ids = vec[1, 2, 3];
// Initiate all the database requests together,
// so we spend less time waiting.
$user_names = await Vec\map_async(
$user_ids,
async ($id) ==> await fetch_user_name($id),
);
// Execution continues after requests complete.
echo Str\join($user_names, ", ");
}
async function fetch_user_name(
int $_,
): Awaitable<string> {
// This could be a database request.
return "";
}
// From hacklang.org