• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

LouisBrunner / dnd-multi-backend / 7105545454

05 Dec 2023 07:21PM CUT coverage: 98.498%. Remained the same
7105545454

push

github

web-flow
chore(deps-dev): bump @typescript-eslint/parser from 6.13.0 to 6.13.2 (#236)

Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 6.13.0 to 6.13.2.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.13.2/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

63 of 67 branches covered (0.0%)

Branch coverage included in aggregate %.

265 of 266 relevant lines covered (99.62%)

37.11 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

88.89
/packages/react-dnd-multi-backend/src/hooks/useObservePreviews.ts
1
import { useState, useEffect, useContext } from 'react'
108✔
2
import { DndContext, DndContextType } from 'react-dnd'
15✔
3
import { MultiBackendSwitcher } from 'dnd-multi-backend'
4

5
export const useObservePreviews = (): boolean => {
15✔
6
  const [enabled, setEnabled] = useState<boolean>(false)
63✔
7
  const dndContext = useContext<DndContextType>(DndContext)
63✔
8

9
  useEffect(() => {
63✔
10
    const backend = dndContext?.dragDropManager?.getBackend() as MultiBackendSwitcher
21!
11

12
    const observer = {
21✔
13
      backendChanged: (cbackend: MultiBackendSwitcher) => {
14
        setEnabled(cbackend.previewEnabled())
27✔
15
      },
16
    }
17

18
    setEnabled(backend.previewEnabled())
21✔
19

20
    backend.previewsList().register(observer)
21✔
21
    return () => {
21✔
22
      backend.previewsList().unregister(observer)
21✔
23
    }
24
  }, [dndContext, dndContext.dragDropManager])
25

26
  return enabled
63✔
27
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc