If you want to achieve this task effortlessly, you can utilize the Extract utility type in TypeScript. Here's an example:
type AllItems = keyof Items
type SelectedItems = Extract<keyof Items, 'selectedItem' | 'anotherSelectedItem'>
const allItemsValid: AllItems[] = ['selectedItem', 'anotherSelectedItem', 'item']
const allItemsInvalid: AllItems[] = ['selectedItem', 'invalid'] // Type '"invalid"' is not assignable to type '"selectedItem" | "anotherSelectedItem" | "item"'
const selectedItemsValid: SelectedItems[] = ['selectedItem', 'anotherSelectedItem']
const selectedItemsInvalid: SelectedItems[] = ['selectedItem', 'item'] // Type '"item"' is not assignable to type '"selectedItem" | "anotherSelectedItem"'.
Take a look at this Playground for a demo.