From 36e0a1f11ae75bb4709f469ac12d18b74d853aac Mon Sep 17 00:00:00 2001 From: Soumil07 Date: Mon, 4 Jan 2021 04:02:25 +0530 Subject: [PATCH] feat(args): add Args#finished (#125) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jeroen Claassens Co-authored-by: Antonio Román --- src/lib/utils/Args.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lib/utils/Args.ts b/src/lib/utils/Args.ts index 8e7fed005..b7dee14eb 100644 --- a/src/lib/utils/Args.ts +++ b/src/lib/utils/Args.ts @@ -516,6 +516,13 @@ export class Args { if (this.states.length !== 0) this.parser.restore(this.states.pop()!); } + /** + * Whether all arguments have been consumed. + */ + public get finished() { + return this.parser.finished; + } + /** * Resolves an argument. * @param arg The argument name or [[IArgument]] instance.