Skip to content

Commit a349877

Browse files
committed
types: fix test
1 parent 83333c4 commit a349877

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

types/test/index.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ import * as Rx from 'rxjs/Rx'
44

55
Vue.use(VueRX, Rx)
66

7-
var vm = new Vue({
7+
const vm1 = new Vue({
88
el: '#app',
99
subscriptions: {
1010
msg: Rx.Observable.interval(100)
1111
}
1212
})
1313

14-
vm.$observables.msg.subscribe(msg => console.log(msg))
14+
vm1.$observables.msg.subscribe(msg => console.log(msg))
1515

1616
Vue.component('foo', {
1717
subscriptions: function () {
@@ -25,7 +25,7 @@ new Vue({
2525
domStreams: ['plus$']
2626
})
2727

28-
var vm = new Vue({
28+
const vm2 = new Vue({
2929
data: {
3030
a: 1
3131
},
@@ -40,38 +40,38 @@ var vm = new Vue({
4040
})
4141

4242
// or produce side effects...
43-
vm.$watchAsObservable('a')
43+
vm2.$watchAsObservable('a')
4444
.subscribe(
4545
({ newValue, oldValue }) => console.log('stream value', newValue, oldValue),
4646
err => console.error(err),
4747
() => console.log('complete')
4848
)
4949

5050

51-
var vm = new Vue({
51+
new Vue({
5252
created () {
5353
this.$eventToObservable('customEvent')
5454
.subscribe((event) => console.log(event.name,event.msg))
5555
}
5656
})
5757

58-
var vm = new Vue({
58+
new Vue({
5959
mounted () {
6060
this.$subscribeTo(Rx.Observable.interval(1000), function (count) {
6161
console.log(count)
6262
})
6363
}
6464
})
6565

66-
var vm = new Vue({
66+
new Vue({
6767
subscriptions () {
6868
return {
6969
inputValue: this.$fromDOMEvent('input', 'keyup').pluck('target', 'value')
7070
}
7171
}
7272
})
7373

74-
var vm = new Vue({
74+
new Vue({
7575
subscriptions () {
7676
return {
7777
// requires `share` operator
@@ -80,7 +80,7 @@ var vm = new Vue({
8080
}
8181
})
8282

83-
var vm = new Vue({
83+
new Vue({
8484
subscriptions () {
8585
return {
8686
// requires `share` operator

types/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"es2015.promise"
99
],
1010
"strict": true,
11-
"allowSyntheticDefaultImports": true,
1211
"noEmit": true
1312
},
1413
"include": [

0 commit comments

Comments
 (0)