* Returns the `kind` value of variable defined in this group. * * When not all variables are of the same kind, returns undefined. * * @return {String} Either "var", "let", "const" or undefined.
()
| 42 | * @return {String} Either "var", "let", "const" or undefined. |
| 43 | */ |
| 44 | getCommonKind() { |
| 45 | const firstKind = this.variables[0].getKind(); |
| 46 | if (this.variables.every(v => v.getKind() === firstKind)) { |
| 47 | return firstKind; |
| 48 | } |
| 49 | else { |
| 50 | return undefined; |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | /** |
| 55 | * Returns the most restrictive possible common `kind` value |
no test coverage detected