Created
December 14, 2021 01:00
-
-
Save akaptur/e986a737d77903d167c4d9c70ca75569 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
type A = { | |
value: string; | |
}; | |
type B = { | |
value: string; | |
}; | |
function my_func(a: A): string { | |
return a.value; | |
} | |
my_func({value: "hi"}); // no error here! | |
const b: B = {value: "hi"}; | |
my_func(b); // no error here either! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment