Actualizacion maquina principal
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / rxjs / src / internal / util / isObservable.ts
diff --git a/.config/coc/extensions/node_modules/coc-prettier/node_modules/rxjs/src/internal/util/isObservable.ts b/.config/coc/extensions/node_modules/coc-prettier/node_modules/rxjs/src/internal/util/isObservable.ts
new file mode 100644 (file)
index 0000000..f3df524
--- /dev/null
@@ -0,0 +1,10 @@
+import { Observable } from '../Observable';
+import { ObservableInput } from '../types';
+
+/**
+ * Tests to see if the object is an RxJS {@link Observable}
+ * @param obj the object to test
+ */
+export function isObservable<T>(obj: any): obj is Observable<T> {
+  return !!obj && (obj instanceof Observable || (typeof obj.lift === 'function' && typeof obj.subscribe === 'function'));
+}