import type { Nullable } from "@thi.ng/api" ; import type { DynamicParser , Parser } from "../api.js" ; import type { ParseContext } from "../context.js" ; examples export const dynamic = < T = string > ( ) : DynamicParser < T > => { let impl ; const wrapper = ( ctx ) => ( impl ? impl ( ctx ) : false ) ; wrapper . set = ( p ) => ( impl = p ) ; return wrapper ; } ;