fix types in our difference function

This commit is contained in:
dakkar 2024-06-29 09:30:45 +01:00
parent 71857405ae
commit 0a7292ad53

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
* otherwise.
*/
export function difference(parserIncluded: Parser<unknown>, parserExcluded: Parser<unknown>): Parser<string> {
export function difference(parserIncluded: Parser<string>, parserExcluded: Parser<string>): Parser<string> {
return new Parser((input, index, state) => {
const exclude = parserExcluded.handler(input, index, state);