how to remove properties via mapped type in TypeScript : <p>Here is the code </p>

<pre><code>class A {
    x = 0;
    y = 0;
    visible = false;
    render() {

    }
}

type RemoveProperties&lt;T&gt; = {
    readonly [P in keyof T]: T[P] extends Function ? T[P] : never//;
};


var a = new A() as RemoveProperties&lt;A&gt;
a.visible // never
a.render() // ok!
</code></pre>

<p>I want to remove " visible / x / y " properties via RemoveProperties ,but I can only replace it with never</p>
