prettier/tests/flow/class_method_default_parame.../__snapshots__/jsfmt.spec.js.snap

54 lines
1.1 KiB
Plaintext

// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`class_method_default_parameters.js 1`] = `
====================================options=====================================
parsers: ["flow"]
printWidth: 80
| printWidth
=====================================input======================================
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
}
}
=====================================output=====================================
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
}
}
================================================================================
`;