(sourceSignature, targetSignature, reportErrors)
| 66843 | return -1 /* Ternary.True */; |
| 66844 | } |
| 66845 | function constructorVisibilitiesAreCompatible(sourceSignature, targetSignature, reportErrors) { |
| 66846 | if (!sourceSignature.declaration || !targetSignature.declaration) { |
| 66847 | return true; |
| 66848 | } |
| 66849 | var sourceAccessibility = ts.getSelectedEffectiveModifierFlags(sourceSignature.declaration, 24 /* ModifierFlags.NonPublicAccessibilityModifier */); |
| 66850 | var targetAccessibility = ts.getSelectedEffectiveModifierFlags(targetSignature.declaration, 24 /* ModifierFlags.NonPublicAccessibilityModifier */); |
| 66851 | // A public, protected and private signature is assignable to a private signature. |
| 66852 | if (targetAccessibility === 8 /* ModifierFlags.Private */) { |
| 66853 | return true; |
| 66854 | } |
| 66855 | // A public and protected signature is assignable to a protected signature. |
| 66856 | if (targetAccessibility === 16 /* ModifierFlags.Protected */ && sourceAccessibility !== 8 /* ModifierFlags.Private */) { |
| 66857 | return true; |
| 66858 | } |
| 66859 | // Only a public signature is assignable to public signature. |
| 66860 | if (targetAccessibility !== 16 /* ModifierFlags.Protected */ && !sourceAccessibility) { |
| 66861 | return true; |
| 66862 | } |
| 66863 | if (reportErrors) { |
| 66864 | reportError(ts.Diagnostics.Cannot_assign_a_0_constructor_type_to_a_1_constructor_type, visibilityToString(sourceAccessibility), visibilityToString(targetAccessibility)); |
| 66865 | } |
| 66866 | return false; |
| 66867 | } |
| 66868 | } |
| 66869 | function typeCouldHaveTopLevelSingletonTypes(type) { |
| 66870 | // Okay, yes, 'boolean' is a union of 'true | false', but that's not useful |
no test coverage detected
searching dependent graphs…