import { type Scanner } from "https://deno.land/x/arktype@v1.0.10-alpha/parse/string/shift/scanner.ts";
const { shiftUntil } = Scanner;
definition: unscanned extends Scanner.shift<infer lookahead, infer nextUnscanned> ? lookahead extends terminator ? scanned extends `${infer base}${EscapeToken}` ? shiftUntil<nextUnscanned, terminator, `${base}${lookahead}`> : [scanned, unscanned] : shiftUntil<nextUnscanned, terminator, `${scanned}${lookahead}`> : [scanned, ""]