type-fest icon indicating copy to clipboard operation
type-fest copied to clipboard

Opposite of Simplify?

Open bombillazo opened this issue 10 months ago • 1 comments

Hello, is there a way to "unsimplify" a type so that it is not spread during some intellisense suggestions? For example

type MyType = {
  a: boolean,
  b: string,
  c: string,
  ...
  z: number,
}

type ParamUnion = MyType | TypeA | TypeBy

// do not expand the type definition of MyType when inspecting ParamUnion!
const myFunc = (param1: ParamUnion) => {
  ...
}

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • The funding will be given to active contributors.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

bombillazo avatar Oct 01 '23 15:10 bombillazo

I'm here looking for an opposite to Simplify because I want my interface methods to be preserved as methods rather than getting mapped to member variables when I apply type transforms to them, which then triggers ts(2425) for me.

electrovir avatar Mar 27 '24 20:03 electrovir