From de655960b603d6b47f7030674f084780c76e045f Mon Sep 17 00:00:00 2001 From: Brenton Simpson Date: Tue, 3 Apr 2018 22:55:54 -0700 Subject: [PATCH] [jss] Use indefinite-observable for Observable typings The ones in HEAD are copy-pasted from there. Lets link to the original source. Continuation of #24078 --- types/jss/css.d.ts | 2 +- types/jss/observable.d.ts | 17 ----------------- types/jss/package.json | 3 ++- 3 files changed, 3 insertions(+), 19 deletions(-) delete mode 100644 types/jss/observable.d.ts diff --git a/types/jss/css.d.ts b/types/jss/css.d.ts index 2da9aa04b4..2d5e89139a 100644 --- a/types/jss/css.d.ts +++ b/types/jss/css.d.ts @@ -1,6 +1,6 @@ // These CSS typings adapted from TypeStyle: https://github.com/typestyle/typestyle -import { Observable } from './observable'; +import { Observable } from 'indefinite-observable'; import * as csstype from 'csstype'; type Length = string | number; diff --git a/types/jss/observable.d.ts b/types/jss/observable.d.ts deleted file mode 100644 index ff6a5f0219..0000000000 --- a/types/jss/observable.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -// Copied from https://github.com/cssinjs/jss/blob/6ed7963786d5ef899075e95f81efc9530342154f/src/types.js - -export type Observable = { - subscribe(observerOrNext: ObserverOrNext): Subscription -} - -export type Observer = { - next: NextChannel -} - -export type NextChannel = (value: T) => void -export type ObserverOrNext = Observer | NextChannel - -export type Unsubscribe = () => void -export type Subscription = { - unsubscribe: Unsubscribe -} diff --git a/types/jss/package.json b/types/jss/package.json index f3be220fbc..59a8354d7d 100644 --- a/types/jss/package.json +++ b/types/jss/package.json @@ -1,6 +1,7 @@ { "private": true, "dependencies": { - "csstype": "^2.0.0" + "csstype": "^2.0.0", + "indefinite-observable": "^1.0.1" } }