forked from RocketChat/Rocket.Chat.ReactNative
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chore: Migrate helpers/parseUrls to Typescript (RocketChat#3735)
- Loading branch information
Showing
4 changed files
with
51 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,49 @@ | ||
export interface IUrl { | ||
_id: number; | ||
title: string; | ||
description: string; | ||
image: string; | ||
url: string; | ||
} | ||
|
||
export interface IUrlFromServer { | ||
url: string; | ||
meta: { | ||
pageTitle: string; | ||
description: string; | ||
fbAppId: string; | ||
twitterImageSrc: string; | ||
twitterSite: string; | ||
twitterCard: string; | ||
twitterTitle: string; | ||
twitterDescription: string; | ||
ogImage: string; | ||
ogImageAlt: string; | ||
ogImageWidth: string; | ||
ogImageHeight: string; | ||
ogSiteName: string; | ||
ogType: string; | ||
ogTitle: string; | ||
ogUrl: string; | ||
ogDescription: string; | ||
title: string; | ||
oembedTitle: string; | ||
oembedAuthorName: string; | ||
twitterImage: string; | ||
oembedThumbnailUrl: string; | ||
}; | ||
headers: { | ||
contentType: string; | ||
}; | ||
parsedUrl: { | ||
host: string; | ||
hash: any; | ||
pathname: string; | ||
protocol: string; | ||
port: any; | ||
query: any; | ||
search: any; | ||
hostname: string; | ||
}; | ||
ignoreParse: boolean; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 6 additions & 4 deletions
10
app/lib/methods/helpers/parseUrls.js → app/lib/methods/helpers/parseUrls.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters