Rebasely Beta: data may be purged

justintypescript-ultra-strict Public

Text · 4 lines · 176 B · at 74947de

// x! asserts presence without proving it. Use Option and match instead.const first = (xs: string[]): string => xs.find((x) => x.length > 0)!;console.log(first(["", "a"]));