(
name: string,
theClass: new (...args: any[]) => T
)
| 130 | } |
| 131 | |
| 132 | export function createInstanceofPredicate<T>( |
| 133 | name: string, |
| 134 | theClass: new (...args: any[]) => T |
| 135 | ): (x: any) => x is T { |
| 136 | const propName = "isMobX" + name |
| 137 | theClass.prototype[propName] = true |
| 138 | return function (x) { |
| 139 | return isObject(x) && x[propName] === true |
| 140 | } as any |
| 141 | } |
| 142 | |
| 143 | /** |
| 144 | * Yields true for both native and observable Map, even across different windows. |
no test coverage detected
searching dependent graphs…