Thuzi / facebook-node-sdk

Modeled from the (Facebook Javascript SDK), now with the facebook-node-sdk you can now easily write the same code and share between your server (nodejs) and the client (Facebook Javascript SDK).
Other
736 stars 250 forks source link

TypeScript type declarations #127

Open moonman239 opened 9 months ago

moonman239 commented 9 months ago

Hello,

I noticed there were no type declarations for TypeScript, so I had to kind of add my own. It'd be nice to have some types, please.

I'll add more types as I go along, but for now, here's a start:

interface FacebookResponse
{
    error: any
}
type FacebookAPICallback = (res:FacebookResponse)=>void;
declare module 'fb' {
    export function api(path?:string,method?:string="GET",params?:object,callback?:FacebookAPICallback): void;

}