New way of defining types

See: https://github.com/Microsoft/TypeScript/issues/364#issuecomment-51700012