Found during the async admission audit (#473, #475, tracker #416), independently of the receiver/callback fix #479.
With the same strict/noEmit/noLib/skipLibCheck project and minimal declarations, TS 6.0.3 and native TS 7.0.2 report TS2322, TS2345 and TS2339 for this global script. Home accepts it without diagnostics:
interface Methods { identity(value: string): string; }
declare var methods: Methods;
const good: string = methods.identity('ok');
const bad: number = methods.identity('ok');
methods.identity(1);
methods.missing();Adding export {}; makes Home report the same three diagnostic codes as both baselines. The global-script input must be fixed as-is, not changed into a module to make it pass.
A generic static interface reproduces the same erasure without Promise-specific names:
interface DeferredConstructor { identity<T>(value: T): T; }
declare var Deferred: DeferredConstructor;
const good: string = Deferred.identity('ok');
const bad: number = Deferred.identity('ok');Both baselines report TS2322 in either scope; Home reports it only in module scope.
The checker’s bare type-reference branch returns any when programHasGlobalTypeName succeeds, before consulting the actual local type_names declaration. Program-wide name collection must not erase an available typed declaration. Preserve forward references, declaration merging, genuine global declarations across files and module-local isolation. Add shared positive/negative CLI and program-level regressions; do not implement name-specific exceptions for standard-library globals. This is a prerequisite for checking real PromiseConstructor/Promise.all declarations rather than accepting their results as any.