ts-is-present
ts-is-present copied to clipboard
Thank you 🫶
Thank you for serving us so well all these years. 🫶 Today is the day we have to say goodbye though. 👋 Thanks to the new Inferred Type Predicates feature being released today as part of Typescript 5.5 🚀
-const nums = [1, 2, 3, null, 5].filter(isPresent);
+const nums = [1, 2, 3, null, 5].filter(x => x !== null);