Effect CommunityEC
Effect Communityβ€’2y agoβ€’
51 replies
ssalbdivad

TypeScript Declaration Emit Issue in 5.5

IIRC Effect uses the naming strategy in some cases where a type shares a name with its runtime value? E.g.

foo.ts
export const descriptions = {
  foo: "bar"
}

export type descriptions = typeof descriptions


Heads up in case anyone is using this that the emitted declarations are broken in 5.5:

foo.d.ts
export declare const descriptions: typeof descriptions;
export type descriptions = typeof descriptions;


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

Ryan tagged it as 5.6 which IMO would be insane because the repro is very simple and it leads to library types being silently resolved to
any
, so maybe worth adding your thoughts there as well if this would affect you 😬
Was this page helpful?