Status and User interfaces for TypeScript



For some of my projects in TypeScript, I’ve been defining types for Users and Statuses. They are now published on npm if anyone else wants to use them.

Basically you will install them

npm install --save-dev twitter-d

And then you can use the types in your code and have strong confidence in what fields may or may not be present in your data.

import { Status as Tweet, User } from 'twitter-d';

function getTweet(): Tweet { /* ... */ }
function getUser(): User { /* ... */ }