function isInTdz(variable, scopeVar) {
			const outerDef = scopeVar.defs[0];
			const inner = getNameRange(variable);
			const outer = getNameRange(scopeVar);

			if (!outer || inner[1] >= outer[0]) {
				return false;
			}

			if (hoist === "types") {
				return !TYPES_HOISTED_NODES.has(outerDef.node.type);
			}

			if (hoist === "functions-and-types") {
				return (
					outerDef.node.type !== "FunctionDeclaration" &&
					!TYPES_HOISTED_NODES.has(outerDef.node.type)
				);
			}

			return (
				inner &&
				outer &&
				inner[1] < outer[0] &&
				// Excepts FunctionDeclaration if is {"hoist":"function"}.
				(hoist !== "functions" ||
					!outerDef ||
					outerDef.node.type !== "FunctionDeclaration")
			);
		}
Checks if a variable is in TDZ of scopeVar.
@param {Object} variable The variable to check.
@param {Object} scopeVar The variable of TDZ.
@returns {boolean} Whether or not the variable is in TDZ of scopeVar.