Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

    function* operation() {
      //@ts-expect-error `string` is not assignable to `number`!
      let count = yield* createString();
      return count.toExponential()
    }
Is this a typo? How does the compiler know that count should be a number?



Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: