denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
93.95k stars 5.23k forks source link

[publish] slow types error with implicit string return #25097

Open teidesu opened 3 weeks ago

teidesu commented 3 weeks ago

mcve

any of the following fail to publish due to slow types:

export function foo() {
    return `hello ${123}`
}

export function bar() {
    return `hello`
}

export function baz() {
    return 'hello'
}

export const egg = () => `hello ${123}`

but compile successfully under --isolatedDeclarations

error

1 | export function foo() {
  |                 ^^^ this function is missing an explicit return type
  | 
  = hint: add an explicit return type to the function

  info: all functions in the public API must have an explicit return type
  docs: https://jsr.io/go/slow-type-missing-explicit-return-type
...etc...

version

deno 1.46.0-rc.1+526f39f

dsherret commented 3 weeks ago

Related: