mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Add assertion.
This commit is contained in:
1 parent
915d4fc060
commit
40c3ffec91
1 file changed
+1
@@ -16130,6 +16130,7 @@ namespace ts {
|
||||
|
||||
if (isLiteralType(source) && !typeCouldHaveTopLevelSingletonTypes(target)) {
|
||||
generalizedSource = getBaseTypeOfLiteralType(source);
|
||||
Debug.assert(!isTypeAssignableTo(generalizedSource, target), "generalized source shouldn't be assignable");
|
||||
generalizedSourceType = getTypeNameForErrorDisplay(generalizedSource);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user