This commit is contained in:
dakkar 2024-06-29 09:25:20 +01:00
parent 42a8f0d44d
commit 71857405ae

View file

@ -316,7 +316,7 @@ export function notMatch(parser: Parser<unknown>): Parser<null> {
* @returns A {@link Failure} object if `parserExcluded` succeeds, or if `parserIncluded` fails, and a {@link Success} object * @returns A {@link Failure} object if `parserExcluded` succeeds, or if `parserIncluded` fails, and a {@link Success} object
* otherwise. * otherwise.
*/ */
export function difference(parserIncluded: Parser<any>, parserExcluded: Parser<any>): Parser<string> { export function difference(parserIncluded: Parser<unknown>, parserExcluded: Parser<unknown>): Parser<string> {
return new Parser((input, index, state) => { return new Parser((input, index, state) => {
const exclude = parserExcluded.handler(input, index, state); const exclude = parserExcluded.handler(input, index, state);