( depth: number, params: readonly TSTypeParameter[] | undefined, boundArgs: TypeArgs | undefined )
| 6640 | declaration.parent.parent?.type === "Program") |
| 6641 | |
| 6642 | const typeCacheKeyOf = ( |
| 6643 | depth: number, |
| 6644 | params: readonly TSTypeParameter[] | undefined, |
| 6645 | boundArgs: TypeArgs | undefined |
| 6646 | ): string => { |
| 6647 | const clamped = depth < 2 ? depth : 2 |
| 6648 | if (!params?.length) return String(clamped) |
| 6649 | let key = `${clamped}|` |
| 6650 | for (let i = 0; i < params.length; i++) { |
| 6651 | if (i) key += "," |
| 6652 | const param = params[i] |
| 6653 | if (!boundArgs?.has(param)) key += "-" |
| 6654 | else { |
| 6655 | const val = boundArgs.get(param) |
| 6656 | key += val === undefined ? "u" : val |
| 6657 | } |
| 6658 | } |
| 6659 | return key |
| 6660 | } |
| 6661 | |
| 6662 | type PropTypeEntry = { |
| 6663 | type: TSType | TSMethodSignature |
no test coverage detected