Check out this code snippet:
class A {
x = 0;
y = 0;
visible = false;
render() {
}
}
type RemoveProperties<T> = {
readonly [P in keyof T]: T[P] extends Function ? T[P] : never//;
};
var a = new A() as RemoveProperties<A>
a.visible // never
a.render() // ok!
I'm trying to use the RemoveProperties function to eliminate the "visible / x / y" properties, but it seems that I can only replace them with 'never'.