Attributes first-pass TypeScript conversion

I'm sure I'll have to make all of those private variables public, but
whatever; it's a first pass that compiles. Special thanks to Visual
Studio Intellisense for being awesome.