Dart "lost" because it was a completely different language than JavaScript, with completely different , much smaller ecosystem of libraries and thus huge switching costs.
TypeScript, being a type system over JavaScript, re-uses JavaScript ecosystem and allowed incremental adoption.
Dart is now "winning" because Flutter is a very good way to write once and deploy on Android and iOS (and maybe in the future on web and desktop). That drives adoption of Dart and builds ecosystem of libraries.