туплю, пробовал через infer 🤔
https://www.typescriptlang.org/play/index.html?target=6#code/MYewdgzgLgBADgJxHCMC8MDaAoGMDeueMYAhgLYCmAXDAETAAWAlgDYAmClYdANEXigBPODXoAlSqWBQAciHaUYAHxjQEzMAHM6RAL788hYiQpiGrUhAiyzfATGGjaddZp37DBB2SovypAhamvYmTuZgAK7kAEaUCLp4BkTGxL7mAQAeAMIgkWBQEKHE4S5RsfGJMHrYALowVjCgkFAA3NjYAPSdMID8IIB8IIDcIIDCIIDiIIAcIIBCIIAyIDCAgiCDgKwggCwgw4ByIICSIIuLXT3hplSoGADkTGyc3McqMKeW1rZUV6rHAUGaTzdZufmFxx1AA
type names = typeof props[number]['name']; – вот так пойдёт? мб можно и лучше
https://www.typescriptlang.org/play/index.html?target=6#code/MYewdgzgLgBADgJxHCMC8MDaAoGMDeueMYAhgLYCmAXDAETAAWAlgDYAmClYdANEXigBPODXoAlSqWBQAciHaUYAHxjQEzMAHM6RAL788hYiQpiGrUhAiyzfATGGjaddZp37DBB2SovypAhamvYmTuZgAK7kAEaUCLp4BkTGxL7mAQAeAMIgkWBQEKHE4S5RsfGJMHrYALowVjCgkFAA3NjY4TAAgggIpEIAoqyUVAUAPAAqMJSZUNzsqJKk7OCsQr39QuOkYEIAfPvoRNOz82CLMMurYOubA+OaAGbxV0cA-FcwtGCUAG7xDpdWxUVAYe5DEZjKDjcIgJ7wJAofaYOjpOi1DoAeixMEA-CCAPhBANwggGEQQDiIIAOEEAQiCAGRAYIBBECJgFYQQAsICTAHIggEkQJlM7A4xwiJTpMEwADkTDYnG4opUYuAlmsIMoMtUooCQU0KrFWVy+UKoo6QA
Обсуждают сегодня