Created
June 17, 2021 19:35
-
-
Save florianmartens/16568a8d1e5e35dbf5721c870e53d593 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 SmallerType { | |
foo: string; | |
baz: string; | |
} | |
let obj: SmallerType; | |
const smaller = { | |
// included in our requirements | |
foo: "foo", | |
baz: "bar", | |
// infinite number of other properties | |
zap: "zap", | |
yup: "yup", | |
} | |
obj = smaller; // -> works fine |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment