Comment

Comment by domlebo70

To OP: You could avoid the visitor by using an IIFE style switch using the run utility fn:

    export const run = <T>(f: () => T): T => f();
Now you can go:

    const inferred_type = run(() => {
      switch(blah) {
        ...
      }
    })
parent domlebo70 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton