TypeScript keyof returning specific type : <p>If I have the following type</p>

<pre><code>interface Foo {
    bar: string;
    baz: number;
    qux: string;
}
</code></pre>

<p>can I use <code>typeof</code> to type a parameter such that it only takes keys of <code>Foo</code> that return <code>string</code> (<code>'bar'</code> or <code>'qux'</code>)?</p>
