mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-11-30 02:01:46 +00:00
Elaborate on observable testing
This commit is contained in:
@@ -10,9 +10,14 @@ const jss = createJSS().setup({});
|
||||
const styleSheet = jss.createStyleSheet<string>(
|
||||
{
|
||||
ruleWithMockObservable: {
|
||||
subscribe: () => ({
|
||||
unsubscribe() {}
|
||||
})
|
||||
subscribe: observer => {
|
||||
const next = typeof observer === 'function' ? observer : observer.next;
|
||||
next({ background: 'blue', display: 'flex' });
|
||||
next({ invalidKey: 'blueish' }); // $ExpectError
|
||||
return {
|
||||
unsubscribe() {}
|
||||
};
|
||||
}
|
||||
},
|
||||
container: {
|
||||
display: 'flex',
|
||||
|
||||
Reference in New Issue
Block a user