Last active
April 14, 2023 20:31
-
-
Save cjfswd/6512070e386725a16a0c46bc5f82efb0 to your computer and use it in GitHub Desktop.
typescript type to get an plain object attribute depth.
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
export type PlainObject<T> = { [K in keyof T]: T[K] extends object ? never : T[K] }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment