Если T != undefinned => T
https://www.typescriptlang.org/play?#code/JYOwLgpgTgZghgYwgAgApQPYAcDOAeAFQD5kBvAKGSuQFcoAbALmRzClAHMBuS6rOKHAC2zVuxDdeVUMDAAROGDgB+ZgR4BfcuVCRYiFACUIARxoRWAYRqsMQgBIYMAazJbyYAJ5YjFrBhAcCAAxGhAEMGAAwhIAXmQAbQIAGmQAIyd6CDgQAF1tAHoCmDCIqJBka1sHJ2cYgAosTFxmUloGUTZOLmR+QREWLokemXlFOGYwgBMIGFAIKeQNAEpmBOnZ+anUjIwsnNyeIpLwyIDKmzA7RxcGpuwcVvamQfFuXoFhTreRkFkFJRqJarRIpdKZbJ5HjkE5lc5VK41W7ERrNR5oNExEHGHD+QIhUpnEAxCjUZBQCBgOgVBL3XAAOlGALgqXg9CC+Xc2gQAVYiSm41S9AwcCmnFyyHiCOutTwxjMFjA0qRziI9TadBeAHICmk4EEtak+l9kFqQAEIIbkEzxpMQDM5iAFsDCgAqZDkQCsIIBBEEA3CCADhBrX8xkpJbR7ZsnYtAEIggD4QQDMIIAWEEADCDIQBMILHAOwgacAAiDJwCSIMnPYAeEFjnuQmcAvCDJwDiIJ7K-7y8qbq54mFIwtUv7q3X01ncwWi6Xy1Xa-XG8hACIggGEQSuALhBAGIg-sDzdqYYIyFdBW05CAA
type ResponseFunction<T> = [T | undefined, boolean] 🤔
Обсуждают сегодня