(node)
| 86971 | return false; |
| 86972 | } |
| 86973 | function isImplementationOfOverload(node) { |
| 86974 | if (ts.nodeIsPresent(node.body)) { |
| 86975 | if (ts.isGetAccessor(node) || ts.isSetAccessor(node)) |
| 86976 | return false; // Get or set accessors can never be overload implementations, but can have up to 2 signatures |
| 86977 | var symbol = getSymbolOfNode(node); |
| 86978 | var signaturesOfSymbol = getSignaturesOfSymbol(symbol); |
| 86979 | // If this function body corresponds to function with multiple signature, it is implementation of overload |
| 86980 | // e.g.: function foo(a: string): string; |
| 86981 | // function foo(a: number): number; |
| 86982 | // function foo(a: any) { // This is implementation of the overloads |
| 86983 | // return a; |
| 86984 | // } |
| 86985 | return signaturesOfSymbol.length > 1 || |
| 86986 | // If there is single signature for the symbol, it is overload if that signature isn't coming from the node |
| 86987 | // e.g.: function foo(a: string): string; |
| 86988 | // function foo(a: any) { // This is implementation of the overloads |
| 86989 | // return a; |
| 86990 | // } |
| 86991 | (signaturesOfSymbol.length === 1 && signaturesOfSymbol[0].declaration !== node); |
| 86992 | } |
| 86993 | return false; |
| 86994 | } |
| 86995 | function isRequiredInitializedParameter(parameter) { |
| 86996 | return !!strictNullChecks && |
| 86997 | !isOptionalParameter(parameter) && |
no test coverage detected
searching dependent graphs…