Skip to content

Commit

Permalink
Adds TS definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
rjz committed Sep 5, 2020
1 parent 4cce5c1 commit e0a82e7
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions 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
}

0 comments on commit e0a82e7

Please sign in to comment.