( factory: unknown, )
| 331 | * @param factory - A factory function or a dynamic value provider class |
| 332 | */ |
| 333 | export function isDynamicValueProviderClass<T = unknown>( |
| 334 | factory: unknown, |
| 335 | ): factory is DynamicValueProviderClass<T> { |
| 336 | // Not a class |
| 337 | if (typeof factory !== 'function' || !String(factory).startsWith('class ')) { |
| 338 | return false; |
| 339 | } |
| 340 | const valueMethod = (factory as DynamicValueProviderClass).value; |
| 341 | return typeof valueMethod === 'function'; |
| 342 | } |
| 343 | |
| 344 | /** |
| 345 | * Binding represents an entry in the `Context`. Each binding has a key and a |
no outgoing calls
no test coverage detected