Closed phiresky closed 3 years ago
I've added tests against Typescript 4.1-beta a while ago and didn't see any problems. I just upgraded to 4.1.2 and added a color
property but there's no error on that 🤔
String template literals will be used somehow. I'll ensure you that. But I see that as a major change so it will be on hold for a while until 4.1 is more established. It would cause chaos otherwise.
But I need more information regarding your other issue. Can you create a repository where you can reproduce the error?
sorry, turns out it wasn't the fault of this library. The problem was I have this in my code base somewhere:
declare global {
interface Number {
"~type": "number";
}
interface String {
"~type": "string";
}
}
This worked fine in the older versions, but in TS 4.1 apparently this means that all string & .... merges break.
TS 4.1
adds string literal type concatenation which should make this module work a lot better.
But also, it seems to make
(string & {} )
be never, so all the current types break.For example,
color: "#00d54f"
is an error: