Fix variance location (#2261)
Turns out when we refactored for TS, we moved it before "static" and it no longer parses. Oops.master
parent
38d4661ba9
commit
f71fcd0b65
|
@ -1725,10 +1725,6 @@ function genericPrintNoParens(path, options, print, args) {
|
|||
return concat(parts);
|
||||
case "ClassProperty":
|
||||
case "TSAbstractClassProperty": {
|
||||
const variance = getFlowVariance(n);
|
||||
if (variance) {
|
||||
parts.push(variance);
|
||||
}
|
||||
if (n.accessibility) {
|
||||
parts.push(n.accessibility + " ");
|
||||
}
|
||||
|
@ -1741,6 +1737,10 @@ function genericPrintNoParens(path, options, print, args) {
|
|||
if (n.readonly) {
|
||||
parts.push("readonly ");
|
||||
}
|
||||
const variance = getFlowVariance(n);
|
||||
if (variance) {
|
||||
parts.push(variance);
|
||||
}
|
||||
if (n.computed) {
|
||||
parts.push("[", path.call(print, "key"), "]");
|
||||
} else {
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`variance.js 1`] = `
|
||||
class Route {
|
||||
static +param: T;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
class Route {
|
||||
static +param: T;
|
||||
}
|
||||
|
||||
`;
|
|
@ -0,0 +1 @@
|
|||
run_spec(__dirname, null, ["babylon"]);
|
|
@ -0,0 +1,3 @@
|
|||
class Route {
|
||||
static +param: T;
|
||||
}
|
Loading…
Reference in New Issue