Source code highlighting

Typescript


class MyClass {
    public static myValue: string;
    constructor(init: string) {
        this.myValue = init;
    }
}
import fs = require("fs");
module MyModule {
    export interface MyInterface extends Other {
        myProperty: any;
    }
}
declare magicNumber number;
myArray.forEach(() => { }); // fat arrow syntax
    

Python


@requires_authorization(roles=["ADMIN"])
def somefunc(param1='', param2=0):
    r'''A docstring'''
    if param1 > param2: # interesting
        print 'Gre\'ater'
    return (param2 - param1 + 1 + 0b10l) or None

class SomeClass:
    pass