summaryrefslogtreecommitdiffstats
path: root/test/types/global-dispatcher.test-d.ts
blob: 428b80911d3adf58b9e1de0f4af84689da84667b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
import { expectAssignable } from 'tsd'
import { setGlobalDispatcher, Dispatcher, getGlobalDispatcher } from '../..'

{
  expectAssignable<void>(setGlobalDispatcher(new Dispatcher()))
  class CustomDispatcher extends Dispatcher {}
  expectAssignable<void>(setGlobalDispatcher(new CustomDispatcher()))
}

{
  expectAssignable<Dispatcher>(getGlobalDispatcher())
}