
CAUTION
Some files are private or not ready yet, if a link gives you a 404 that's why :)
This is a work in progress, new notes will be added daily
List of note Indexes
๐ PROJECTS๐ ART๐ TECHNOLOGY๐ SCIENCE๐ PHILO-PSYCHO๐ HISTORY๐ HEALTH๐ GAMING๐ KNOWLEDGE
.... |\| .|||. |\/| .|\\. .|.
.\\||/|. .\|..|| .\|..|||...||.....
.| .....||.|\\\\\\ ... |\\\/. .\\. .||
.\\| .|\\|..|\\ .\\\\ .\\|. .\\\\\| |\| |\\|
|\\ |\\|.. /\\\. |\|\\ \\\\|. .|\\. .\\\\|
.\\. |\\\\\\\|.. .\\| .\\||\\/|. |\\| .|/\|
\. .\\\||/\|.... \\| |\/ |\\\ |\\\| .\\| \\| ....
|\/ |\\| |\\\\\\\| |\|.\\\ \\\\. |\\\\| |\\ \\. ||..
..|||\| .. .\\\\. |\\\\\\ .\\|....|\\\. |\\\\\\ |/. |/
\\\|.. .\\\ |\\. .\\\| \\| |||\\\. ...|\\/||. .\\\
|\| |\/. /\\\\\| .\\\\. \\. .../|. .|\\\|. |\\\| |\\
. |||\\|. ..||| .\\|. |\| \\|..../\\| |\\| .\\\\\ ..
\\| .||\|.|.. |\\\|./\ \\||\. ||... .\\\\/. |\/||
..|/||. |\\\\\|. .|/\| ||. .||\\\ .|||. |\
.\/| \\\. .|\\\|||\\\||.. .|\\\\\\\|\\\\. /\\\\||. |
.|| |\\\\| .......|\\\\\\. .\\\. ..|||.... .\\\\|.. ...
\\||....|\\\\\\\\||\\\\\\\/ |\|....|||\\\\\\\/....|\\\|
||.|\||\\| .....|\\\\..\\| .|\\\. ||........ .|\|...
. |\ /\\/\\\\\\. |\. .\\\\\\. ./\\\\/ |\\\||.
.|\.|\| .|\|... .. ./\\|..|\\| ..
.|\\| .\\\\.\\\\\\\ \||...\\\|..|\\\|.||
|\. ..||....|| ... ..||\\\. .|.
... .......
โ TypeScript
TypeScript - Extract Keys Of Specified Type
Helper type to extracts the keys of an object matching a defined type
type ValuesOf<T> = T[keyof T]
/**
* Get all the keys where the values are `TCondition` (string/number...)
*/
type ExtractKeysWhereValuesAreOfType<T, TCondition> = ValuesOf<{
[K in keyof T]: T[K] extends TCondition ? K : never
}>
example :
type ExtractStringKeys<T> = ExtractKeysWhereValuesAreOfType<T, string>
type Obj = {
id: string
name: string
age: 1
}
// type Example = "id" | "name"
type Example = ExtractStringKeys<Obj>