- {showCloseButton && (
-
- )}
-
- {hoverOrError === LOADING ? (
-
-
-
- ) : isErrorLike(hoverOrError) ? (
-
-
- Error fetching hover from language server:
-
- {upperFirst(hoverOrError.message)}
-
- ) : (
- children
- )}
-
- {actionsOrError === null ? (
-
- No definition found
-
- ) : isErrorLike(actionsOrError) ? (
-
-
- Error finding definition:
- {' '}
- {upperFirst(actionsOrError.message)}
-
- ) : (
- actionsOrError !== undefined &&
- actionsOrError !== LOADING && (
-
- {actionsOrError.map((action, i) => (
-
- ))}
-
- )
- )}
-
-)
diff --git a/src/hoverifier.test.ts b/src/hoverifier.test.ts
index 0bb1f848..7ae6349c 100644
--- a/src/hoverifier.test.ts
+++ b/src/hoverifier.test.ts
@@ -4,6 +4,7 @@ import { EMPTY, NEVER, Observable, of, Subject, Subscription } from 'rxjs'
import { distinctUntilChanged, filter, map } from 'rxjs/operators'
import { TestScheduler } from 'rxjs/testing'
+import { ErrorLike } from './errors'
import { propertyIsDefined } from './helpers'
import {
AdjustmentDirection,
@@ -14,12 +15,11 @@ import {
PositionJump,
TOOLTIP_DISPLAY_DELAY,
} from './hoverifier'
-import { HoverOverlayProps } from './HoverOverlay'
import { findPositionsFromEvents, SupportedMouseEvent } from './positions'
import { CodeViewProps, DOM } from './testutils/dom'
import { createHoverAttachment, createStubActionsFetcher, createStubHoverFetcher } from './testutils/fixtures'
import { dispatchMouseEventAtPositionImpure } from './testutils/mouse'
-import { LOADING } from './types'
+import { HoverAttachment, LOADING } from './types'
describe('Hoverifier', () => {
const dom = new DOM()
@@ -382,7 +382,10 @@ describe('Hoverifier', () => {
1}ms b`
const outputValues: {
- [key: string]: Pick