diff --git a/packages/roosterjs-content-model-core/lib/coreApi/setContentModel/persistHighlight.ts b/packages/roosterjs-content-model-core/lib/coreApi/setContentModel/persistHighlight.ts index 882c5cc0dc1..b013d86e22d 100644 --- a/packages/roosterjs-content-model-core/lib/coreApi/setContentModel/persistHighlight.ts +++ b/packages/roosterjs-content-model-core/lib/coreApi/setContentModel/persistHighlight.ts @@ -10,10 +10,6 @@ interface WindowWithHighlight extends Window { Highlight: typeof Highlight; } -export function isWindowWithHighlight(win: Window): win is WindowWithHighlight { - return !!(win as WindowWithHighlight).Highlight; -} - interface HighlightRegistryWithMap extends HighlightRegistry { set(name: string, highlight: Highlight): void; delete(name: string): void; @@ -33,6 +29,15 @@ interface CSSShim { declare const CSS: CSSShim; +/** + * @internal + * @param win current window that Highlight is being used. + * @returns boolean indicates if Highlight api is available + */ +export function isWindowWithHighlight(win: Window): win is WindowWithHighlight { + return !!(win as WindowWithHighlight).Highlight; +} + /** * @internal * Persist highlight of a indicated selection object