Tidy up link previews types
This commit is contained in:
6
js/modules/link_previews.d.ts
vendored
6
js/modules/link_previews.d.ts
vendored
@@ -1,3 +1,9 @@
|
||||
export function isLinkSafeToPreview(link: string): boolean;
|
||||
|
||||
export function findLinks(text: string, caretLocation?: number): Array<string>;
|
||||
|
||||
export function getDomain(href: string): string;
|
||||
|
||||
export function isLinkSneaky(link: string): boolean;
|
||||
|
||||
export function isStickerPack(href: string): boolean;
|
||||
|
14
ts/window.d.ts
vendored
14
ts/window.d.ts
vendored
@@ -3,6 +3,7 @@
|
||||
import * as Backbone from 'backbone';
|
||||
import * as Underscore from 'underscore';
|
||||
import { Ref } from 'react';
|
||||
import * as LinkPreviews from '../js/modules/link_previews.d';
|
||||
import * as Util from './util';
|
||||
import {
|
||||
ConversationModelCollectionType,
|
||||
@@ -358,18 +359,7 @@ declare global {
|
||||
VisualAttachment: any;
|
||||
};
|
||||
Util: typeof Util;
|
||||
LinkPreviews: {
|
||||
isMediaLinkInWhitelist: any;
|
||||
getTitleMetaTag: any;
|
||||
getImageMetaTag: any;
|
||||
assembleChunks: any;
|
||||
getChunkPattern: any;
|
||||
isLinkInWhitelist: any;
|
||||
isStickerPack: (url: string) => boolean;
|
||||
isLinkSafeToPreview: (url: string) => boolean;
|
||||
findLinks: (body: string, unknown?: any) => Array<string>;
|
||||
getDomain: (url: string) => string;
|
||||
};
|
||||
LinkPreviews: typeof LinkPreviews;
|
||||
GroupChange: {
|
||||
renderChange: (change: unknown, things: unknown) => Array<string>;
|
||||
};
|
||||
|
Reference in New Issue
Block a user