In that case try overload signatures. type Boss = Official | Monarch; const bossName ... 2020 · We can use the lookup type together with the keyof operator, ...
確定! 回上一頁