2017-07-31 35 views

回答

0

我不認爲這是可能的,至於我爲什麼可以做一個大膽猜測:

interface IHuman { 
    age: number; 
    'friend.name': any; 
    friend: { 
     name: string; 
    } 
} 

const b: keyof IHuman = 'friend.name'; 

friend.name現在是ambigious。

0

我還沒有找到一個很好的解決方案。 但是你可能想看看typed-path項目。

The main idea of this project in a single image