add TSTypeOperator (#1396)
parent
95d505843e
commit
15df9abf81
|
@ -1974,6 +1974,11 @@ function genericPrintNoParens(path, options, print, args) {
|
||||||
") => ",
|
") => ",
|
||||||
path.call(print, "typeAnnotation"),
|
path.call(print, "typeAnnotation"),
|
||||||
])
|
])
|
||||||
|
case "TSTypeOperator":
|
||||||
|
return concat([
|
||||||
|
"keyof ",
|
||||||
|
path.call(print, "typeAnnotation")
|
||||||
|
])
|
||||||
// TODO
|
// TODO
|
||||||
case "ClassHeritage":
|
case "ClassHeritage":
|
||||||
// TODO
|
// TODO
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`typeOperator.ts 1`] = `
|
||||||
|
let a: (keyof T)[] = ["a", "b"];
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
let a: (keyof T)[] = ["a", "b"];
|
||||||
|
|
||||||
|
`;
|
|
@ -0,0 +1 @@
|
||||||
|
run_spec(__dirname, { parser: "typescript" });
|
|
@ -0,0 +1 @@
|
||||||
|
let a: (keyof T)[] = ["a", "b"];
|
Loading…
Reference in New Issue