[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
This commit is contained in:
Brenton Simpson
2018-04-03 22:55:54 -07:00
parent 02ff115ce9
commit de655960b6
3 changed files with 3 additions and 19 deletions

2
types/jss/css.d.ts vendored
View File

@@ -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;

View File

@@ -1,17 +0,0 @@
// Copied from https://github.com/cssinjs/jss/blob/6ed7963786d5ef899075e95f81efc9530342154f/src/types.js
export type Observable<T> = {
subscribe(observerOrNext: ObserverOrNext<T>): Subscription
}
export type Observer<T> = {
next: NextChannel<T>
}
export type NextChannel<T> = (value: T) => void
export type ObserverOrNext<T> = Observer<T> | NextChannel<T>
export type Unsubscribe = () => void
export type Subscription = {
unsubscribe: Unsubscribe
}

View File

@@ -1,6 +1,7 @@
{
"private": true,
"dependencies": {
"csstype": "^2.0.0"
"csstype": "^2.0.0",
"indefinite-observable": "^1.0.1"
}
}