File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -18759,12 +18759,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
1875918759 if (relation === assignableRelation || relation === comparableRelation) {
1876018760 if (s & TypeFlags.Any) return true;
1876118761 // Type number is assignable to any computed numeric enum type or any numeric enum literal type, and
18762- // a numeric literal type is assignable to any numeric enum literal type with a matching value. These
18763- // rules exist such that enums can be used for bit-flag purposes.
18762+ // a numeric literal type is assignable any computed numeric enum type or any numeric enum literal type
18763+ // with a matching value. These rules exist such that enums can be used for bit-flag purposes.
1876418764 if (s & TypeFlags.Number && (t & TypeFlags.Enum || t & TypeFlags.NumberLiteral && t & TypeFlags.EnumLiteral)) return true;
18765- if (s & TypeFlags.NumberLiteral && !(s & TypeFlags.EnumLiteral) &&
18765+ if (s & TypeFlags.NumberLiteral && !(s & TypeFlags.EnumLiteral) && (t & TypeFlags.Enum ||
1876618766 t & TypeFlags.NumberLiteral && t & TypeFlags.EnumLiteral &&
18767- (source as NumberLiteralType).value === (target as NumberLiteralType).value) return true;
18767+ (source as NumberLiteralType).value === (target as NumberLiteralType).value)) return true;
1876818768 // Anything is assignable to a union containing undefined, null, and {}
1876918769 if (isUnknownLikeUnionType(target)) return true;
1877018770 }
You can’t perform that action at this time.
0 commit comments