-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test generics in object methods in TypeScript
as proposed by @j-f1 in the following PR: #5824 should validate that issue #5817 does not reappear this change closes #5817 as resolved and tested this change closes #5824 (PR #5824) as superseded Co-authored-by: Jed Fox <git@twopointzero.us> Co-authored-by: Christopher J. Brody <chris@brody.consulting>
- Loading branch information
Showing
3 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }; | ||
} | ||
}; | ||
================================================================================ | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
run_spec(__dirname, ["typescript"]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export default { | ||
load<K, T>(k: K, t: T) { | ||
return {k, t}; | ||
} | ||
} |