Lines Matching defs:variable

38             checker->ThrowTypeError("Catch clause variable type annotation must be 'any' or 'unknown' if specified",
1045 expr->argument_, "The operand of an increment or decrement operator must be a variable or a property access",
1189 ASSERT(result.variable);
1193 if (result.variable->TsType() == nullptr) {
1194 checker->InferFunctionDeclarationType(result.variable->Declaration()->AsFunctionDecl(), result.variable);
1333 {"Cannot infer type for variable '", declarator->Id()->AsIdentifier()->Name(), "'."},
1345 {"Subsequent variable declaration must have the same type. Variable '",
1450 if (result.variable != nullptr &&
1451 result.variable->TsType()->HasTypeFlag(checker::TypeFlag::ENUM_LITERAL) &&
1452 result.variable->TsType()->AsEnumLiteralType()->Kind() == ENUM_LITERAL_TYPE) {
1713 static void AddEnumValueDeclaration(checker::TSChecker *checker, double number, varbinder::EnumVariable *variable)
1715 variable->SetTsType(checker->GlobalNumberType());
1725 decl->BindNode(variable->Declaration()->Node());
1736 decl->BindNode(variable->Declaration()->Node());
1740 enumVar->SetValue(variable->Declaration()->Name());
1754 void TSAnalyzer::InferEnumVariableType(varbinder::EnumVariable *variable, double *value, bool *initNext,
1758 const ir::Expression *init = variable->Declaration()->Node()->AsTSEnumMember()->Init();
1761 checker->ThrowTypeError("Enum member must have initializer.", variable->Declaration()->Node()->Start());
1765 variable->SetValue(++(*value));
1766 AddEnumValueDeclaration(checker, *value, variable);
1775 varbinder::EnumMemberResult res = EvaluateEnumMember(checker, variable, init);
1778 variable->SetTsType(checker->GlobalStringType());
1793 variable->SetValue(res);
1805 AddEnumValueDeclaration(checker, *value, variable);