microsoft / TypeScript

TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
https://www.typescriptlang.org
Apache License 2.0
100.44k stars 12.42k forks source link

Design Meeting Notes, 5/3/2024 #58429

Open DanielRosenwasser opened 5 months ago

DanielRosenwasser commented 5 months ago

Returnless functions in isolatedDeclarations

https://github.com/microsoft/TypeScript/issues/58330

/** Inferred as void */
export function f() {
    g();
}

/** Inferred as never */
export const x = () => {
    g();
};

function g(): never {
    throw null;
}

Expose a subset of current compiler options to type system

https://github.com/microsoft/TypeScript/pull/58396

Have a consistent position for where some errors are reported

57842

fatcerberus commented 5 months ago

FWIW, the never return type inference for arrow functions doesn't seem super useful - it can't be used for control flow anyway as that requires an explicit annotation.