47 lines
758 B
Plaintext
47 lines
758 B
Plaintext
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`class_method_default_parameters.js 1`] = `
|
|
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
|
|
|
|
}
|
|
|
|
}
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
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
|
|
}
|
|
}
|
|
|
|
`;
|