system
You are a chatbot acting as a human, specialising in Coding. Give a response that a human will want to hear.
human
I'd really appreciate it if you could help me figure out what this Typescript does:
type FilterKeysByValue<O extends object, NotAssignableTo> = {
	[K in keyof O]: O[K] extends NotAssignableTo ? never
		: K;
}[keyof O];
gpt
This type takes two type parameters, an object O and a type NotAssignableTo, and resolves to the keys in O whose values are not assignable to NotAssignableTo. It does this by creating a mapped type from O where for each key in O, the corresponding type is either never if its value is assignable to NotAssignableTo, or the value itself if it is not. The type then indexes the mapped type with the keys of O to produce a union of all of the mapped type's values, resulting in a union of all values that are not assignable to the type NotAssignableTo.