Skip to content

Commit 7a61eb1

Browse files
committed
added types for sefaria#link method options
1 parent 6f9dd21 commit 7a61eb1

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

global.d.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -702,9 +702,21 @@ declare var hljs: any;
702702
declare var MathJax: any;
703703
// DOMPurify lib, TODO: types
704704
declare var DOMPurify: any;
705-
// Sefaria Linker (no known types)
705+
// Sefaria Linker (no known types), see https://developers.sefaria.org/docs/linker-v2
706706
declare var sefaria: {
707-
link: () => void
707+
link: (options?: {
708+
contentLang?: 'bilingual' | 'english' | 'hebrew',
709+
dynamic?: boolean,
710+
excludeFromLinking?: string,
711+
excludeFromTracking?: string,
712+
hidePopupsOnMobile?: boolean,
713+
interfaceLang?: 'english' | 'hebrew',
714+
mode?: 'link' | 'popup-click',
715+
parenthesesOnly?: boolean,
716+
popupStyles?: Record<string, string>,
717+
selector?: string,
718+
quotationOnly?: boolean
719+
}) => void
708720
} | undefined;
709721
declare var QPixel: QPixel;
710722

0 commit comments

Comments
 (0)