mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-22 11:57:33 +08:00
[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:
2
types/jss/css.d.ts
vendored
2
types/jss/css.d.ts
vendored
@@ -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
types/jss/observable.d.ts
vendored
17
types/jss/observable.d.ts
vendored
@@ -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
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"csstype": "^2.0.0"
|
||||
"csstype": "^2.0.0",
|
||||
"indefinite-observable": "^1.0.1"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user