( fn: FunctionNode, index: number, module: SourceModule, kindOfKey: KindOfKey )
| 2642 | // which tsc or a bundler wrote beside it, so a package's built output is |
| 2643 | // read as its declarations annotate it |
| 2644 | private declaredParamKindOf( |
| 2645 | fn: FunctionNode, |
| 2646 | index: number, |
| 2647 | module: SourceModule, |
| 2648 | kindOfKey: KindOfKey |
| 2649 | ): KindBits | undefined { |
| 2650 | const declarations = this.declarationsOf(module) |
| 2651 | if (!declarations) return |
| 2652 | const name = exportedFunctionNameOf(fn, module) |
| 2653 | if (name === undefined) return |
| 2654 | const param = declaredParamsOf(declarations, name)?.[index] |
| 2655 | if (!param) return |
| 2656 | return this.annotatedKindOf( |
| 2657 | param.type === "AssignmentPattern" ? param.left : param, |
| 2658 | declarations, |
| 2659 | kindOfKey |
| 2660 | ) |
| 2661 | } |
| 2662 | |
| 2663 | // the .d.ts beside a JS module, where its build wrote one |
| 2664 | private declarationsOf(module: SourceModule): SourceModule | undefined { |
no test coverage detected