Whether a routine gives a value — a function or a constructor — rather than a procedure.
(routine: Node, context: ResolutionContext)
| 1252 | |
| 1253 | /** Whether a routine gives a value — a function or a constructor — rather than a procedure. */ |
| 1254 | function yieldsValue(routine: Node, context: ResolutionContext): boolean { |
| 1255 | if (routine.returnType) return true; |
| 1256 | const keyword = routineKeyword(routine, context); |
| 1257 | return keyword === 'function' || keyword === 'constructor'; |
| 1258 | } |
| 1259 | |
| 1260 | /** The keyword that declares a routine (`function`, `procedure`, `constructor`, …), lowercased, or null. */ |
| 1261 | function routineKeyword(routine: Node, context: ResolutionContext): string | null { |
no test coverage detected