mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-24 14:14:32 -06:00
Fix lint errors
This commit is contained in:
parent
33b81095a6
commit
cf55bf91a0
@ -7218,10 +7218,6 @@ namespace ts {
|
||||
type;
|
||||
}
|
||||
|
||||
function getBaseTypeIfUnitType(type: Type): Type {
|
||||
return isUnitType(type) ? getBaseTypeOfLiteralType(type) : type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a Type was written as a tuple type literal.
|
||||
* Prefer using isTupleLikeType() unless the use of `elementTypes` is required.
|
||||
@ -10788,7 +10784,7 @@ namespace ts {
|
||||
checkClassPropertyAccess(node, left, apparentType, prop);
|
||||
}
|
||||
|
||||
let propType = getTypeOfSymbol(prop);
|
||||
const propType = getTypeOfSymbol(prop);
|
||||
|
||||
// Only compute control flow type if this is a property access expression that isn't an
|
||||
// assignment target, and the referenced property was declared as a variable, property,
|
||||
@ -13405,20 +13401,6 @@ namespace ts {
|
||||
return getBestChoiceType(type1, type2);
|
||||
}
|
||||
|
||||
function typeContainsLiteralFromEnum(type: Type, enumType: EnumType) {
|
||||
if (type.flags & TypeFlags.Union) {
|
||||
for (const t of (<UnionType>type).types) {
|
||||
if (t.flags & TypeFlags.EnumLiteral && (<EnumLiteralType>t).baseType === enumType) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (type.flags & TypeFlags.EnumLiteral) {
|
||||
return (<EnumLiteralType>type).baseType === enumType;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function checkLiteralExpression(node: Expression): Type {
|
||||
if (node.kind === SyntaxKind.NumericLiteral) {
|
||||
checkGrammarNumericLiteral(<LiteralExpression>node);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user