(thing: E)
| 116 | } |
| 117 | |
| 118 | export function isDisposable<E>(thing: E): thing is E & IDisposable { |
| 119 | return ( |
| 120 | typeof thing === 'object' && |
| 121 | thing !== null && |
| 122 | typeof (thing as unknown as IDisposable).dispose === 'function' && |
| 123 | (thing as unknown as IDisposable).dispose.length === 0 |
| 124 | ); |
| 125 | } |
| 126 | |
| 127 | export function dispose<T extends IDisposable>(disposable: T): T; |
| 128 | export function dispose<T extends IDisposable>( |
no outgoing calls
no test coverage detected