TODO: Give these typescript types.