* Returns context tsh. * @param {string} path context path * @param {(err?: WebpackError | null, resolvedContextTimestampAndHash?: ResolvedContextTimestampAndHash | null) => void} callback callback function * @returns {void}
(path, callback)
| 1772 | * @returns {void} |
| 1773 | */ |
| 1774 | getContextTsh(path, callback) { |
| 1775 | const cache = this._contextTshs.get(path); |
| 1776 | if (cache !== undefined) { |
| 1777 | const resolved = getResolvedTimestamp(cache); |
| 1778 | if (resolved !== undefined) return callback(null, resolved); |
| 1779 | return this._resolveContextTsh(cache, callback); |
| 1780 | } |
| 1781 | this.contextTshQueue.add(path, (err, _entry) => { |
| 1782 | if (err) return callback(err); |
| 1783 | const entry = /** @type {ContextTimestampAndHash} */ (_entry); |
| 1784 | const resolved = getResolvedTimestamp(entry); |
| 1785 | if (resolved !== undefined) return callback(null, resolved); |
| 1786 | this._resolveContextTsh(entry, callback); |
| 1787 | }); |
| 1788 | } |
| 1789 | |
| 1790 | /** |
| 1791 | * Get unresolved context tsh. |
no test coverage detected