Pygments Syntax Highlighting via Python RPC

Language Detected: TypeScript

How it works: TypeScript worker calls Python worker via RPC → Python uses Pygments to highlight code → Returns HTML + CSS

Supported Languages: 500+ languages including Python, JavaScript, Rust, Go, C++, and more!

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
async function fetchUserData(userId: number): Promise<User> {
	const response = await fetch(`/api/users/${userId}`);

	if (!response.ok) {
		throw new Error(`HTTP error! status: ${response.status}`);
	}

	const data = await response.json();
	return data as User;
}

// Usage example
const user = await fetchUserData(123);
console.log(`Welcome, ${user.name}!`);