Absolutely. It's contrived example. If you control the API, you'd be better to rewrite it:
type Current = { amps: number; };
type Ac = { kind: "ac" } & Current;
type Dc = { kind: "dc" } & current;
const currentToDc = (c: Current): Dc => ...
const acToDc = (c: Ac): Dc => ...
And it would flow more naturally. Or define a CurrentKind and include it in current if you don't need to handle the scalar. There are plenty of better ways. That's also something that you can become accustomed to and recognize when you have a weak API.
I'm not really trying to make a case for `satifies`, but it can be handy and clean in some circumstances, especially when you're constrained by a third-party API.
I'm not really trying to make a case for `satifies`, but it can be handy and clean in some circumstances, especially when you're constrained by a third-party API.