Test generics in object methods in TypeScript (#5989)

master
Chris Brody 2019-04-08 15:56:39 -04:00 committed by Lucas Duailibe
parent 4d6ce371fe
commit 6ae41067cf
3 changed files with 29 additions and 0 deletions

View File

@ -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, T>(k: K, t: T) {
return {k, t};
}
}
=====================================output=====================================
export default {
load<K, T>(k: K, t: T) {
return { k, t };
}
};
================================================================================
`;

View File

@ -0,0 +1 @@
run_spec(__dirname, ["typescript"]);

View File

@ -0,0 +1,5 @@
export default {
load<K, T>(k: K, t: T) {
return {k, t};
}
}