forked from mystiq/hydrogen-web
fix ts errors
This commit is contained in:
parent
a97d235cf5
commit
d9e6164a5c
1 changed files with 3 additions and 3 deletions
|
@ -217,7 +217,7 @@ export function tests() {
|
|||
},
|
||||
"flatMap.get": assert => {
|
||||
const a = new ObservableValue<undefined | {count: ObservableValue<number>}>(undefined);
|
||||
const countProxy = a.flatMap(a => a.count);
|
||||
const countProxy = a.flatMap(a => a!.count);
|
||||
assert.strictEqual(countProxy.get(), undefined);
|
||||
const count = new ObservableValue<number>(0);
|
||||
a.set({count});
|
||||
|
@ -226,7 +226,7 @@ export function tests() {
|
|||
"flatMap update from source": assert => {
|
||||
const a = new ObservableValue<undefined | {count: ObservableValue<number>}>(undefined);
|
||||
const updates: (number | undefined)[] = [];
|
||||
a.flatMap(a => a.count).subscribe(count => {
|
||||
a.flatMap(a => a!.count).subscribe(count => {
|
||||
updates.push(count);
|
||||
});
|
||||
const count = new ObservableValue<number>(0);
|
||||
|
@ -236,7 +236,7 @@ export function tests() {
|
|||
"flatMap update from target": assert => {
|
||||
const a = new ObservableValue<undefined | {count: ObservableValue<number>}>(undefined);
|
||||
const updates: (number | undefined)[] = [];
|
||||
a.flatMap(a => a.count).subscribe(count => {
|
||||
a.flatMap(a => a!.count).subscribe(count => {
|
||||
updates.push(count);
|
||||
});
|
||||
const count = new ObservableValue<number>(0);
|
||||
|
|
Loading…
Reference in a new issue