From e0a82e7eebc4a99f14a09d0effcd6c40fbfb05c7 Mon Sep 17 00:00:00 2001 From: rjz Date: Sat, 5 Sep 2020 11:20:52 -0700 Subject: [PATCH] Adds TS definitions --- index.d.ts | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 index.d.ts diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..ea7d616 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,38 @@ +export type TweetParams = { + text?: string, + url?: string, + via?: string, + related?: string | string[], + in_reply_to?: string, + hashtags?: string | string[], +} + +export type EngagementParams = { + tweet_id?: string + related?: string | string[], +} + +export type UserParams = { + screen_name?: string + userid?: string +} + +export namespace tweet { + function url(params: TweetParams): string +} + +export namespace favorite { + function url(params: EngagementParams): string +} + +export namespace retweet { + function url(params: EngagementParams): string +} + +export namespace user { + function url(params: UserParams): string +} + +export namespace follow { + function url(params: UserParams): string +}