Type alias OnUseFn<T>

OnUseFn<T>: ((arg) => void | Unsubscriber)

Type of a function that is called when the number of subscribers changes from 0 to 1 (but not called when the number of subscribers changes from 1 to 2, ...).

If it returns a function, that function will be called when the number of subscribers changes from 1 to 0.

Type Parameters

  • T

Type declaration

Generated using TypeDoc