Last active
October 14, 2023 12:42
-
-
Save ar90n/c9bb1631f28265a65955e60f29bbb7c1 to your computer and use it in GitHub Desktop.
K extends keyof T in TS
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
# Typescriptにおける`K extends keyof T`の考え方 | |
`keyof T`は`T`に含まれるキー名のリテラル型のUnionnいなる。 | |
なので、そのUnionに含まれる各リテラル型の値は`extends keyof T`を満たす |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment