is-promise.ts ×2
Frontier kind: Joint frontier
unlabeled · c_fe00e561847e
715 tests · 8 LOC · 1 file · introduces 3 tests · 7 LOC · 1 file
Introduces — evidence that enters the hierarchy at this concept
Code
2 ranges 7 lines · 1 files
Tests
3 tests
Contains — complete concept membership
Neighbourhood graph
The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.
Focus concept
Ancestors (broader)
Descendants (narrower)
Introduced files
Introduced tests
Introduced files, introduced tests, and structurally relevant concept specialization
In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.
Graph controls are ready.
Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.
JavaScript is disabled; use the native relationship evidence on this page to explore the same evidence.
Native relationship evidence
Every exact file and test below is linked only from the concept that introduces it.
is-promise.ts ×2 — Focused concept
Introduced files:
Introduced tests:
command.mjs|title=Command global parsing hints coerce should not be applied multiple times for nested commands|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests parse can be called multiple times with the same behavior|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests positional allows normalize to be specified|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command async builder allows positionals to be configured asynchronously|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests positional does not parse large scientific notation values, when type string|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command global parsing hints coerce should not add aliases to argv if strip-aliased config is true|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests with strict() option set should wrap whitespace in quotes if provided as an unknown argument|occurrence=1 — Ancestor (broader)
Introduced tests:
validation.mjs|title=validation tests strict mode does not fail when unrecognized option is passed after --|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command positional arguments does not overwrite options in argv if variadic|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests positional allows a default to be set|occurrence=1, yargs.mjs|title=yargs dsl tests positional defaults array with no arguments to []|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests positional allows a number type to be specified|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests positional allows a string type to be specified|occurrence=1, yargs-test.mjs|title=ESM bug #1758 does not drop .0 if positional is configured as string|occurrence=1, +1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command help command displays command help appropriately|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests usage for default command positional should contain the expected output for showHelp|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests positional allows a boolean type to be specified|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command should kick along [demand] configuration to commands|occurrence=1 — Ancestor (broader)
Introduced tests:
string|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command async displays error and appropriate help message when handler fails|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
Introduced tests:
validation.mjs|title=validation tests conflicts should not fail if conflicting argument is provided, without argument with conflict|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command variadic allows camel-case, variadic arguments, and strict mode to be combined|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command async builder allows deeply nested command to be defined in async builder|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
Introduced tests:
command.mjs|title=Command async builder allows command to be defined in async builder|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests positional shows that variadic positional arguments are arrays|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests async argv returns deeply nested promise that resolves argv on success|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
yargs.mjs|title=yargs dsl tests positional allows a defaultDescription to be set|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests positional indicates that <foo> positional arguments are required|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command async returns promise that resolves arguments once handler succeeds|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests default command should display options (with descriptions) on failed default command|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.mjs|title=middleware applyBeforeValidation=true does not cause an unexpected error when async middleware and strict are both used|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command default commands allows command to be run when alias is default command|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command positional arguments populates outer argv with positional arguments when unknown-options-as-args is set|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command executes a command via alias|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command positional arguments continues to support populate-- for commands, post #1457|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.mjs|title=middleware async it allows middleware rejection to be caught|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command commandDir supports nested subcommands|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command positional aliases allows an alias to be defined for an optional positional argument|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests .coerce() supports a global option within command|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command global parsing hints types applies choices type globally|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command variadic only allows the last argument to be variadic|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests command accepts an object for describing a command's options|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests commands allows global option to be disabled|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests commands should display global non empty groups for commands|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests positional displays choices array|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests positional displays type information|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command global parsing hints defaults applies defaults globally|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command global parsing hints validation applies conflicts logic for command by default|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests usage for default command multiple should contain the expected output for getHelp when called from within handler|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests positional should display help section for positionals|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests commands preserves global wrap() for commands that do not override it|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
Introduced tests:
usage.mjs|title=usage tests commands allows a command to override global wrap()|occurrence=1 — Ancestor (broader)
Introduced tests:
command.ts ×1 — Ancestor (broader)
Introduced files:
yargs.mjs|title=yargs dsl tests should not fail if command handler freezes object|occurrence=1 — Ancestor (broader)
Introduced tests:
completion.mjs|title=Completion default completion behavior calling yargs(--get-yargs-completions, …) options choices should not be display with positional choices|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests async builder positional should contain the expected output for --help|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests default command should display positionals that have been configured|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests usage for default command positional should contain the expected output for --help|occurrence=1 — Ancestor (broader)
Introduced tests:
validation.mjs|title=validation tests choices fails when demandOption is true and choice is not provided|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests command skips executing root-level command if builder's help is executed|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests commands does not display $0 twice when default commands are enabled|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests commands displays given command chain with positional args in default usage for subcommand with builder function|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests commands allows a builder to add more than one usage with multiple usage calls|occurrence=1 — Ancestor (broader)
Introduced tests:
command.ts ×1 — Ancestor (broader)
Introduced files:
usage.ts ×1 — Ancestor (broader)
Introduced files:
Introduced tests:
usage.mjs|title=usage tests usage for default command multiple should contain the expected output for --help|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.ts ×1 — Ancestor (broader)
Introduced files:
Introduced tests:
usage.mjs|title=usage tests wrap should align span columns when ansi colors are used in a description|occurrence=1, usage.mjs|title=usage tests wrap should align span columns when ansi colors are not used in a description|occurrence=1 — Ancestor (broader)
Introduced tests:
completion.mjs|title=Completion zsh completes options with line break|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs-factory.ts ×2 — Ancestor (broader)
Introduced files:
Introduced tests:
yargs-factory.ts ×2 — Ancestor (broader)
Introduced files:
Introduced tests:
$0 if it has no aliases|occurrence=1 — Ancestor (broader)
Introduced tests:
validation.mjs|title=validation tests requiresArg fails when a required argument value of type boolean is missing|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests allows multiple option calls to not clobber description|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests .help() with .alias() uses multi-char (but not single-char) help alias as command|occurrence=1 — Ancestor (broader)
Introduced tests:
completion.ts ×1 — Ancestor (broader)
Introduced files:
usage.mjs|title=usage tests group allows an an option to be placed in an alternative group|occurrence=1 — Ancestor (broader)
Introduced tests:
validation.mjs|title=validation tests demandCommand should return a custom failure message when too many non-hyphenated arguments are found after a demand count|occurrence=1 — Ancestor (broader)
Introduced tests:
completion, --get-yargs-completions, …) includes flags that have default|occurrence=1, completion.mjs|title=Completion default completion behavior calling yargs(--get-yargs-completions, …) includes flags that have default|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests async builder help is displayed before exit is called with async default command|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests usage for default command default only should contain the expected output for --help|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests choices should not output choices when defined for hidden options|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests help option should use 2 dashes for multiple-digit alias usage|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
completion.ts ×2 — Ancestor (broader)
Introduced files:
usage.mjs|title=usage tests choices should output choices when defined for non-hidden options|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests help option should use single dashes for 1-digit boolean key usage|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.ts ×1 — Ancestor (broader)
Introduced files:
usage.mjs|title=usage tests array should indicate when an option is an array|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.ts ×3 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
Introduced tests:
usage.mjs|title=usage tests commands displays aliases for commands that have them (with wrap)|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests scriptName should display user supplied scriptName|occurrence=1, usage.mjs|title=usage tests scriptName should not alter the user supplied scriptName|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.ts ×1 — Ancestor (broader)
Introduced files:
yargs.mjs|title=yargs dsl tests parse parses process.parse() if no arguments are provided|occurrence=1 — Ancestor (broader)
Introduced tests:
command.ts ×2 — Ancestor (broader)
Introduced files:
completion, --get-yargs-completions, …) avoids repeating flags whose negated counterparts are already included|occurrence=1, completion.mjs|title=Completion default completion behavior calling yargs(--get-yargs-completions, …) avoids repeating flags whose negated counterparts are already included|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
completion, --get-yargs-completions, …) ignores no- prefix flags when boolean-negation is not set|occurrence=1, completion.mjs|title=Completion default completion behavior calling yargs(--get-yargs-completions, …) ignores no- prefix flags when boolean-negation is not set|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.mjs|title=middleware async coerce allows error to be caught|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests normalizeAliases should display 'type' number in help message if set for alias|occurrence=1 — Ancestor (broader)
Introduced tests:
completion.ts ×1 — Ancestor (broader)
Introduced files:
completion.ts ×3 — Ancestor (broader)
Introduced files:
middleware.mjs|title=middleware async coerce applies coerce before validation|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests showHelp should call the correct console.log method when specified|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests showHelp should show help regardless of whether argv has been called|occurrence=1, usage.mjs|title=usage tests showHelp should print the help using console.error when no arguments were specified|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests showHelp should call the callback to print when specified|occurrence=1 — Ancestor (broader)
Introduced tests:
command.ts ×1 — Ancestor (broader)
Introduced files:
usage.mjs|title=usage tests group displays alias keys appropriately within a grouping|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests help option should display usage|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.ts ×1 — Ancestor (broader)
Introduced files:
validation.mjs|title=validation tests config should be displayed in the help message|occurrence=1, validation.mjs|title=validation tests config should allow help message to be overridden|occurrence=1, +1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests getHelp should run parse() and return help, if parse() not yet called|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests should add --help as an option for printing usage text if help() is called without arguments|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests wrap should not indent usage when no wrap is specified|occurrence=1 — Ancestor (broader)
Introduced tests:
validation.mjs|title=validation tests strict mode does not fail for hidden options|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests allows setting help and version with aliases and custom description|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.ts ×1 — Ancestor (broader)
Introduced files:
yargs.mjs|title=yargs dsl tests locale uses locale string for help option default desc on .help().locale()|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests locale uses locale string for help option default desc on .locale().help()|occurrence=1 — Ancestor (broader)
Introduced tests:
command.ts ×4 — Ancestor (broader)
Introduced files:
usage.ts ×1 — Ancestor (broader)
Introduced files:
Introduced tests:
usage.mjs|title=usage tests group allows a group to be provided as the only information about an option|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.ts ×1 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×2 — Ancestor (broader)
Introduced files:
Introduced tests:
command.ts ×1 — Ancestor (broader)
Introduced files:
usage.ts ×1 — Ancestor (broader)
Introduced files:
yargs.mjs|title=yargs dsl tests function passed as second argument to parse does not call callback if subsequently called without callback|occurrence=1 — Ancestor (broader)
Introduced tests:
command.ts ×1 — Ancestor (broader)
Introduced files:
yargs.mjs|title=yargs dsl tests .help() enables `--help` option and `help` command without arguments|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests should allow a valid choice|occurrence=1 — Ancestor (broader)
Introduced tests:
command.ts ×1 — Ancestor (broader)
Introduced files:
yargs.mjs|title=yargs dsl tests should set alias to string if option is string|occurrence=1 — Ancestor (broader)
Introduced tests:
completion.mjs|title=Completion parser-configuration should support strip-dashed|occurrence=1, completion.mjs|title=Completion parser-configuration should support camel-case-expansion strip-aliased|occurrence=1 — Ancestor (broader)
Introduced tests:
validation.ts ×2 — Ancestor (broader)
Introduced files:
completion.ts ×1 — Ancestor (broader)
Introduced files:
validation.ts ×1 — Ancestor (broader)
Introduced files:
completion.ts ×2 — Ancestor (broader)
Introduced files:
usage.ts ×6 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
completion.ts ×1 — Ancestor (broader)
Introduced files:
Introduced tests:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
yargs.mjs|title=yargs dsl tests number accepts number arguments when a number type is specified|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests parserConfiguration overrides the default parser configuration|occurrence=1 — Ancestor (broader)
Introduced tests:
completion.ts ×1 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×2 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×2 — Ancestor (broader)
Introduced files:
yargs.mjs|title=yargs dsl tests pkgConf doesn't mess up other pkg lookups when cwd is specified|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests version option should display version|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
Introduced tests:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×3 — Ancestor (broader)
Introduced files:
completion.ts ×1 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×2 — Ancestor (broader)
Introduced files:
completion.ts ×3 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
usage.ts ×1 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
completion.ts ×19 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×3 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×2 — Ancestor (broader)
Introduced files:
command.ts ×12 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
usage.ts ×1 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
validation.ts ×4 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×2 — Ancestor (broader)
Introduced files:
command.ts ×2 — Ancestor (broader)
Introduced files:
set-blocking.ts ×3 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
command.ts ×1 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
usage.ts ×2 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×3 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×4 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×3 — Ancestor (broader)
Introduced files:
middleware.ts ×3 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×3 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×2 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×5 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×5 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×2 — Ancestor (broader)
Introduced files:
usage.ts ×1 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×9 — Ancestor (broader)
Introduced files:
is-promise.ts ×1 — Ancestor (broader)
Introduced files:
Introduced tests:
is-promise.ts ×1 — Descendant (narrower)
Introduced files:
Introduced tests
Every collected test enters the hierarchy at exactly one concept.
3 tests introduced at this concept.
Introduced code
Every collected source range enters the hierarchy at exactly one concept.
1 file ranked by introduced lines: 7 introduced LOC across 2 ranges.
Expand a file to inspect source; the > gutter marks introduced lines.
lib/utils/is-promise.ts 7 introduced LOC · 2 ranges
Open complete file
1
export function isPromise < T >(
3
>
) : maybePromise is Promise < T > {
4
>
return (
5
>
!! maybePromise &&
6
>
!! ( maybePromise as Promise < T >). then &&
7
typeof ( maybePromise as Promise < T >). then === 'function'
9
>
}