Created
April 14, 2019 01:26
-
-
Save ebroder/dc253a63a7f120ac76d7dea004bd9ba2 to your computer and use it in GitHub Desktop.
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
interface Test { | |
x: string | |
}; | |
function test<T extends Test>() { | |
const y: Partial<T> = { x: "foo" }; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
c.f. https://www.typescriptlang.org/play/#src=interface%20Test%20%7B%0D%0A%20%20x%3A%20string%0D%0A%7D%3B%0D%0Afunction%20test%3CT%20extends%20Test%3E()%20%7B%0D%0A%20%20const%20y%3A%20Partial%3CT%3E%20%3D%20%7B%20x%3A%20%22foo%22%20%7D%3B%0D%0A%7D%0D%0A