(node)
| 80035 | addLazyDiagnostic(function () { return checkTypeNameIsReserved(node.name, ts.Diagnostics.Type_parameter_name_cannot_be_0); }); |
| 80036 | } |
| 80037 | function checkTypeParameterDeferred(node) { |
| 80038 | if (ts.isInterfaceDeclaration(node.parent) || ts.isClassLike(node.parent) || ts.isTypeAliasDeclaration(node.parent)) { |
| 80039 | var typeParameter = getDeclaredTypeOfTypeParameter(getSymbolOfNode(node)); |
| 80040 | var modifiers = getVarianceModifiers(typeParameter); |
| 80041 | if (modifiers) { |
| 80042 | var symbol = getSymbolOfNode(node.parent); |
| 80043 | if (ts.isTypeAliasDeclaration(node.parent) && !(ts.getObjectFlags(getDeclaredTypeOfSymbol(symbol)) & (16 /* ObjectFlags.Anonymous */ | 32 /* ObjectFlags.Mapped */))) { |
| 80044 | error(node, ts.Diagnostics.Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types); |
| 80045 | } |
| 80046 | else if (modifiers === 32768 /* ModifierFlags.In */ || modifiers === 65536 /* ModifierFlags.Out */) { |
| 80047 | var source = createMarkerType(symbol, typeParameter, modifiers === 65536 /* ModifierFlags.Out */ ? markerSubType : markerSuperType); |
| 80048 | var target = createMarkerType(symbol, typeParameter, modifiers === 65536 /* ModifierFlags.Out */ ? markerSuperType : markerSubType); |
| 80049 | var saveVarianceTypeParameter = typeParameter; |
| 80050 | varianceTypeParameter = typeParameter; |
| 80051 | checkTypeAssignableTo(source, target, node, ts.Diagnostics.Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation); |
| 80052 | varianceTypeParameter = saveVarianceTypeParameter; |
| 80053 | } |
| 80054 | } |
| 80055 | } |
| 80056 | } |
| 80057 | function checkParameter(node) { |
| 80058 | // Grammar checking |
| 80059 | // It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs as the |
no test coverage detected
searching dependent graphs…