mirror of
https://github.com/hanzoai/prettier.git
synced 2026-09-24 17:02:04 +00:00
26 lines
286 B
JavaScript
26 lines
286 B
JavaScript
/* @flow */
|
|
|
|
class A {
|
|
x: {[k:string]: number};
|
|
|
|
m1() {
|
|
this.x = { bar: 0 }; // no error
|
|
}
|
|
|
|
m2() {
|
|
this.x.foo = 0; // no error
|
|
}
|
|
}
|
|
|
|
class B {
|
|
x: {[k:string]: number};
|
|
|
|
m2() {
|
|
this.x.foo = 0; // no error
|
|
}
|
|
|
|
m1() {
|
|
this.x = { bar: 0 }; // no error
|
|
}
|
|
}
|