Testing Syntax Highlighting

In this post I'm gonna test out the syntax highlighting I can achieve with Prism.js.

TypeScript

/**
* This is a comment
*/
function hello(woah: any) {
lala((blah: ReallyCoolInterface) => {
let x = foo ? bar : baz;
const bool = false;
});
}
class Greeter extends Usher {
hello(greeting: string) {
return `Hello, ${greeting}`; // This is also a comment
}
goodbye(name) {
return "Goodbye " + name + ".";
}
}

JSX

/** @jsx jsx */
import { jsx } from 'theme-ui'
export default ({ posts }) => (
<section>
{posts.map(post =>
<article>post</article>
)}
<section/>
)

bash

ls
lerna.json node_modules package-lock.json package.json packages yarn.lock