Comment

Comment by angra_mainyu

Not to mention:

      type Thing = string | boolean;

      const arr: string[] = [];

      function add(item: Thing, dst: Thing[]): void {
        dst.push(item);
      }

      add(false, arr);

Is valid typescript.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton