(arr: unknown[])
| 106 | ["string", "number", "boolean"].includes(typeof value); |
| 107 | } |
| 108 | #getTypeOfArray(arr: unknown[]): ArrayType { |
| 109 | if (this.#arrayTypeCache.has(arr)) { |
| 110 | return this.#arrayTypeCache.get(arr)!; |
| 111 | } |
| 112 | const type = this.#doGetTypeOfArray(arr); |
| 113 | this.#arrayTypeCache.set(arr, type); |
| 114 | return type; |
| 115 | } |
| 116 | #doGetTypeOfArray(arr: unknown[]): ArrayType { |
| 117 | if (!arr.length) { |
| 118 | // any type should be fine |
no test coverage detected