Created
May 5, 2020 03:44
-
-
Save sota1235/cd369d0e399152376e7aed5190954742 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// will be used for type definition of select method for RDB | |
type ObjectKeys<T extends { [key: string]: any }> = keyof T; | |
function test<TRecord>( | |
columns: ObjectKeys<TRecord>[], | |
) { | |
console.log(columns); | |
} | |
test<{ | |
id: number, | |
hoge: string, | |
moge: number, | |
}>(['id', 'hoge']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment