diff --git a/tests/typescript_generic/__snapshots__/jsfmt.spec.js.snap b/tests/typescript_generic/__snapshots__/jsfmt.spec.js.snap new file mode 100644 index 000000000..3009a3eb7 --- /dev/null +++ b/tests/typescript_generic/__snapshots__/jsfmt.spec.js.snap @@ -0,0 +1,23 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`object-method.ts 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export default { + load(k: K, t: T) { + return {k, t}; + } +} + +=====================================output===================================== +export default { + load(k: K, t: T) { + return { k, t }; + } +}; + +================================================================================ +`; diff --git a/tests/typescript_generic/jsfmt.spec.js b/tests/typescript_generic/jsfmt.spec.js new file mode 100644 index 000000000..2ea3bb6eb --- /dev/null +++ b/tests/typescript_generic/jsfmt.spec.js @@ -0,0 +1 @@ +run_spec(__dirname, ["typescript"]); diff --git a/tests/typescript_generic/object-method.ts b/tests/typescript_generic/object-method.ts new file mode 100644 index 000000000..9d104237b --- /dev/null +++ b/tests/typescript_generic/object-method.ts @@ -0,0 +1,5 @@ +export default { + load(k: K, t: T) { + return {k, t}; + } +}