Merge pull request #24710 from appsforartists/jss-obs

[jss] Use indefinite-observable for Observable typings
This commit is contained in:
Nathan Shively-Sanders
2018-04-04 08:44:42 -07:00
committed by GitHub
3 changed files with 3 additions and 19 deletions
+1 -1
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;
-17
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
}
+2 -1
View File
@@ -1,6 +1,7 @@
{
"private": true,
"dependencies": {
"csstype": "^2.0.0"
"csstype": "^2.0.0",
"indefinite-observable": "^1.0.1"
}
}