2017-04-08 17:52:38 +03:00
|
|
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
exports[`class_method_default_parameters.js 1`] = `
|
|
|
|
====================================options=====================================
|
|
|
|
parsers: ["flow"]
|
|
|
|
printWidth: 80
|
|
|
|
| printWidth
|
|
|
|
=====================================input======================================
|
2017-04-12 23:41:51 +03:00
|
|
|
class A {
|
2017-04-08 17:52:38 +03:00
|
|
|
|
|
|
|
b: string;
|
|
|
|
|
|
|
|
c(d = this.b) { // ok - can use \`this\` in function default parameter values
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
e() {
|
|
|
|
return this.b;
|
|
|
|
}
|
|
|
|
|
|
|
|
f(g = this.e()) { // ok - can use \`this\` in function default parameter values
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
h(i: number = this.b) { // error
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2018-11-25 11:21:14 +03:00
|
|
|
|
|
|
|
=====================================output=====================================
|
2017-04-08 17:52:38 +03:00
|
|
|
class A {
|
|
|
|
b: string;
|
|
|
|
|
|
|
|
c(d = this.b) {
|
|
|
|
// ok - can use \`this\` in function default parameter values
|
|
|
|
}
|
|
|
|
|
|
|
|
e() {
|
|
|
|
return this.b;
|
|
|
|
}
|
|
|
|
|
|
|
|
f(g = this.e()) {
|
|
|
|
// ok - can use \`this\` in function default parameter values
|
|
|
|
}
|
|
|
|
|
|
|
|
h(i: number = this.b) {
|
|
|
|
// error
|
|
|
|
}
|
|
|
|
}
|
2017-04-12 23:41:51 +03:00
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
================================================================================
|
2017-04-08 17:52:38 +03:00
|
|
|
`;
|