diff --git a/node_modules/@types/babel__core/LICENSE b/node_modules/@types/babel__core/LICENSE new file mode 100644 index 00000000..4b1ad51b --- /dev/null +++ b/node_modules/@types/babel__core/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/node_modules/@types/babel__core/README.md b/node_modules/@types/babel__core/README.md new file mode 100644 index 00000000..4c035283 --- /dev/null +++ b/node_modules/@types/babel__core/README.md @@ -0,0 +1,16 @@ +# Installation +> `npm install --save @types/babel__core` + +# Summary +This package contains type definitions for @babel/core ( https://github.com/babel/babel/tree/master/packages/babel-core ). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__core + +Additional Details + * Last updated: Wed, 15 May 2019 16:25:45 GMT + * Dependencies: @types/babel__generator, @types/babel__traverse, @types/babel__template, @types/babel__types, @types/babel__parser + * Global values: babel + +# Credits +These definitions were written by Troy Gerwien , Marvin Hagemeister , Melvin Groenhoff , Jessica Franco . diff --git a/node_modules/@types/babel__core/index.d.ts b/node_modules/@types/babel__core/index.d.ts new file mode 100644 index 00000000..cabba439 --- /dev/null +++ b/node_modules/@types/babel__core/index.d.ts @@ -0,0 +1,684 @@ +// Type definitions for @babel/core 7.1 +// Project: https://github.com/babel/babel/tree/master/packages/babel-core, https://babeljs.io +// Definitions by: Troy Gerwien +// Marvin Hagemeister +// Melvin Groenhoff +// Jessica Franco +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.9 + +import { GeneratorOptions } from "@babel/generator"; +import traverse, { Visitor, NodePath } from "@babel/traverse"; +import template from "@babel/template"; +import * as t from "@babel/types"; +import { ParserOptions } from "@babel/parser"; + +export { + ParserOptions, + GeneratorOptions, + t as types, + template, + traverse, + NodePath, + Visitor +}; + +export type Node = t.Node; +export type ParseResult = t.File | t.Program; +export const version: string; +export const DEFAULT_EXTENSIONS: ['.js', '.jsx', '.es6', '.es', '.mjs']; + +export interface TransformOptions { + /** + * Include the AST in the returned object + * + * Default: `false` + */ + ast?: boolean | null; + + /** + * Attach a comment after all non-user injected code + * + * Default: `null` + */ + auxiliaryCommentAfter?: string | null; + + /** + * Attach a comment before all non-user injected code + * + * Default: `null` + */ + auxiliaryCommentBefore?: string | null; + + /** + * Specify the "root" folder that defines the location to search for "babel.config.js", and the default folder to allow `.babelrc` files inside of. + * + * Default: `"."` + */ + root?: string | null; + + /** + * This option, combined with the "root" value, defines how Babel chooses its project root. + * The different modes define different ways that Babel can process the "root" value to get + * the final project root. + * + * @see https://babeljs.io/docs/en/next/options#rootmode + */ + rootMode?: 'root' | 'upward' | 'upward-optional'; + + /** + * The config file to load Babel's config from. Defaults to searching for "babel.config.js" inside the "root" folder. `false` will disable searching for config files. + * + * Default: `undefined` + */ + configFile?: string | false | null; + + /** + * Specify whether or not to use .babelrc and + * .babelignore files. + * + * Default: `true` + */ + babelrc?: boolean | null; + + /** + * Specify which packages should be search for .babelrc files when they are being compiled. `true` to always search, or a path string or an array of paths to packages to search + * inside of. Defaults to only searching the "root" package. + * + * Default: `(root)` + */ + babelrcRoots?: true | string | string[] | null; + + /** + * Defaults to environment variable `BABEL_ENV` if set, or else `NODE_ENV` if set, or else it defaults to `"development"` + * + * Default: env vars + */ + envName?: string; + + /** + * Enable code generation + * + * Default: `true` + */ + code?: boolean | null; + + /** + * Output comments in generated output + * + * Default: `true` + */ + comments?: boolean | null; + + /** + * Do not include superfluous whitespace characters and line terminators. When set to `"auto"` compact is set to `true` on input sizes of >500KB + * + * Default: `"auto"` + */ + compact?: boolean | "auto" | null; + + /** + * The working directory that Babel's programmatic options are loaded relative to. + * + * Default: `"."` + */ + cwd?: string | null; + + /** + * Utilities may pass a caller object to identify themselves to Babel and + * pass capability-related flags for use by configs, presets and plugins. + * + * @see https://babeljs.io/docs/en/next/options#caller + */ + caller?: TransformCaller; + + /** + * This is an object of keys that represent different environments. For example, you may have: `{ env: { production: { \/* specific options *\/ } } }` + * which will use those options when the `envName` is `production` + * + * Default: `{}` + */ + env?: { [index: string]: TransformOptions | null | undefined; } | null; + + /** + * A path to a `.babelrc` file to extend + * + * Default: `null` + */ + extends?: string | null; + + /** + * Filename for use in errors etc + * + * Default: `"unknown"` + */ + filename?: string | null; + + /** + * Filename relative to `sourceRoot` + * + * Default: `(filename)` + */ + filenameRelative?: string | null; + + /** + * An object containing the options to be passed down to the babel code generator, @babel/generator + * + * Default: `{}` + */ + generatorOpts?: GeneratorOptions | null; + + /** + * Specify a custom callback to generate a module id with. Called as `getModuleId(moduleName)`. If falsy value is returned then the generated module id is used + * + * Default: `null` + */ + getModuleId?: ((moduleName: string) => string | null | undefined) | null; + + /** + * ANSI highlight syntax error code frames + * + * Default: `true` + */ + highlightCode?: boolean | null; + + /** + * Opposite to the `only` option. `ignore` is disregarded if `only` is specified + * + * Default: `null` + */ + ignore?: string[] | null; + + /** + * A source map object that the output source map will be based on + * + * Default: `null` + */ + inputSourceMap?: object | null; + + /** + * Should the output be minified (not printing last semicolons in blocks, printing literal string values instead of escaped ones, stripping `()` from `new` when safe) + * + * Default: `false` + */ + minified?: boolean | null; + + /** + * Specify a custom name for module ids + * + * Default: `null` + */ + moduleId?: string | null; + + /** + * If truthy, insert an explicit id for modules. By default, all modules are anonymous. (Not available for `common` modules) + * + * Default: `false` + */ + moduleIds?: boolean | null; + + /** + * Optional prefix for the AMD module formatter that will be prepend to the filename on module definitions + * + * Default: `(sourceRoot)` + */ + moduleRoot?: string | null; + + /** + * A glob, regex, or mixed array of both, matching paths to **only** compile. Can also be an array of arrays containing paths to explicitly match. When attempting to compile + * a non-matching file it's returned verbatim + * + * Default: `null` + */ + only?: string | RegExp | Array | null; + + /** + * An object containing the options to be passed down to the babel parser, @babel/parser + * + * Default: `{}` + */ + parserOpts?: ParserOptions | null; + + /** + * List of plugins to load and use + * + * Default: `[]` + */ + plugins?: PluginItem[] | null; + + /** + * List of presets (a set of plugins) to load and use + * + * Default: `[]` + */ + presets?: PluginItem[] | null; + + /** + * Retain line numbers. This will lead to wacky code but is handy for scenarios where you can't use source maps. (**NOTE**: This will not retain the columns) + * + * Default: `false` + */ + retainLines?: boolean | null; + + /** + * An optional callback that controls whether a comment should be output or not. Called as `shouldPrintComment(commentContents)`. **NOTE**: This overrides the `comment` option when used + * + * Default: `null` + */ + shouldPrintComment?: ((commentContents: string) => boolean) | null; + + /** + * Set `sources[0]` on returned source map + * + * Default: `(filenameRelative)` + */ + sourceFileName?: string | null; + + /** + * If truthy, adds a `map` property to returned output. If set to `"inline"`, a comment with a sourceMappingURL directive is added to the bottom of the returned code. If set to `"both"` + * then a `map` property is returned as well as a source map comment appended. **This does not emit sourcemap files by itself!** + * + * Default: `false` + */ + sourceMaps?: boolean | "inline" | "both" | null; + + /** + * The root from which all sources are relative + * + * Default: `(moduleRoot)` + */ + sourceRoot?: string | null; + + /** + * Indicate the mode the code should be parsed in. Can be one of "script", "module", or "unambiguous". `"unambiguous"` will make Babel attempt to guess, based on the presence of ES6 + * `import` or `export` statements. Files with ES6 `import`s and `export`s are considered `"module"` and are otherwise `"script"`. + * + * Default: `("module")` + */ + sourceType?: "script" | "module" | "unambiguous" | null; + + /** + * An optional callback that can be used to wrap visitor methods. **NOTE**: This is useful for things like introspection, and not really needed for implementing anything. Called as + * `wrapPluginVisitorMethod(pluginAlias, visitorType, callback)`. + */ + wrapPluginVisitorMethod?: ((pluginAlias: string, visitorType: "enter" | "exit", callback: (path: NodePath, state: any) => void) => (path: NodePath, state: any) => void) | null; +} + +export interface TransformCaller { + // the only required property + name: string; + // e.g. set to true by `babel-loader` and false by `babel-jest` + supportsStaticESM?: boolean; + // augment this with a "declare module '@babel/core' { ... }" if you need more keys +} + +export type FileResultCallback = (err: Error | null, result: BabelFileResult | null) => any; + +/** + * Transforms the passed in code. Calling a callback with an object with the generated code, source map, and AST. + */ +export function transform(code: string, callback: FileResultCallback): void; + +/** + * Transforms the passed in code. Calling a callback with an object with the generated code, source map, and AST. + */ +export function transform(code: string, opts: TransformOptions | undefined, callback: FileResultCallback): void; + +/** + * Here for backward-compatibility. Ideally use `transformSync` if you want a synchronous API. + */ +export function transform(code: string, opts?: TransformOptions): BabelFileResult | null; + +/** + * Transforms the passed in code. Returning an object with the generated code, source map, and AST. + */ +export function transformSync(code: string, opts?: TransformOptions): BabelFileResult | null; + +/** + * Transforms the passed in code. Calling a callback with an object with the generated code, source map, and AST. + */ +export function transformAsync(code: string, opts?: TransformOptions): Promise; + +/** + * Asynchronously transforms the entire contents of a file. + */ +export function transformFile(filename: string, callback: FileResultCallback): void; + +/** + * Asynchronously transforms the entire contents of a file. + */ +export function transformFile(filename: string, opts: TransformOptions | undefined, callback: FileResultCallback): void; + +/** + * Synchronous version of `babel.transformFile`. Returns the transformed contents of the `filename`. + */ +export function transformFileSync(filename: string, opts?: TransformOptions): BabelFileResult | null; + +/** + * Asynchronously transforms the entire contents of a file. + */ +export function transformFileAsync(filename: string, opts?: TransformOptions): Promise; + +/** + * Given an AST, transform it. + */ +export function transformFromAst(ast: Node, code: string | undefined, callback: FileResultCallback): void; + +/** + * Given an AST, transform it. + */ +export function transformFromAst(ast: Node, code: string | undefined, opts: TransformOptions | undefined, callback: FileResultCallback): void; + +/** + * Here for backward-compatibility. Ideally use ".transformSync" if you want a synchronous API. + */ +export function transformFromAstSync(ast: Node, code?: string, opts?: TransformOptions): BabelFileResult | null; + +/** + * Given an AST, transform it. + */ +export function transformFromAstAsync(ast: Node, code?: string, opts?: TransformOptions): Promise; + +// A babel plugin is a simple function which must return an object matching +// the following interface. Babel will throw if it finds unknown properties. +// The list of allowed plugin keys is here: +// https://github.com/babel/babel/blob/4e50b2d9d9c376cee7a2cbf56553fe5b982ea53c/packages/babel-core/src/config/option-manager.js#L71 +export interface PluginObj { + name?: string; + manipulateOptions?(opts: any, parserOpts: any): void; + pre?(this: S, state: any): void; + visitor: Visitor; + post?(this: S, state: any): void; + inherits?: any; +} + +export interface BabelFileResult { + ast?: t.File | null; + code?: string | null; + ignored?: boolean; + map?: { + version: number; + sources: string[]; + names: string[]; + sourceRoot?: string; + sourcesContent?: string[]; + mappings: string; + file: string; + } | null; + metadata?: BabelFileMetadata; +} + +export interface BabelFileMetadata { + usedHelpers: string[]; + marked: Array<{ + type: string; + message: string; + loc: object; + }>; + modules: BabelFileModulesMetadata; +} + +export interface BabelFileModulesMetadata { + imports: object[]; + exports: { + exported: object[]; + specifiers: object[]; + }; +} + +export type FileParseCallback = (err: Error | null, result: ParseResult | null) => any; + +/** + * Given some code, parse it using Babel's standard behavior. + * Referenced presets and plugins will be loaded such that optional syntax plugins are automatically enabled. + */ +export function parse(code: string, callback: FileParseCallback): void; + +/** + * Given some code, parse it using Babel's standard behavior. + * Referenced presets and plugins will be loaded such that optional syntax plugins are automatically enabled. + */ +export function parse(code: string, options: TransformOptions | undefined, callback: FileParseCallback): void; + +/** + * Given some code, parse it using Babel's standard behavior. + * Referenced presets and plugins will be loaded such that optional syntax plugins are automatically enabled. + */ +export function parse(code: string, options?: TransformOptions): ParseResult | null; + +/** + * Given some code, parse it using Babel's standard behavior. + * Referenced presets and plugins will be loaded such that optional syntax plugins are automatically enabled. + */ +export function parseSync(code: string, options?: TransformOptions): ParseResult | null; + +/** + * Given some code, parse it using Babel's standard behavior. + * Referenced presets and plugins will be loaded such that optional syntax plugins are automatically enabled. + */ +export function parseAsync(code: string, options?: TransformOptions): Promise; + +/** + * Resolve Babel's options fully, resulting in an options object where: + * + * * opts.plugins is a full list of Plugin instances. + * * opts.presets is empty and all presets are flattened into opts. + * * It can be safely passed back to Babel. Fields like babelrc have been set to false so that later calls to Babel + * will not make a second attempt to load config files. + * + * Plugin instances aren't meant to be manipulated directly, but often callers will serialize this opts to JSON to + * use it as a cache key representing the options Babel has received. Caching on this isn't 100% guaranteed to + * invalidate properly, but it is the best we have at the moment. + */ +export function loadOptions(options?: TransformOptions): object | null; + +/** + * To allow systems to easily manipulate and validate a user's config, this function resolves the plugins and + * presets and proceeds no further. The expectation is that callers will take the config's .options, manipulate it + * as then see fit and pass it back to Babel again. + * + * * `babelrc: string | void` - The path of the `.babelrc` file, if there was one. + * * `babelignore: string | void` - The path of the `.babelignore` file, if there was one. + * * `options: ValidatedOptions` - The partially resolved options, which can be manipulated and passed back + * to Babel again. + * * `plugins: Array` - See below. + * * `presets: Array` - See below. + * * It can be safely passed back to Babel. Fields like `babelrc` have been set to false so that later calls to + * Babel will not make a second attempt to load config files. + * + * `ConfigItem` instances expose properties to introspect the values, but each item should be treated as + * immutable. If changes are desired, the item should be removed from the list and replaced with either a normal + * Babel config value, or with a replacement item created by `babel.createConfigItem`. See that function for + * information about `ConfigItem` fields. + */ +export function loadPartialConfig(options?: TransformOptions): Readonly | null; + +export interface PartialConfig { + options: TransformOptions; + babelrc?: string; + babelignore?: string; + config?: string; +} + +export interface ConfigItem { + /** + * The name that the user gave the plugin instance, e.g. `plugins: [ ['env', {}, 'my-env'] ]` + */ + name?: string; + + /** + * The resolved value of the plugin. + */ + value: object | ((...args: any[]) => any); + + /** + * The options object passed to the plugin. + */ + options?: object | false; + + /** + * The path that the options are relative to. + */ + dirname: string; + + /** + * Information about the plugin's file, if Babel knows it. + * * + */ + file?: { + /** + * The file that the user requested, e.g. `"@babel/env"` + */ + request: string; + + /** + * The full path of the resolved file, e.g. `"/tmp/node_modules/@babel/preset-env/lib/index.js"` + */ + resolved: string; + } | null; +} + +export type PluginOptions = object | undefined | false; + +export type PluginTarget = string | object | ((...args: any[]) => any); + +export type PluginItem = ConfigItem | PluginObj | PluginTarget | [PluginTarget, PluginOptions] | [PluginTarget, PluginOptions, string | undefined]; + +export interface CreateConfigItemOptions { + dirname?: string; + type?: "preset" | "plugin"; +} + +/** + * Allows build tooling to create and cache config items up front. If this function is called multiple times for a + * given plugin, Babel will call the plugin's function itself multiple times. If you have a clear set of expected + * plugins and presets to inject, pre-constructing the config items would be recommended. + */ +export function createConfigItem(value: PluginTarget | [PluginTarget, PluginOptions] | [PluginTarget, PluginOptions, string | undefined], options?: CreateConfigItemOptions): ConfigItem; + +// NOTE: the documentation says the ConfigAPI also exposes @babel/core's exports, but it actually doesn't +/** + * @see https://babeljs.io/docs/en/next/config-files#config-function-api + */ +export interface ConfigAPI { + /** + * The version string for the Babel version that is loading the config file. + * + * @see https://babeljs.io/docs/en/next/config-files#apiversion + */ + version: string; + /** + * @see https://babeljs.io/docs/en/next/config-files#apicache + */ + cache: SimpleCacheConfigurator; + /** + * @see https://babeljs.io/docs/en/next/config-files#apienv + */ + env: EnvFunction; + // undocumented; currently hardcoded to return 'false' + // async(): boolean + /** + * This API is used as a way to access the `caller` data that has been passed to Babel. + * Since many instances of Babel may be running in the same process with different `caller` values, + * this API is designed to automatically configure `api.cache`, the same way `api.env()` does. + * + * The `caller` value is available as the first parameter of the callback function. + * It is best used with something like this to toggle configuration behavior + * based on a specific environment: + * + * @example + * function isBabelRegister(caller?: { name: string }) { + * return !!(caller && caller.name === "@babel/register") + * } + * api.caller(isBabelRegister) + * + * @see https://babeljs.io/docs/en/next/config-files#apicallercb + */ + caller(callerCallback: (caller: TransformOptions['caller']) => T): T; + /** + * While `api.version` can be useful in general, it's sometimes nice to just declare your version. + * This API exposes a simple way to do that with: + * + * @example + * api.assertVersion(7) // major version only + * api.assertVersion("^7.2") + * + * @see https://babeljs.io/docs/en/next/config-files#apiassertversionrange + */ + assertVersion(versionRange: number | string): boolean; + // NOTE: this is an undocumented reexport from "@babel/parser" but it's missing from its types + // tokTypes: typeof tokTypes +} + +/** + * JS configs are great because they can compute a config on the fly, + * but the downside there is that it makes caching harder. + * Babel wants to avoid re-executing the config function every time a file is compiled, + * because then it would also need to re-execute any plugin and preset functions + * referenced in that config. + * + * To avoid this, Babel expects users of config functions to tell it how to manage caching + * within a config file. + * + * @see https://babeljs.io/docs/en/next/config-files#apicache + */ +export interface SimpleCacheConfigurator { + // there is an undocumented call signature that is a shorthand for forever()/never()/using(). + // (ever: boolean): void + // (callback: CacheCallback): T + /** + * Permacache the computed config and never call the function again. + */ + forever(): void; + /** + * Do not cache this config, and re-execute the function every time. + */ + never(): void; + /** + * Any time the using callback returns a value other than the one that was expected, + * the overall config function will be called again and a new entry will be added to the cache. + * + * @example + * api.cache.using(() => process.env.NODE_ENV) + */ + using(callback: SimpleCacheCallback): T; + /** + * Any time the using callback returns a value other than the one that was expected, + * the overall config function will be called again and all entries in the cache will + * be replaced with the result. + * + * @example + * api.cache.invalidate(() => process.env.NODE_ENV) + */ + invalidate(callback: SimpleCacheCallback): T; +} + +// https://github.com/babel/babel/blob/v7.3.3/packages/babel-core/src/config/caching.js#L231 +export type SimpleCacheKey = string | boolean | number | null | undefined; +export type SimpleCacheCallback = () => T; + +/** + * Since `NODE_ENV` is a fairly common way to toggle behavior, Babel also includes an API function + * meant specifically for that. This API is used as a quick way to check the `"envName"` that Babel + * was loaded with, which takes `NODE_ENV` into account if no other overriding environment is set. + * + * @see https://babeljs.io/docs/en/next/config-files#apienv + */ +export interface EnvFunction { + /** + * @returns the current `envName` string + */ + (): string; + /** + * @returns `true` if the `envName` is `===` any of the given strings + */ + (envName: string | ReadonlyArray): boolean; + // the official documentation is misleading for this one... + // this just passes the callback to `cache.using` but with an additional argument. + // it returns its result instead of necessarily returning a boolean. + (envCallback: (envName: NonNullable) => T): T; +} + +export type ConfigFunction = (api: ConfigAPI) => TransformOptions; + +export as namespace babel; diff --git a/node_modules/@types/babel__core/package.json b/node_modules/@types/babel__core/package.json new file mode 100644 index 00000000..69af4d67 --- /dev/null +++ b/node_modules/@types/babel__core/package.json @@ -0,0 +1,49 @@ +{ + "name": "@types/babel__core", + "version": "7.1.2", + "description": "TypeScript definitions for @babel/core", + "license": "MIT", + "contributors": [ + { + "name": "Troy Gerwien", + "url": "https://github.com/yortus", + "githubUsername": "yortus" + }, + { + "name": "Marvin Hagemeister", + "url": "https://github.com/marvinhagemeister", + "githubUsername": "marvinhagemeister" + }, + { + "name": "Melvin Groenhoff", + "url": "https://github.com/mgroenhoff", + "githubUsername": "mgroenhoff" + }, + { + "name": "Jessica Franco", + "url": "https://github.com/Jessidhia", + "githubUsername": "Jessidhia" + } + ], + "main": "", + "types": "index", + "repository": { + "type": "git", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", + "directory": "types/babel__core" + }, + "scripts": {}, + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + }, + "typesPublisherContentHash": "8ddbc9ecfefbb1a61ece46d6e48876a63d101c6c5291bb173a929cead248d6a2", + "typeScriptVersion": "2.9" + +,"_resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.2.tgz" +,"_integrity": "sha512-cfCCrFmiGY/yq0NuKNxIQvZFy9kY/1immpSpTngOnyIbD4+eJOG5mxphhHDv3CHL9GltO4GcKr54kGBg3RNdbg==" +,"_from": "@types/babel__core@7.1.2" +} \ No newline at end of file diff --git a/node_modules/@types/babel__generator/LICENSE b/node_modules/@types/babel__generator/LICENSE new file mode 100644 index 00000000..4b1ad51b --- /dev/null +++ b/node_modules/@types/babel__generator/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/node_modules/@types/babel__generator/README.md b/node_modules/@types/babel__generator/README.md new file mode 100644 index 00000000..2cce2e26 --- /dev/null +++ b/node_modules/@types/babel__generator/README.md @@ -0,0 +1,16 @@ +# Installation +> `npm install --save @types/babel__generator` + +# Summary +This package contains type definitions for @babel/generator ( https://github.com/babel/babel/tree/master/packages/babel-generator ). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__generator + +Additional Details + * Last updated: Wed, 13 Feb 2019 21:04:23 GMT + * Dependencies: @types/babel__types + * Global values: none + +# Credits +These definitions were written by Troy Gerwien , Johnny Estilles , Melvin Groenhoff . diff --git a/node_modules/@types/babel__generator/index.d.ts b/node_modules/@types/babel__generator/index.d.ts new file mode 100644 index 00000000..d229c985 --- /dev/null +++ b/node_modules/@types/babel__generator/index.d.ts @@ -0,0 +1,117 @@ +// Type definitions for @babel/generator 7.0 +// Project: https://github.com/babel/babel/tree/master/packages/babel-generator, https://babeljs.io +// Definitions by: Troy Gerwien +// Johnny Estilles +// Melvin Groenhoff +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.9 + +import * as t from "@babel/types"; + +export interface GeneratorOptions { + /** + * Optional string to add as a block comment at the start of the output file. + */ + auxiliaryCommentBefore?: string; + + /** + * Optional string to add as a block comment at the end of the output file. + */ + auxiliaryCommentAfter?: string; + + /** + * Function that takes a comment (as a string) and returns true if the comment should be included in the output. + * By default, comments are included if `opts.comments` is `true` or if `opts.minifed` is `false` and the comment + * contains `@preserve` or `@license`. + */ + shouldPrintComment?(comment: string): boolean; + + /** + * Attempt to use the same line numbers in the output code as in the source code (helps preserve stack traces). + * Defaults to `false`. + */ + retainLines?: boolean; + + /** + * Should comments be included in output? Defaults to `true`. + */ + comments?: boolean; + + /** + * Set to true to avoid adding whitespace for formatting. Defaults to the value of `opts.minified`. + */ + compact?: boolean | "auto"; + + /** + * Should the output be minified. Defaults to `false`. + */ + minified?: boolean; + + /** + * Set to true to reduce whitespace (but not as much as opts.compact). Defaults to `false`. + */ + concise?: boolean; + + /** + * The type of quote to use in the output. If omitted, autodetects based on `ast.tokens`. + */ + quotes?: "single" | "double"; + + /** + * Used in warning messages + */ + filename?: string; + + /** + * Enable generating source maps. Defaults to `false`. + */ + sourceMaps?: boolean; + + /** + * The filename of the generated code that the source map will be associated with. + */ + sourceMapTarget?: string; + + /** + * A root for all relative URLs in the source map. + */ + sourceRoot?: string; + + /** + * The filename for the source code (i.e. the code in the `code` argument). + * This will only be used if `code` is a string. + */ + sourceFileName?: string; + + /** + * Set to true to run jsesc with "json": true to print "\u00A9" vs. "©"; + */ + jsonCompatibleStrings?: boolean; +} + +export class CodeGenerator { + constructor(ast: t.Node, opts?: GeneratorOptions, code?: string); + generate(): GeneratorResult; +} + +/** + * Turns an AST into code, maintaining sourcemaps, user preferences, and valid output. + * @param ast - the abstract syntax tree from which to generate output code. + * @param opts - used for specifying options for code generation. + * @param code - the original source code, used for source maps. + * @returns - an object containing the output code and source map. + */ +export default function generate(ast: t.Node, opts?: GeneratorOptions, code?: string | { [filename: string]: string; }): GeneratorResult; + +export interface GeneratorResult { + code: string; + map: { + version: number; + sources: string[]; + names: string[]; + sourceRoot?: string; + sourcesContent?: string[]; + mappings: string; + file: string; + } | null; +} diff --git a/node_modules/@types/babel__generator/package.json b/node_modules/@types/babel__generator/package.json new file mode 100644 index 00000000..9c1fa3e7 --- /dev/null +++ b/node_modules/@types/babel__generator/package.json @@ -0,0 +1,39 @@ +{ + "name": "@types/babel__generator", + "version": "7.0.2", + "description": "TypeScript definitions for @babel/generator", + "license": "MIT", + "contributors": [ + { + "name": "Troy Gerwien", + "url": "https://github.com/yortus", + "githubUsername": "yortus" + }, + { + "name": "Johnny Estilles", + "url": "https://github.com/johnnyestilles", + "githubUsername": "johnnyestilles" + }, + { + "name": "Melvin Groenhoff", + "url": "https://github.com/mgroenhoff", + "githubUsername": "mgroenhoff" + } + ], + "main": "", + "types": "index", + "repository": { + "type": "git", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git" + }, + "scripts": {}, + "dependencies": { + "@babel/types": "^7.0.0" + }, + "typesPublisherContentHash": "12b47650c77333060b8da231a33c95326cb124929b12d19cd41d9c2dae936d80", + "typeScriptVersion": "2.9" + +,"_resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.0.2.tgz" +,"_integrity": "sha512-NHcOfab3Zw4q5sEE2COkpfXjoE7o+PmqD9DQW4koUT3roNxwziUdXGnRndMat/LJNUtePwn1TlP4do3uoe3KZQ==" +,"_from": "@types/babel__generator@7.0.2" +} \ No newline at end of file diff --git a/node_modules/@types/babel__template/LICENSE b/node_modules/@types/babel__template/LICENSE new file mode 100644 index 00000000..4b1ad51b --- /dev/null +++ b/node_modules/@types/babel__template/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/node_modules/@types/babel__template/README.md b/node_modules/@types/babel__template/README.md new file mode 100644 index 00000000..b2d642a4 --- /dev/null +++ b/node_modules/@types/babel__template/README.md @@ -0,0 +1,16 @@ +# Installation +> `npm install --save @types/babel__template` + +# Summary +This package contains type definitions for @babel/template ( https://github.com/babel/babel/tree/master/packages/babel-template ). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__template + +Additional Details + * Last updated: Wed, 13 Feb 2019 21:04:23 GMT + * Dependencies: @types/babel__parser, @types/babel__types + * Global values: none + +# Credits +These definitions were written by Troy Gerwien , Marvin Hagemeister , Melvin Groenhoff . diff --git a/node_modules/@types/babel__template/index.d.ts b/node_modules/@types/babel__template/index.d.ts new file mode 100644 index 00000000..05084359 --- /dev/null +++ b/node_modules/@types/babel__template/index.d.ts @@ -0,0 +1,72 @@ +// Type definitions for @babel/template 7.0 +// Project: https://github.com/babel/babel/tree/master/packages/babel-template, https://babeljs.io +// Definitions by: Troy Gerwien +// Marvin Hagemeister +// Melvin Groenhoff +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.9 + +import { ParserOptions } from "@babel/parser"; +import { Expression, File, Program, Statement } from "@babel/types"; + +export interface TemplateBuilderOptions extends ParserOptions { + /** + * A set of placeholder names to automatically accept. Items in this list do not need to match the given placeholder pattern. + */ + placeholderWhitelist?: Set; + + /** + * A pattern to search for when looking for Identifier and StringLiteral nodes that should be considered placeholders. `false` will + * disable placeholder searching entirely, leaving only the `placeholderWhitelist` value to find placeholders. + */ + placeholderPattern?: RegExp | false; + + /** + * Set this to `true` to preserve any comments from the `code` parameter. + */ + preserveComments?: boolean; +} + +export interface TemplateBuilder { + /** + * Build a new builder, merging the given options with the previous ones. + */ + (opts: TemplateBuilderOptions): TemplateBuilder; + + /** + * Building from a string produces an AST builder function by default. + */ + (code: string, opts?: TemplateBuilderOptions): (arg?: PublicReplacements) => T; + + /** + * Building from a template literal produces an AST builder function by default. + */ + (tpl: TemplateStringsArray, ...args: any[]): (arg?: PublicReplacements) => T; + + // Allow users to explicitly create templates that produce ASTs, skipping the need for an intermediate function. + ast: { + (tpl: string, opts?: TemplateBuilderOptions): T; + (tpl: TemplateStringsArray, ...args: any[]): T; + }; +} + +export type PublicReplacements = { [index: string]: any; } | any[]; + +export const smart: TemplateBuilder; +export const statement: TemplateBuilder; +export const statements: TemplateBuilder; +export const expression: TemplateBuilder; +export const program: TemplateBuilder; + +type DefaultTemplateBuilder = typeof smart & { + smart: typeof smart; + statement: typeof statement; + statements: typeof statements; + expression: typeof expression; + program: typeof program; + ast: typeof smart.ast; +}; + +declare const templateBuilder: DefaultTemplateBuilder; + +export default templateBuilder; diff --git a/node_modules/@types/babel__template/package.json b/node_modules/@types/babel__template/package.json new file mode 100644 index 00000000..5ff27c07 --- /dev/null +++ b/node_modules/@types/babel__template/package.json @@ -0,0 +1,40 @@ +{ + "name": "@types/babel__template", + "version": "7.0.2", + "description": "TypeScript definitions for @babel/template", + "license": "MIT", + "contributors": [ + { + "name": "Troy Gerwien", + "url": "https://github.com/yortus", + "githubUsername": "yortus" + }, + { + "name": "Marvin Hagemeister", + "url": "https://github.com/marvinhagemeister", + "githubUsername": "marvinhagemeister" + }, + { + "name": "Melvin Groenhoff", + "url": "https://github.com/mgroenhoff", + "githubUsername": "mgroenhoff" + } + ], + "main": "", + "types": "index", + "repository": { + "type": "git", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git" + }, + "scripts": {}, + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + }, + "typesPublisherContentHash": "fd665ffdd94e184259796e85ff1a8e8626a23fb0eeefd6cfb9f77a316eda2624", + "typeScriptVersion": "2.9" + +,"_resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.0.2.tgz" +,"_integrity": "sha512-/K6zCpeW7Imzgab2bLkLEbz0+1JlFSrUMdw7KoIIu+IUdu51GWaBZpd3y1VXGVXzynvGa4DaIaxNZHiON3GXUg==" +,"_from": "@types/babel__template@7.0.2" +} \ No newline at end of file diff --git a/node_modules/@types/babel__traverse/LICENSE b/node_modules/@types/babel__traverse/LICENSE new file mode 100644 index 00000000..4b1ad51b --- /dev/null +++ b/node_modules/@types/babel__traverse/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/node_modules/@types/babel__traverse/README.md b/node_modules/@types/babel__traverse/README.md new file mode 100644 index 00000000..f2e1c54c --- /dev/null +++ b/node_modules/@types/babel__traverse/README.md @@ -0,0 +1,16 @@ +# Installation +> `npm install --save @types/babel__traverse` + +# Summary +This package contains type definitions for @babel/traverse ( https://github.com/babel/babel/tree/master/packages/babel-traverse ). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__traverse + +Additional Details + * Last updated: Tue, 11 Jun 2019 02:00:21 GMT + * Dependencies: @types/babel__types + * Global values: none + +# Credits +These definitions were written by Troy Gerwien , Marvin Hagemeister , Ryan Petrich , Melvin Groenhoff . diff --git a/node_modules/@types/babel__traverse/index.d.ts b/node_modules/@types/babel__traverse/index.d.ts new file mode 100644 index 00000000..0e9ff767 --- /dev/null +++ b/node_modules/@types/babel__traverse/index.d.ts @@ -0,0 +1,829 @@ +// Type definitions for @babel/traverse 7.0 +// Project: https://github.com/babel/babel/tree/master/packages/babel-traverse, https://babeljs.io +// Definitions by: Troy Gerwien +// Marvin Hagemeister +// Ryan Petrich +// Melvin Groenhoff +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.9 + +import * as t from "@babel/types"; + +export type Node = t.Node; + +export default function traverse( + parent: Node | Node[], + opts: TraverseOptions, + scope: Scope | undefined, + state: S, + parentPath?: NodePath, +): void; +export default function traverse( + parent: Node | Node[], + opts: TraverseOptions, + scope?: Scope, + state?: any, + parentPath?: NodePath, +): void; + +export interface TraverseOptions extends Visitor { + scope?: Scope; + noScope?: boolean; +} + +export class Scope { + constructor(path: NodePath, parentScope?: Scope); + path: NodePath; + block: Node; + parentBlock: Node; + parent: Scope; + hub: Hub; + bindings: { [name: string]: Binding; }; + + /** Traverse node with current scope and path. */ + traverse(node: Node | Node[], opts: TraverseOptions, state: S): void; + traverse(node: Node | Node[], opts?: TraverseOptions, state?: any): void; + + /** Generate a unique identifier and add it to the current scope. */ + generateDeclaredUidIdentifier(name?: string): t.Identifier; + + /** Generate a unique identifier. */ + generateUidIdentifier(name?: string): t.Identifier; + + /** Generate a unique `_id1` binding. */ + generateUid(name?: string): string; + + /** Generate a unique identifier based on a node. */ + generateUidIdentifierBasedOnNode(parent: Node, defaultName?: string): t.Identifier; + + /** + * Determine whether evaluating the specific input `node` is a consequenceless reference. ie. + * evaluating it wont result in potentially arbitrary code from being ran. The following are + * whitelisted and determined not to cause side effects: + * + * - `this` expressions + * - `super` expressions + * - Bound identifiers + */ + isStatic(node: Node): boolean; + + /** Possibly generate a memoised identifier if it is not static and has consequences. */ + maybeGenerateMemoised(node: Node, dontPush?: boolean): t.Identifier; + + checkBlockScopedCollisions(local: Node, kind: string, name: string, id: object): void; + + rename(oldName: string, newName?: string, block?: Node): void; + + dump(): void; + + toArray(node: Node, i?: number): Node; + + registerDeclaration(path: NodePath): void; + + buildUndefinedNode(): Node; + + registerConstantViolation(path: NodePath): void; + + registerBinding(kind: string, path: NodePath, bindingPath?: NodePath): void; + + addGlobal(node: Node): void; + + hasUid(name: string): boolean; + + hasGlobal(name: string): boolean; + + hasReference(name: string): boolean; + + isPure(node: Node, constantsOnly?: boolean): boolean; + + setData(key: string, val: any): any; + + getData(key: string): any; + + removeData(key: string): void; + + push(opts: { + id: t.LVal, + init?: t.Expression, + unique?: boolean, + kind?: "var" | "let" | "const", + }): void; + + getProgramParent(): Scope; + + getFunctionParent(): Scope | null; + + getBlockParent(): Scope; + + /** Walks the scope tree and gathers **all** bindings. */ + getAllBindings(...kinds: string[]): object; + + bindingIdentifierEquals(name: string, node: Node): boolean; + + getBinding(name: string): Binding | undefined; + + getOwnBinding(name: string): Binding | undefined; + + getBindingIdentifier(name: string): t.Identifier; + + getOwnBindingIdentifier(name: string): t.Identifier; + + hasOwnBinding(name: string): boolean; + + hasBinding(name: string, noGlobals?: boolean): boolean; + + parentHasBinding(name: string, noGlobals?: boolean): boolean; + + /** Move a binding of `name` to another `scope`. */ + moveBindingTo(name: string, scope: Scope): void; + + removeOwnBinding(name: string): void; + + removeBinding(name: string): void; +} + +export class Binding { + constructor(opts: { existing: Binding; identifier: t.Identifier; scope: Scope; path: NodePath; kind: "var" | "let" | "const"; }); + identifier: t.Identifier; + scope: Scope; + path: NodePath; + kind: "var" | "let" | "const" | "module"; + referenced: boolean; + references: number; + referencePaths: NodePath[]; + constant: boolean; + constantViolations: NodePath[]; +} + +export type Visitor = VisitNodeObject & { + [Type in Node["type"]]?: VisitNode>; +} & { + [K in keyof t.Aliases]?: VisitNode +}; + +export type VisitNode = VisitNodeFunction | VisitNodeObject; + +export type VisitNodeFunction = (this: S, path: NodePath

, state: S) => void; + +export interface VisitNodeObject { + enter?: VisitNodeFunction; + exit?: VisitNodeFunction; +} + +export class NodePath { + constructor(hub: Hub, parent: Node); + parent: Node; + hub: Hub; + contexts: TraversalContext[]; + data: object; + shouldSkip: boolean; + shouldStop: boolean; + removed: boolean; + state: any; + opts: object; + skipKeys: object; + parentPath: NodePath; + context: TraversalContext; + container: object | object[]; + listKey: string; + inList: boolean; + parentKey: string; + key: string | number; + node: T; + scope: Scope; + type: T extends undefined | null ? string | null : string; + typeAnnotation: object; + + getScope(scope: Scope): Scope; + + setData(key: string, val: any): any; + + getData(key: string, def?: any): any; + + buildCodeFrameError(msg: string, Error?: new (msg: string) => TError): TError; + + traverse(visitor: Visitor, state: T): void; + traverse(visitor: Visitor): void; + + set(key: string, node: Node): void; + + getPathLocation(): string; + + // Example: https://github.com/babel/babel/blob/63204ae51e020d84a5b246312f5eeb4d981ab952/packages/babel-traverse/src/path/modification.js#L83 + debug(buildMessage: () => string): void; + + // ------------------------- ancestry ------------------------- + /** + * Call the provided `callback` with the `NodePath`s of all the parents. + * When the `callback` returns a truthy value, we return that node path. + */ + findParent(callback: (path: NodePath) => boolean): NodePath; + + find(callback: (path: NodePath) => boolean): NodePath; + + /** Get the parent function of the current path. */ + getFunctionParent(): NodePath; + + /** Walk up the tree until we hit a parent node path in a list. */ + getStatementParent(): NodePath; + + /** + * Get the deepest common ancestor and then from it, get the earliest relationship path + * to that ancestor. + * + * Earliest is defined as being "before" all the other nodes in terms of list container + * position and visiting key. + */ + getEarliestCommonAncestorFrom(paths: NodePath[]): NodePath[]; + + /** Get the earliest path in the tree where the provided `paths` intersect. */ + getDeepestCommonAncestorFrom( + paths: NodePath[], + filter?: (deepest: Node, i: number, ancestries: NodePath[]) => NodePath + ): NodePath; + + /** + * Build an array of node paths containing the entire ancestry of the current node path. + * + * NOTE: The current node path is included in this. + */ + getAncestry(): NodePath[]; + + inType(...candidateTypes: string[]): boolean; + + // ------------------------- inference ------------------------- + /** Infer the type of the current `NodePath`. */ + getTypeAnnotation(): t.FlowType; + + isBaseType(baseName: string, soft?: boolean): boolean; + + couldBeBaseType(name: string): boolean; + + baseTypeStrictlyMatches(right: NodePath): boolean; + + isGenericType(genericName: string): boolean; + + // ------------------------- replacement ------------------------- + /** + * Replace a node with an array of multiple. This method performs the following steps: + * + * - Inherit the comments of first provided node with that of the current node. + * - Insert the provided nodes after the current node. + * - Remove the current node. + */ + replaceWithMultiple(nodes: Node[]): void; + + /** + * Parse a string as an expression and replace the current node with the result. + * + * NOTE: This is typically not a good idea to use. Building source strings when + * transforming ASTs is an antipattern and SHOULD NOT be encouraged. Even if it's + * easier to use, your transforms will be extremely brittle. + */ + replaceWithSourceString(replacement: any): void; + + /** Replace the current node with another. */ + replaceWith(replacement: Node | NodePath): void; + + /** + * This method takes an array of statements nodes and then explodes it + * into expressions. This method retains completion records which is + * extremely important to retain original semantics. + */ + replaceExpressionWithStatements(nodes: Node[]): Node; + + replaceInline(nodes: Node | Node[]): void; + + // ------------------------- evaluation ------------------------- + /** + * Walk the input `node` and statically evaluate if it's truthy. + * + * Returning `true` when we're sure that the expression will evaluate to a + * truthy value, `false` if we're sure that it will evaluate to a falsy + * value and `undefined` if we aren't sure. Because of this please do not + * rely on coercion when using this method and check with === if it's false. + */ + evaluateTruthy(): boolean; + + /** + * Walk the input `node` and statically evaluate it. + * + * Returns an object in the form `{ confident, value }`. `confident` indicates + * whether or not we had to drop out of evaluating the expression because of + * hitting an unknown node that we couldn't confidently find the value of. + * + * Example: + * + * t.evaluate(parse("5 + 5")) // { confident: true, value: 10 } + * t.evaluate(parse("!true")) // { confident: true, value: false } + * t.evaluate(parse("foo + foo")) // { confident: false, value: undefined } + */ + evaluate(): { confident: boolean; value: any }; + + // ------------------------- introspection ------------------------- + /** + * Match the current node if it matches the provided `pattern`. + * + * For example, given the match `React.createClass` it would match the + * parsed nodes of `React.createClass` and `React["createClass"]`. + */ + matchesPattern(pattern: string, allowPartial?: boolean): boolean; + + /** + * Check whether we have the input `key`. If the `key` references an array then we check + * if the array has any items, otherwise we just check if it's falsy. + */ + has(key: string): boolean; + + isStatic(): boolean; + + /** Alias of `has`. */ + is(key: string): boolean; + + /** Opposite of `has`. */ + isnt(key: string): boolean; + + /** Check whether the path node `key` strict equals `value`. */ + equals(key: string, value: any): boolean; + + /** + * Check the type against our stored internal type of the node. This is handy when a node has + * been removed yet we still internally know the type and need it to calculate node replacement. + */ + isNodeType(type: string): boolean; + + /** + * This checks whether or not we're in one of the following positions: + * + * for (KEY in right); + * for (KEY;;); + * + * This is because these spots allow VariableDeclarations AND normal expressions so we need + * to tell the path replacement that it's ok to replace this with an expression. + */ + canHaveVariableDeclarationOrExpression(): boolean; + + /** + * This checks whether we are swapping an arrow function's body between an + * expression and a block statement (or vice versa). + * + * This is because arrow functions may implicitly return an expression, which + * is the same as containing a block statement. + */ + canSwapBetweenExpressionAndStatement(replacement: Node): boolean; + + /** Check whether the current path references a completion record */ + isCompletionRecord(allowInsideFunction?: boolean): boolean; + + /** + * Check whether or not the current `key` allows either a single statement or block statement + * so we can explode it if necessary. + */ + isStatementOrBlock(): boolean; + + /** Check if the currently assigned path references the `importName` of `moduleSource`. */ + referencesImport(moduleSource: string, importName: string): boolean; + + /** Get the source code associated with this node. */ + getSource(): string; + + /** Check if the current path will maybe execute before another path */ + willIMaybeExecuteBefore(path: NodePath): boolean; + + // ------------------------- context ------------------------- + call(key: string): boolean; + + isBlacklisted(): boolean; + + visit(): boolean; + + skip(): void; + + skipKey(key: string): void; + + stop(): void; + + setScope(): void; + + setContext(context: TraversalContext): NodePath; + + popContext(): void; + + pushContext(context: TraversalContext): void; + + // ------------------------- removal ------------------------- + remove(): void; + + // ------------------------- modification ------------------------- + /** Insert the provided nodes before the current one. */ + insertBefore(nodes: Node | Node[]): any; + + /** + * Insert the provided nodes after the current one. When inserting nodes after an + * expression, ensure that the completion record is correct by pushing the current node. + */ + insertAfter(nodes: Node | Node[]): any; + + /** Update all sibling node paths after `fromIndex` by `incrementBy`. */ + updateSiblingKeys(fromIndex: number, incrementBy: number): void; + + /** Hoist the current node to the highest scope possible and return a UID referencing it. */ + hoist(scope: Scope): void; + + // ------------------------- family ------------------------- + getOpposite(): NodePath; + + getCompletionRecords(): NodePath[]; + + getSibling(key: string | number): NodePath; + getAllPrevSiblings(): NodePath[]; + getAllNextSiblings(): NodePath[]; + + get(key: K, context?: boolean | TraversalContext): + T[K] extends Array ? Array> : + T[K] extends Node | null | undefined ? NodePath : + never; + get(key: string, context?: boolean | TraversalContext): NodePath | NodePath[]; + + getBindingIdentifiers(duplicates?: boolean): Node[]; + + getOuterBindingIdentifiers(duplicates?: boolean): Node[]; + + // ------------------------- comments ------------------------- + /** Share comments amongst siblings. */ + shareCommentsWithSiblings(): void; + + addComment(type: string, content: string, line?: boolean): void; + + /** Give node `comments` of the specified `type`. */ + addComments(type: string, comments: any[]): void; + + // ------------------------- isXXX ------------------------- + isArrayExpression(opts?: object): this is NodePath; + isAssignmentExpression(opts?: object): this is NodePath; + isBinaryExpression(opts?: object): this is NodePath; + isDirective(opts?: object): this is NodePath; + isDirectiveLiteral(opts?: object): this is NodePath; + isBlockStatement(opts?: object): this is NodePath; + isBreakStatement(opts?: object): this is NodePath; + isCallExpression(opts?: object): this is NodePath; + isCatchClause(opts?: object): this is NodePath; + isConditionalExpression(opts?: object): this is NodePath; + isContinueStatement(opts?: object): this is NodePath; + isDebuggerStatement(opts?: object): this is NodePath; + isDoWhileStatement(opts?: object): this is NodePath; + isEmptyStatement(opts?: object): this is NodePath; + isExpressionStatement(opts?: object): this is NodePath; + isFile(opts?: object): this is NodePath; + isForInStatement(opts?: object): this is NodePath; + isForStatement(opts?: object): this is NodePath; + isFunctionDeclaration(opts?: object): this is NodePath; + isFunctionExpression(opts?: object): this is NodePath; + isIdentifier(opts?: object): this is NodePath; + isIfStatement(opts?: object): this is NodePath; + isLabeledStatement(opts?: object): this is NodePath; + isStringLiteral(opts?: object): this is NodePath; + isNumericLiteral(opts?: object): this is NodePath; + isNullLiteral(opts?: object): this is NodePath; + isBooleanLiteral(opts?: object): this is NodePath; + isRegExpLiteral(opts?: object): this is NodePath; + isLogicalExpression(opts?: object): this is NodePath; + isMemberExpression(opts?: object): this is NodePath; + isNewExpression(opts?: object): this is NodePath; + isProgram(opts?: object): this is NodePath; + isObjectExpression(opts?: object): this is NodePath; + isObjectMethod(opts?: object): this is NodePath; + isObjectProperty(opts?: object): this is NodePath; + isRestElement(opts?: object): this is NodePath; + isReturnStatement(opts?: object): this is NodePath; + isSequenceExpression(opts?: object): this is NodePath; + isSwitchCase(opts?: object): this is NodePath; + isSwitchStatement(opts?: object): this is NodePath; + isThisExpression(opts?: object): this is NodePath; + isThrowStatement(opts?: object): this is NodePath; + isTryStatement(opts?: object): this is NodePath; + isUnaryExpression(opts?: object): this is NodePath; + isUpdateExpression(opts?: object): this is NodePath; + isVariableDeclaration(opts?: object): this is NodePath; + isVariableDeclarator(opts?: object): this is NodePath; + isWhileStatement(opts?: object): this is NodePath; + isWithStatement(opts?: object): this is NodePath; + isAssignmentPattern(opts?: object): this is NodePath; + isArrayPattern(opts?: object): this is NodePath; + isArrowFunctionExpression(opts?: object): this is NodePath; + isClassBody(opts?: object): this is NodePath; + isClassDeclaration(opts?: object): this is NodePath; + isClassExpression(opts?: object): this is NodePath; + isExportAllDeclaration(opts?: object): this is NodePath; + isExportDefaultDeclaration(opts?: object): this is NodePath; + isExportNamedDeclaration(opts?: object): this is NodePath; + isExportSpecifier(opts?: object): this is NodePath; + isForOfStatement(opts?: object): this is NodePath; + isImportDeclaration(opts?: object): this is NodePath; + isImportDefaultSpecifier(opts?: object): this is NodePath; + isImportNamespaceSpecifier(opts?: object): this is NodePath; + isImportSpecifier(opts?: object): this is NodePath; + isMetaProperty(opts?: object): this is NodePath; + isClassMethod(opts?: object): this is NodePath; + isObjectPattern(opts?: object): this is NodePath; + isSpreadElement(opts?: object): this is NodePath; + isSuper(opts?: object): this is NodePath; + isTaggedTemplateExpression(opts?: object): this is NodePath; + isTemplateElement(opts?: object): this is NodePath; + isTemplateLiteral(opts?: object): this is NodePath; + isYieldExpression(opts?: object): this is NodePath; + isAnyTypeAnnotation(opts?: object): this is NodePath; + isArrayTypeAnnotation(opts?: object): this is NodePath; + isBooleanTypeAnnotation(opts?: object): this is NodePath; + isBooleanLiteralTypeAnnotation(opts?: object): this is NodePath; + isNullLiteralTypeAnnotation(opts?: object): this is NodePath; + isClassImplements(opts?: object): this is NodePath; + isClassProperty(opts?: object): this is NodePath; + isDeclareClass(opts?: object): this is NodePath; + isDeclareFunction(opts?: object): this is NodePath; + isDeclareInterface(opts?: object): this is NodePath; + isDeclareModule(opts?: object): this is NodePath; + isDeclareTypeAlias(opts?: object): this is NodePath; + isDeclareVariable(opts?: object): this is NodePath; + isFunctionTypeAnnotation(opts?: object): this is NodePath; + isFunctionTypeParam(opts?: object): this is NodePath; + isGenericTypeAnnotation(opts?: object): this is NodePath; + isInterfaceExtends(opts?: object): this is NodePath; + isInterfaceDeclaration(opts?: object): this is NodePath; + isIntersectionTypeAnnotation(opts?: object): this is NodePath; + isMixedTypeAnnotation(opts?: object): this is NodePath; + isNullableTypeAnnotation(opts?: object): this is NodePath; + isNumberTypeAnnotation(opts?: object): this is NodePath; + isStringLiteralTypeAnnotation(opts?: object): this is NodePath; + isStringTypeAnnotation(opts?: object): this is NodePath; + isThisTypeAnnotation(opts?: object): this is NodePath; + isTupleTypeAnnotation(opts?: object): this is NodePath; + isTypeofTypeAnnotation(opts?: object): this is NodePath; + isTypeAlias(opts?: object): this is NodePath; + isTypeAnnotation(opts?: object): this is NodePath; + isTypeCastExpression(opts?: object): this is NodePath; + isTypeParameterDeclaration(opts?: object): this is NodePath; + isTypeParameterInstantiation(opts?: object): this is NodePath; + isObjectTypeAnnotation(opts?: object): this is NodePath; + isObjectTypeCallProperty(opts?: object): this is NodePath; + isObjectTypeIndexer(opts?: object): this is NodePath; + isObjectTypeProperty(opts?: object): this is NodePath; + isQualifiedTypeIdentifier(opts?: object): this is NodePath; + isUnionTypeAnnotation(opts?: object): this is NodePath; + isVoidTypeAnnotation(opts?: object): this is NodePath; + isJSXAttribute(opts?: object): this is NodePath; + isJSXClosingElement(opts?: object): this is NodePath; + isJSXElement(opts?: object): this is NodePath; + isJSXEmptyExpression(opts?: object): this is NodePath; + isJSXExpressionContainer(opts?: object): this is NodePath; + isJSXIdentifier(opts?: object): this is NodePath; + isJSXMemberExpression(opts?: object): this is NodePath; + isJSXNamespacedName(opts?: object): this is NodePath; + isJSXOpeningElement(opts?: object): this is NodePath; + isJSXSpreadAttribute(opts?: object): this is NodePath; + isJSXText(opts?: object): this is NodePath; + isNoop(opts?: object): this is NodePath; + isParenthesizedExpression(opts?: object): this is NodePath; + isAwaitExpression(opts?: object): this is NodePath; + isBindExpression(opts?: object): this is NodePath; + isDecorator(opts?: object): this is NodePath; + isDoExpression(opts?: object): this is NodePath; + isExportDefaultSpecifier(opts?: object): this is NodePath; + isExportNamespaceSpecifier(opts?: object): this is NodePath; + isRestProperty(opts?: object): this is NodePath; + isSpreadProperty(opts?: object): this is NodePath; + isExpression(opts?: object): this is NodePath; + isBinary(opts?: object): this is NodePath; + isScopable(opts?: object): this is NodePath; + isBlockParent(opts?: object): this is NodePath; + isBlock(opts?: object): this is NodePath; + isStatement(opts?: object): this is NodePath; + isTerminatorless(opts?: object): this is NodePath; + isCompletionStatement(opts?: object): this is NodePath; + isConditional(opts?: object): this is NodePath; + isLoop(opts?: object): this is NodePath; + isWhile(opts?: object): this is NodePath; + isExpressionWrapper(opts?: object): this is NodePath; + isFor(opts?: object): this is NodePath; + isForXStatement(opts?: object): this is NodePath; + isFunction(opts?: object): this is NodePath; + isFunctionParent(opts?: object): this is NodePath; + isPureish(opts?: object): this is NodePath; + isDeclaration(opts?: object): this is NodePath; + isLVal(opts?: object): this is NodePath; + isLiteral(opts?: object): this is NodePath; + isImmutable(opts?: object): this is NodePath; + isUserWhitespacable(opts?: object): this is NodePath; + isMethod(opts?: object): this is NodePath; + isObjectMember(opts?: object): this is NodePath; + isProperty(opts?: object): this is NodePath; + isUnaryLike(opts?: object): this is NodePath; + isPattern(opts?: object): this is NodePath; + isClass(opts?: object): this is NodePath; + isModuleDeclaration(opts?: object): this is NodePath; + isExportDeclaration(opts?: object): this is NodePath; + isModuleSpecifier(opts?: object): this is NodePath; + isFlow(opts?: object): this is NodePath; + isFlowBaseAnnotation(opts?: object): this is NodePath; + isFlowDeclaration(opts?: object): this is NodePath; + isJSX(opts?: object): this is NodePath; + isNumberLiteral(opts?: object): this is NodePath; + isRegexLiteral(opts?: object): this is NodePath; + isReferencedIdentifier(opts?: object): this is NodePath; + isReferencedMemberExpression(opts?: object): this is NodePath; + isBindingIdentifier(opts?: object): this is NodePath; + isScope(opts?: object): this is NodePath; + isReferenced(opts?: object): boolean; + isBlockScoped(opts?: object): this is NodePath; + isVar(opts?: object): this is NodePath; + isUser(opts?: object): boolean; + isGenerated(opts?: object): boolean; + isPure(opts?: object): boolean; + + // ------------------------- assertXXX ------------------------- + assertArrayExpression(opts?: object): void; + assertAssignmentExpression(opts?: object): void; + assertBinaryExpression(opts?: object): void; + assertDirective(opts?: object): void; + assertDirectiveLiteral(opts?: object): void; + assertBlockStatement(opts?: object): void; + assertBreakStatement(opts?: object): void; + assertCallExpression(opts?: object): void; + assertCatchClause(opts?: object): void; + assertConditionalExpression(opts?: object): void; + assertContinueStatement(opts?: object): void; + assertDebuggerStatement(opts?: object): void; + assertDoWhileStatement(opts?: object): void; + assertEmptyStatement(opts?: object): void; + assertExpressionStatement(opts?: object): void; + assertFile(opts?: object): void; + assertForInStatement(opts?: object): void; + assertForStatement(opts?: object): void; + assertFunctionDeclaration(opts?: object): void; + assertFunctionExpression(opts?: object): void; + assertIdentifier(opts?: object): void; + assertIfStatement(opts?: object): void; + assertLabeledStatement(opts?: object): void; + assertStringLiteral(opts?: object): void; + assertNumericLiteral(opts?: object): void; + assertNullLiteral(opts?: object): void; + assertBooleanLiteral(opts?: object): void; + assertRegExpLiteral(opts?: object): void; + assertLogicalExpression(opts?: object): void; + assertMemberExpression(opts?: object): void; + assertNewExpression(opts?: object): void; + assertProgram(opts?: object): void; + assertObjectExpression(opts?: object): void; + assertObjectMethod(opts?: object): void; + assertObjectProperty(opts?: object): void; + assertRestElement(opts?: object): void; + assertReturnStatement(opts?: object): void; + assertSequenceExpression(opts?: object): void; + assertSwitchCase(opts?: object): void; + assertSwitchStatement(opts?: object): void; + assertThisExpression(opts?: object): void; + assertThrowStatement(opts?: object): void; + assertTryStatement(opts?: object): void; + assertUnaryExpression(opts?: object): void; + assertUpdateExpression(opts?: object): void; + assertVariableDeclaration(opts?: object): void; + assertVariableDeclarator(opts?: object): void; + assertWhileStatement(opts?: object): void; + assertWithStatement(opts?: object): void; + assertAssignmentPattern(opts?: object): void; + assertArrayPattern(opts?: object): void; + assertArrowFunctionExpression(opts?: object): void; + assertClassBody(opts?: object): void; + assertClassDeclaration(opts?: object): void; + assertClassExpression(opts?: object): void; + assertExportAllDeclaration(opts?: object): void; + assertExportDefaultDeclaration(opts?: object): void; + assertExportNamedDeclaration(opts?: object): void; + assertExportSpecifier(opts?: object): void; + assertForOfStatement(opts?: object): void; + assertImportDeclaration(opts?: object): void; + assertImportDefaultSpecifier(opts?: object): void; + assertImportNamespaceSpecifier(opts?: object): void; + assertImportSpecifier(opts?: object): void; + assertMetaProperty(opts?: object): void; + assertClassMethod(opts?: object): void; + assertObjectPattern(opts?: object): void; + assertSpreadElement(opts?: object): void; + assertSuper(opts?: object): void; + assertTaggedTemplateExpression(opts?: object): void; + assertTemplateElement(opts?: object): void; + assertTemplateLiteral(opts?: object): void; + assertYieldExpression(opts?: object): void; + assertAnyTypeAnnotation(opts?: object): void; + assertArrayTypeAnnotation(opts?: object): void; + assertBooleanTypeAnnotation(opts?: object): void; + assertBooleanLiteralTypeAnnotation(opts?: object): void; + assertNullLiteralTypeAnnotation(opts?: object): void; + assertClassImplements(opts?: object): void; + assertClassProperty(opts?: object): void; + assertDeclareClass(opts?: object): void; + assertDeclareFunction(opts?: object): void; + assertDeclareInterface(opts?: object): void; + assertDeclareModule(opts?: object): void; + assertDeclareTypeAlias(opts?: object): void; + assertDeclareVariable(opts?: object): void; + assertExistentialTypeParam(opts?: object): void; + assertFunctionTypeAnnotation(opts?: object): void; + assertFunctionTypeParam(opts?: object): void; + assertGenericTypeAnnotation(opts?: object): void; + assertInterfaceExtends(opts?: object): void; + assertInterfaceDeclaration(opts?: object): void; + assertIntersectionTypeAnnotation(opts?: object): void; + assertMixedTypeAnnotation(opts?: object): void; + assertNullableTypeAnnotation(opts?: object): void; + assertNumericLiteralTypeAnnotation(opts?: object): void; + assertNumberTypeAnnotation(opts?: object): void; + assertStringLiteralTypeAnnotation(opts?: object): void; + assertStringTypeAnnotation(opts?: object): void; + assertThisTypeAnnotation(opts?: object): void; + assertTupleTypeAnnotation(opts?: object): void; + assertTypeofTypeAnnotation(opts?: object): void; + assertTypeAlias(opts?: object): void; + assertTypeAnnotation(opts?: object): void; + assertTypeCastExpression(opts?: object): void; + assertTypeParameterDeclaration(opts?: object): void; + assertTypeParameterInstantiation(opts?: object): void; + assertObjectTypeAnnotation(opts?: object): void; + assertObjectTypeCallProperty(opts?: object): void; + assertObjectTypeIndexer(opts?: object): void; + assertObjectTypeProperty(opts?: object): void; + assertQualifiedTypeIdentifier(opts?: object): void; + assertUnionTypeAnnotation(opts?: object): void; + assertVoidTypeAnnotation(opts?: object): void; + assertJSXAttribute(opts?: object): void; + assertJSXClosingElement(opts?: object): void; + assertJSXElement(opts?: object): void; + assertJSXEmptyExpression(opts?: object): void; + assertJSXExpressionContainer(opts?: object): void; + assertJSXIdentifier(opts?: object): void; + assertJSXMemberExpression(opts?: object): void; + assertJSXNamespacedName(opts?: object): void; + assertJSXOpeningElement(opts?: object): void; + assertJSXSpreadAttribute(opts?: object): void; + assertJSXText(opts?: object): void; + assertNoop(opts?: object): void; + assertParenthesizedExpression(opts?: object): void; + assertAwaitExpression(opts?: object): void; + assertBindExpression(opts?: object): void; + assertDecorator(opts?: object): void; + assertDoExpression(opts?: object): void; + assertExportDefaultSpecifier(opts?: object): void; + assertExportNamespaceSpecifier(opts?: object): void; + assertRestProperty(opts?: object): void; + assertSpreadProperty(opts?: object): void; + assertExpression(opts?: object): void; + assertBinary(opts?: object): void; + assertScopable(opts?: object): void; + assertBlockParent(opts?: object): void; + assertBlock(opts?: object): void; + assertStatement(opts?: object): void; + assertTerminatorless(opts?: object): void; + assertCompletionStatement(opts?: object): void; + assertConditional(opts?: object): void; + assertLoop(opts?: object): void; + assertWhile(opts?: object): void; + assertExpressionWrapper(opts?: object): void; + assertFor(opts?: object): void; + assertForXStatement(opts?: object): void; + assertFunction(opts?: object): void; + assertFunctionParent(opts?: object): void; + assertPureish(opts?: object): void; + assertDeclaration(opts?: object): void; + assertLVal(opts?: object): void; + assertLiteral(opts?: object): void; + assertImmutable(opts?: object): void; + assertUserWhitespacable(opts?: object): void; + assertMethod(opts?: object): void; + assertObjectMember(opts?: object): void; + assertProperty(opts?: object): void; + assertUnaryLike(opts?: object): void; + assertPattern(opts?: object): void; + assertClass(opts?: object): void; + assertModuleDeclaration(opts?: object): void; + assertExportDeclaration(opts?: object): void; + assertModuleSpecifier(opts?: object): void; + assertFlow(opts?: object): void; + assertFlowBaseAnnotation(opts?: object): void; + assertFlowDeclaration(opts?: object): void; + assertJSX(opts?: object): void; + assertNumberLiteral(opts?: object): void; + assertRegexLiteral(opts?: object): void; +} + +export class Hub { + constructor(file: any, options: any); + file: any; + options: any; +} + +export interface TraversalContext { + parentPath: NodePath; + scope: Scope; + state: any; + opts: any; +} diff --git a/node_modules/@types/babel__traverse/package.json b/node_modules/@types/babel__traverse/package.json new file mode 100644 index 00000000..c26ec41f --- /dev/null +++ b/node_modules/@types/babel__traverse/package.json @@ -0,0 +1,45 @@ +{ + "name": "@types/babel__traverse", + "version": "7.0.7", + "description": "TypeScript definitions for @babel/traverse", + "license": "MIT", + "contributors": [ + { + "name": "Troy Gerwien", + "url": "https://github.com/yortus", + "githubUsername": "yortus" + }, + { + "name": "Marvin Hagemeister", + "url": "https://github.com/marvinhagemeister", + "githubUsername": "marvinhagemeister" + }, + { + "name": "Ryan Petrich", + "url": "https://github.com/rpetrich", + "githubUsername": "rpetrich" + }, + { + "name": "Melvin Groenhoff", + "url": "https://github.com/mgroenhoff", + "githubUsername": "mgroenhoff" + } + ], + "main": "", + "types": "index", + "repository": { + "type": "git", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", + "directory": "types/babel__traverse" + }, + "scripts": {}, + "dependencies": { + "@babel/types": "^7.3.0" + }, + "typesPublisherContentHash": "37e6c080b57f5b07ab86b0af01352617892a3cd9fc9db8bd3c69fa0610672457", + "typeScriptVersion": "2.9" + +,"_resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.0.7.tgz" +,"_integrity": "sha512-CeBpmX1J8kWLcDEnI3Cl2Eo6RfbGvzUctA+CjZUhOKDFbLfcr7fc4usEqLNWetrlJd7RhAkyYe2czXop4fICpw==" +,"_from": "@types/babel__traverse@7.0.7" +} \ No newline at end of file diff --git a/node_modules/@types/istanbul-lib-coverage/LICENSE b/node_modules/@types/istanbul-lib-coverage/LICENSE new file mode 100644 index 00000000..4b1ad51b --- /dev/null +++ b/node_modules/@types/istanbul-lib-coverage/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/node_modules/@types/istanbul-lib-coverage/README.md b/node_modules/@types/istanbul-lib-coverage/README.md new file mode 100644 index 00000000..5afb16ed --- /dev/null +++ b/node_modules/@types/istanbul-lib-coverage/README.md @@ -0,0 +1,16 @@ +# Installation +> `npm install --save @types/istanbul-lib-coverage` + +# Summary +This package contains type definitions for istanbul-lib-coverage ( https://istanbul.js.org ). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/istanbul-lib-coverage + +Additional Details + * Last updated: Thu, 25 Apr 2019 23:07:43 GMT + * Dependencies: none + * Global values: none + +# Credits +These definitions were written by Jason Cheatham , Lorenzo Rapetti . diff --git a/node_modules/@types/istanbul-lib-coverage/index.d.ts b/node_modules/@types/istanbul-lib-coverage/index.d.ts new file mode 100644 index 00000000..fc8a8ded --- /dev/null +++ b/node_modules/@types/istanbul-lib-coverage/index.d.ts @@ -0,0 +1,118 @@ +// Type definitions for istanbul-lib-coverage 2.0 +// Project: https://istanbul.js.org, https://github.com/istanbuljs/istanbuljs +// Definitions by: Jason Cheatham +// Lorenzo Rapetti +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +export interface CoverageSummaryData { + lines: Totals; + statements: Totals; + branches: Totals; + functions: Totals; +} + +export class CoverageSummary { + constructor(data: CoverageSummary | CoverageSummaryData); + merge(obj: CoverageSummary): CoverageSummary; + toJSON(): CoverageSummaryData; + isEmpty(): boolean; + data: CoverageSummaryData; + lines: Totals; + statements: Totals; + branches: Totals; + functions: Totals; +} + +export interface CoverageMapData { + [key: string]: FileCoverage; +} + +export class CoverageMap { + constructor(data: CoverageMapData | CoverageMap); + addFileCoverage(pathOrObject: string | FileCoverage | FileCoverageData): void; + files(): string[]; + fileCoverageFor(filename: string): FileCoverage; + filter(callback: (key: string) => boolean): void; + getCoverageSummary(): CoverageSummary; + merge(data: CoverageMapData | CoverageMap): void; + toJSON(): CoverageMapData; + data: CoverageMapData; +} + +export interface Location { + line: number; + column: number; +} + +export interface Range { + start: Location; + end: Location; +} + +export interface BranchMapping { + loc: Range; + type: string; + locations: Range[]; + line: number; +} + +export interface FunctionMapping { + name: string; + decl: Range; + loc: Range; + line: number; +} + +export interface FileCoverageData { + path: string; + statementMap: { [key: string]: Range }; + fnMap: { [key: string]: FunctionMapping }; + branchMap: { [key: string]: BranchMapping }; + s: { [key: string]: number }; + f: { [key: string]: number }; + b: { [key: string]: number[] }; +} + +export interface Totals { + total: number; + covered: number; + skipped: number; + pct: number; +} + +export interface Coverage { + covered: number; + total: number; + coverage: number; +} + +export class FileCoverage implements FileCoverageData { + constructor(data: string | FileCoverage | FileCoverageData); + merge(other: FileCoverageData): void; + getBranchCoverageByLine(): { [line: number]: Coverage }; + getLineCoverage(): { [line: number]: number }; + getUncoveredLines(): number[]; + resetHits(): void; + computeBranchTotals(): Totals; + computeSimpleTotals(): Totals; + toSummary(): CoverageSummary; + toJSON(): object; + + data: FileCoverageData; + path: string; + statementMap: { [key: string]: Range }; + fnMap: { [key: string]: FunctionMapping }; + branchMap: { [key: string]: BranchMapping }; + s: { [key: string]: number }; + f: { [key: string]: number }; + b: { [key: string]: number[] }; +} + +export const classes: { + FileCoverage: FileCoverage; +}; + +export function createCoverageMap(data?: CoverageMap | CoverageMapData): CoverageMap; +export function createCoverageSummary(obj?: CoverageSummary | CoverageSummaryData): CoverageSummary; +export function createFileCoverage(pathOrObject: string | FileCoverage | FileCoverageData): FileCoverage; diff --git a/node_modules/@types/istanbul-lib-coverage/package.json b/node_modules/@types/istanbul-lib-coverage/package.json new file mode 100644 index 00000000..c6fa42e6 --- /dev/null +++ b/node_modules/@types/istanbul-lib-coverage/package.json @@ -0,0 +1,33 @@ +{ + "name": "@types/istanbul-lib-coverage", + "version": "2.0.1", + "description": "TypeScript definitions for istanbul-lib-coverage", + "license": "MIT", + "contributors": [ + { + "name": "Jason Cheatham", + "url": "https://github.com/jason0x43", + "githubUsername": "jason0x43" + }, + { + "name": "Lorenzo Rapetti", + "url": "https://github.com/loryman", + "githubUsername": "loryman" + } + ], + "main": "", + "types": "index", + "repository": { + "type": "git", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", + "directory": "types/istanbul-lib-coverage" + }, + "scripts": {}, + "dependencies": {}, + "typesPublisherContentHash": "fb2cf9603945473dc60dede8472e884daa070938a01b09aa816ca0cc979213ba", + "typeScriptVersion": "2.4" + +,"_resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz" +,"_integrity": "sha512-hRJD2ahnnpLgsj6KWMYSrmXkM3rm2Dl1qkx6IOFD5FnuNPXJIG5L0dhgKXCYTRMGzU4n0wImQ/xfmRc4POUFlg==" +,"_from": "@types/istanbul-lib-coverage@2.0.1" +} \ No newline at end of file diff --git a/node_modules/@types/istanbul-lib-report/LICENSE b/node_modules/@types/istanbul-lib-report/LICENSE new file mode 100644 index 00000000..4b1ad51b --- /dev/null +++ b/node_modules/@types/istanbul-lib-report/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/node_modules/@types/istanbul-lib-report/README.md b/node_modules/@types/istanbul-lib-report/README.md new file mode 100644 index 00000000..70d7e8c6 --- /dev/null +++ b/node_modules/@types/istanbul-lib-report/README.md @@ -0,0 +1,16 @@ +# Installation +> `npm install --save @types/istanbul-lib-report` + +# Summary +This package contains type definitions for istanbul-lib-report ( https://istanbul.js.org ). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/istanbul-lib-report + +Additional Details + * Last updated: Thu, 25 Apr 2019 23:07:44 GMT + * Dependencies: @types/istanbul-lib-coverage + * Global values: none + +# Credits +These definitions were written by Jason Cheatham . diff --git a/node_modules/@types/istanbul-lib-report/index.d.ts b/node_modules/@types/istanbul-lib-report/index.d.ts new file mode 100644 index 00000000..9dcb5bff --- /dev/null +++ b/node_modules/@types/istanbul-lib-report/index.d.ts @@ -0,0 +1,82 @@ +// Type definitions for istanbul-lib-report 1.1 +// Project: https://istanbul.js.org, https://github.com/istanbuljs/istanbuljs +// Definitions by: Jason Cheatham +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +import { CoverageMap, FileCoverage, CoverageSummary } from 'istanbul-lib-coverage'; + +export function createContext(options?: Partial): Context; +export function getDefaultWatermarks(): Watermarks; + +export const summarizers: { + flat(coverageMap: CoverageMap): Tree; + nested(coverageMap: CoverageMap): Tree; + pkg(coverageMap: CoverageMap): Tree; +}; + +export interface ContextOptions { + dir: string; + watermarks: Watermarks; + sourceFinder(filepath: string): string; +} + +export interface Context extends ContextOptions { + data: any; + writer: FileWriter; +} + +export interface ContentWriter { + write(str: string): void; + colorize(str: string, cls?: string): string; + println(str: string): void; + close(): void; +} + +export interface FileWriter { + writeForDir(subdir: string): FileWriter; + copyFile(source: string, dest: string): void; + writeFile(file: string | null): ContentWriter; +} + +export interface Watermarks { + statements: number[]; + functions: number[]; + branches: number[]; + lines: number[]; +} + +export interface Node { + getQualifiedName(): string; + getRelativeName(): string; + isRoot(): boolean; + getParent(): Node; + getChildren(): Node[]; + isSummary(): boolean; + getCoverageSummary(filesOnly: boolean): CoverageSummary; + getFileCoverage(): FileCoverage; + visit(visitor: Visitor, state: any): void; +} + +export interface ReportNode extends Node { + path: string; + parent: ReportNode | null; + fileCoverage: FileCoverage; + children: ReportNode[]; + addChild(child: ReportNode): void; + asRelative(p: string): string; + visit(visitor: Visitor, state: any): void; +} + +export interface Visitor { + onStart(root: N, state: any): void; + onSummary(root: N, state: any): void; + onDetail(root: N, state: any): void; + onSummaryEnd(root: N, state: any): void; + onEnd(root: N, state: any): void; +} + +export interface Tree { + getRoot(): N; + visit(visitor: Partial>, state: any): void; +} diff --git a/node_modules/@types/istanbul-lib-report/package.json b/node_modules/@types/istanbul-lib-report/package.json new file mode 100644 index 00000000..821a21ca --- /dev/null +++ b/node_modules/@types/istanbul-lib-report/package.json @@ -0,0 +1,30 @@ +{ + "name": "@types/istanbul-lib-report", + "version": "1.1.1", + "description": "TypeScript definitions for istanbul-lib-report", + "license": "MIT", + "contributors": [ + { + "name": "Jason Cheatham", + "url": "https://github.com/jason0x43", + "githubUsername": "jason0x43" + } + ], + "main": "", + "types": "index", + "repository": { + "type": "git", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", + "directory": "types/istanbul-lib-report" + }, + "scripts": {}, + "dependencies": { + "@types/istanbul-lib-coverage": "*" + }, + "typesPublisherContentHash": "64af305d196bdbb3cc44bc664daf0546df5c55bce234d53c29f97d0883da2f32", + "typeScriptVersion": "2.4" + +,"_resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-1.1.1.tgz" +,"_integrity": "sha512-3BUTyMzbZa2DtDI2BkERNC6jJw2Mr2Y0oGI7mRxYNBPxppbtEK1F66u3bKwU2g+wxwWI7PAoRpJnOY1grJqzHg==" +,"_from": "@types/istanbul-lib-report@1.1.1" +} \ No newline at end of file diff --git a/node_modules/@types/istanbul-reports/LICENSE b/node_modules/@types/istanbul-reports/LICENSE new file mode 100644 index 00000000..4b1ad51b --- /dev/null +++ b/node_modules/@types/istanbul-reports/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/node_modules/@types/istanbul-reports/README.md b/node_modules/@types/istanbul-reports/README.md new file mode 100644 index 00000000..f691afc8 --- /dev/null +++ b/node_modules/@types/istanbul-reports/README.md @@ -0,0 +1,16 @@ +# Installation +> `npm install --save @types/istanbul-reports` + +# Summary +This package contains type definitions for istanbul-reports ( https://github.com/istanbuljs/istanbuljs ). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/istanbul-reports + +Additional Details + * Last updated: Wed, 17 Apr 2019 17:14:08 GMT + * Dependencies: @types/istanbul-lib-report, @types/istanbul-lib-coverage + * Global values: none + +# Credits +These definitions were written by Jason Cheatham . diff --git a/node_modules/@types/istanbul-reports/index.d.ts b/node_modules/@types/istanbul-reports/index.d.ts new file mode 100644 index 00000000..85067ba4 --- /dev/null +++ b/node_modules/@types/istanbul-reports/index.d.ts @@ -0,0 +1,50 @@ +// Type definitions for istanbul-reports 1.1 +// Project: https://github.com/istanbuljs/istanbuljs, https://istanbul.js.org +// Definitions by: Jason Cheatham +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +import { Context, Node, FileWriter, Visitor } from 'istanbul-lib-report'; +import { CoverageSummary } from 'istanbul-lib-coverage'; + +export function create( + name: T, + options?: Partial +): Visitor; + +export interface ReportOptions { + clover: RootedOptions; + cobertura: RootedOptions; + html: HtmlOptions; + json: Options; + 'json-summary': Options; + lcov: never; + lcovonly: Options; + none: RootedOptions; + teamcity: Options & { blockName: string }; + text: Options & { maxCols: number }; + 'text-lcov': Options; + 'text-summary': Options; +} + +export type ReportType = keyof ReportOptions; + +export interface Options { + file: string; +} + +export interface RootedOptions extends Options { + projectRoot: string; +} + +export interface HtmlOptions { + verbose: boolean; + linkMapper: LinkMapper; + subdir: string; +} + +export interface LinkMapper { + getPath(node: string | Node): string; + relativePath(source: string | Node, target: string | Node): string; + assetPath(node: Node, name: string): string; +} diff --git a/node_modules/@types/istanbul-reports/package.json b/node_modules/@types/istanbul-reports/package.json new file mode 100644 index 00000000..919545fb --- /dev/null +++ b/node_modules/@types/istanbul-reports/package.json @@ -0,0 +1,31 @@ +{ + "name": "@types/istanbul-reports", + "version": "1.1.1", + "description": "TypeScript definitions for istanbul-reports", + "license": "MIT", + "contributors": [ + { + "name": "Jason Cheatham", + "url": "https://github.com/jason0x43", + "githubUsername": "jason0x43" + } + ], + "main": "", + "types": "index", + "repository": { + "type": "git", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", + "directory": "types/istanbul-reports" + }, + "scripts": {}, + "dependencies": { + "@types/istanbul-lib-coverage": "*", + "@types/istanbul-lib-report": "*" + }, + "typesPublisherContentHash": "48ffb8b28b9f445ebd12c748ea4cf877e1b802bee7fa18c4392b793e84bfce5a", + "typeScriptVersion": "2.4" + +,"_resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-1.1.1.tgz" +,"_integrity": "sha512-UpYjBi8xefVChsCoBpKShdxTllC9pwISirfoZsUa2AAdQg/Jd2KQGtSbw+ya7GPo7x/wAPlH6JBhKhAsXUEZNA==" +,"_from": "@types/istanbul-reports@1.1.1" +} \ No newline at end of file diff --git a/node_modules/@types/jest-diff/LICENSE b/node_modules/@types/jest-diff/LICENSE new file mode 100644 index 00000000..4b1ad51b --- /dev/null +++ b/node_modules/@types/jest-diff/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/node_modules/@types/jest-diff/README.md b/node_modules/@types/jest-diff/README.md new file mode 100644 index 00000000..7b68c307 --- /dev/null +++ b/node_modules/@types/jest-diff/README.md @@ -0,0 +1,16 @@ +# Installation +> `npm install --save @types/jest-diff` + +# Summary +This package contains type definitions for jest-diff ( https://github.com/facebook/jest/tree/master/packages/jest-diff ). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jest-diff + +Additional Details + * Last updated: Wed, 13 Feb 2019 18:42:15 GMT + * Dependencies: none + * Global values: none + +# Credits +These definitions were written by Alex Coles . diff --git a/node_modules/@types/jest-diff/index.d.ts b/node_modules/@types/jest-diff/index.d.ts new file mode 100644 index 00000000..022626ab --- /dev/null +++ b/node_modules/@types/jest-diff/index.d.ts @@ -0,0 +1,18 @@ +// Type definitions for jest-diff 20.0 +// Project: https://github.com/facebook/jest/tree/master/packages/jest-diff, https://github.com/facebook/jest +// Definitions by: Alex Coles +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +declare namespace diff { + interface DiffOptions { + aAnnotation?: string; + bAnnotation?: string; + expand?: boolean; + contextLines?: number; + } +} + +declare function diff(a: any, b: any, options?: diff.DiffOptions): string; + +export = diff; diff --git a/node_modules/@types/jest-diff/package.json b/node_modules/@types/jest-diff/package.json new file mode 100644 index 00000000..4ce19c3c --- /dev/null +++ b/node_modules/@types/jest-diff/package.json @@ -0,0 +1,27 @@ +{ + "name": "@types/jest-diff", + "version": "20.0.1", + "description": "TypeScript definitions for jest-diff", + "license": "MIT", + "contributors": [ + { + "name": "Alex Coles", + "url": "https://github.com/myabc", + "githubUsername": "myabc" + } + ], + "main": "", + "types": "index", + "repository": { + "type": "git", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git" + }, + "scripts": {}, + "dependencies": {}, + "typesPublisherContentHash": "c870fcddd40540a283942f82f668244cf72de020fb0110ae019708cb06b19ce2", + "typeScriptVersion": "2.2" + +,"_resolved": "https://registry.npmjs.org/@types/jest-diff/-/jest-diff-20.0.1.tgz" +,"_integrity": "sha512-yALhelO3i0hqZwhjtcr6dYyaLoCHbAMshwtj6cGxTvHZAKXHsYGdff6E8EPw3xLKY0ELUTQ69Q1rQiJENnccMA==" +,"_from": "@types/jest-diff@20.0.1" +} \ No newline at end of file diff --git a/node_modules/@types/jest/LICENSE b/node_modules/@types/jest/LICENSE new file mode 100644 index 00000000..4b1ad51b --- /dev/null +++ b/node_modules/@types/jest/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/node_modules/@types/jest/README.md b/node_modules/@types/jest/README.md new file mode 100644 index 00000000..ee1397b9 --- /dev/null +++ b/node_modules/@types/jest/README.md @@ -0,0 +1,17 @@ +# Installation +> `npm install --save @types/jest` + +# Summary +This package contains type definitions for Jest ( https://jestjs.io/ ). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jest + +Additional Details + * Last updated: Sun, 16 Jun 2019 06:12:11 GMT + * Dependencies: @types/jest-diff + * Global values: afterAll, afterEach, beforeAll, beforeEach, describe, expect, fail, fdescribe, fit, it, jasmine, jest, pending, spyOn, test, xdescribe, xit, xtest + +# Credits +These definitions were written by Asana (https://asana.com) +// Ivo Stratev , jwbay , Alexey Svetliakov , Alex Jover Morales , Allan Lukwago , Ika , Waseem Dahman , Jamie Mason , Douglas Duteil , Ahn , Josh Goldberg , Jeff Lau , Andrew Makarov , Martin Hochel , Sebastian Sebald , Andy , Antoine Brault , Jeroen Claassens , Gregor Stamać , ExE Boss . diff --git a/node_modules/@types/jest/index.d.ts b/node_modules/@types/jest/index.d.ts new file mode 100644 index 00000000..b35924b8 --- /dev/null +++ b/node_modules/@types/jest/index.d.ts @@ -0,0 +1,1779 @@ +// Type definitions for Jest 24.0 +// Project: https://jestjs.io/ +// Definitions by: Asana (https://asana.com) +// Ivo Stratev +// jwbay +// Alexey Svetliakov +// Alex Jover Morales +// Allan Lukwago +// Ika +// Waseem Dahman +// Jamie Mason +// Douglas Duteil +// Ahn +// Josh Goldberg +// Jeff Lau +// Andrew Makarov +// Martin Hochel +// Sebastian Sebald +// Andy +// Antoine Brault +// Jeroen Claassens +// Gregor Stamać +// ExE Boss +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.0 + +/// + +declare var beforeAll: jest.Lifecycle; +declare var beforeEach: jest.Lifecycle; +declare var afterAll: jest.Lifecycle; +declare var afterEach: jest.Lifecycle; +declare var describe: jest.Describe; +declare var fdescribe: jest.Describe; +declare var xdescribe: jest.Describe; +declare var it: jest.It; +declare var fit: jest.It; +declare var xit: jest.It; +declare var test: jest.It; +declare var xtest: jest.It; + +declare const expect: jest.Expect; + +interface NodeRequire { + /** + * Returns the actual module instead of a mock, bypassing all checks on + * whether the module should receive a mock implementation or not. + * + * @deprecated Use `jest.requireActual` instead. + */ + requireActual(moduleName: string): any; + /** + * Returns a mock module instead of the actual module, bypassing all checks + * on whether the module should be required normally or not. + * + * @deprecated Use `jest.requireMock`instead. + */ + requireMock(moduleName: string): any; +} + +declare namespace jest { + /** + * Provides a way to add Jasmine-compatible matchers into your Jest context. + */ + function addMatchers(matchers: jasmine.CustomMatcherFactories): typeof jest; + /** + * Disables automatic mocking in the module loader. + */ + function autoMockOff(): typeof jest; + /** + * Enables automatic mocking in the module loader. + */ + function autoMockOn(): typeof jest; + /** + * Clears the mock.calls and mock.instances properties of all mocks. + * Equivalent to calling .mockClear() on every mocked function. + */ + function clearAllMocks(): typeof jest; + /** + * Resets the state of all mocks. + * Equivalent to calling .mockReset() on every mocked function. + */ + function resetAllMocks(): typeof jest; + /** + * available since Jest 21.1.0 + * Restores all mocks back to their original value. + * Equivalent to calling .mockRestore on every mocked function. + * Beware that jest.restoreAllMocks() only works when mock was created with + * jest.spyOn; other mocks will require you to manually restore them. + */ + function restoreAllMocks(): typeof jest; + /** + * Removes any pending timers from the timer system. If any timers have + * been scheduled, they will be cleared and will never have the opportunity + * to execute in the future. + */ + function clearAllTimers(): typeof jest; + /** + * Indicates that the module system should never return a mocked version + * of the specified module, including all of the specificied module's dependencies. + */ + function deepUnmock(moduleName: string): typeof jest; + /** + * Disables automatic mocking in the module loader. + */ + function disableAutomock(): typeof jest; + /** + * Mocks a module with an auto-mocked version when it is being required. + */ + function doMock(moduleName: string, factory?: () => unknown, options?: MockOptions): typeof jest; + /** + * Indicates that the module system should never return a mocked version + * of the specified module from require() (e.g. that it should always return the real module). + */ + function dontMock(moduleName: string): typeof jest; + /** + * Enables automatic mocking in the module loader. + */ + function enableAutomock(): typeof jest; + /** + * Creates a mock function. Optionally takes a mock implementation. + */ + function fn(): Mock; + /** + * Creates a mock function. Optionally takes a mock implementation. + */ + function fn(implementation?: (...args: Y) => T): Mock; + /** + * Use the automatic mocking system to generate a mocked version of the given module. + */ + function genMockFromModule(moduleName: string): T; + /** + * Returns whether the given function is a mock function. + */ + function isMockFunction(fn: any): fn is Mock; + /** + * Mocks a module with an auto-mocked version when it is being required. + */ + function mock(moduleName: string, factory?: () => unknown, options?: MockOptions): typeof jest; + /** + * Returns the actual module instead of a mock, bypassing all checks on + * whether the module should receive a mock implementation or not. + */ + function requireActual(moduleName: string): any; + /** + * Returns a mock module instead of the actual module, bypassing all checks + * on whether the module should be required normally or not. + */ + function requireMock(moduleName: string): any; + /** + * Resets the module registry - the cache of all required modules. This is + * useful to isolate modules where local state might conflict between tests. + */ + function resetModuleRegistry(): typeof jest; + /** + * Resets the module registry - the cache of all required modules. This is + * useful to isolate modules where local state might conflict between tests. + */ + function resetModules(): typeof jest; + /** + * Creates a sandbox registry for the modules that are loaded inside the callback function.. + * This is useful to isolate specific modules for every test so that local module state doesn't conflict between tests. + */ + function isolateModules(fn: () => void): typeof jest; + /** + * Runs failed tests n-times until they pass or until the max number of retries is exhausted. + * This only works with jest-circus! + */ + function retryTimes(numRetries: number): typeof jest; + /** + * Exhausts tasks queued by setImmediate(). + */ + function runAllImmediates(): typeof jest; + /** + * Exhausts the micro-task queue (usually interfaced in node via process.nextTick). + */ + function runAllTicks(): typeof jest; + /** + * Exhausts the macro-task queue (i.e., all tasks queued by setTimeout() and setInterval()). + */ + function runAllTimers(): typeof jest; + /** + * Executes only the macro-tasks that are currently pending (i.e., only the + * tasks that have been queued by setTimeout() or setInterval() up to this point). + * If any of the currently pending macro-tasks schedule new macro-tasks, + * those new tasks will not be executed by this call. + */ + function runOnlyPendingTimers(): typeof jest; + /** + * (renamed to `advanceTimersByTime` in Jest 21.3.0+) Executes only the macro + * task queue (i.e. all tasks queued by setTimeout() or setInterval() and setImmediate()). + */ + function runTimersToTime(msToRun: number): typeof jest; + /** + * Advances all timers by msToRun milliseconds. All pending "macro-tasks" that have been + * queued via setTimeout() or setInterval(), and would be executed within this timeframe + * will be executed. + */ + function advanceTimersByTime(msToRun: number): typeof jest; + /** + * Explicitly supplies the mock object that the module system should return + * for the specified module. + */ + function setMock(moduleName: string, moduleExports: T): typeof jest; + /** + * Set the default timeout interval for tests and before/after hooks in milliseconds. + * Note: The default timeout interval is 5 seconds if this method is not called. + */ + function setTimeout(timeout: number): typeof jest; + /** + * Creates a mock function similar to jest.fn but also tracks calls to `object[methodName]` + * + * Note: By default, jest.spyOn also calls the spied method. This is different behavior from most + * other test libraries. + * + * @example + * + * const video = require('./video'); + * + * test('plays video', () => { + * const spy = jest.spyOn(video, 'play'); + * const isPlaying = video.play(); + * + * expect(spy).toHaveBeenCalled(); + * expect(isPlaying).toBe(true); + * + * spy.mockReset(); + * spy.mockRestore(); + * }); + */ + function spyOn>>(object: T, method: M, accessType: 'get'): SpyInstance[M], []>; + function spyOn>>(object: T, method: M, accessType: 'set'): SpyInstance[M]]>; + function spyOn>>(object: T, method: M): Required[M] extends (...args: any[]) => any ? + SpyInstance[M]>, ArgsType[M]>> : never; + /** + * Indicates that the module system should never return a mocked version of + * the specified module from require() (e.g. that it should always return the real module). + */ + function unmock(moduleName: string): typeof jest; + /** + * Instructs Jest to use fake versions of the standard timer functions. + */ + function useFakeTimers(): typeof jest; + /** + * Instructs Jest to use the real versions of the standard timer functions. + */ + function useRealTimers(): typeof jest; + + interface MockOptions { + virtual?: boolean; + } + + type EmptyFunction = () => void; + type ArgsType = T extends (...args: infer A) => any ? A : never; + type RejectedValue = T extends PromiseLike ? any : never; + type ResolvedValue = T extends PromiseLike ? U | T : never; + // see https://github.com/Microsoft/TypeScript/issues/25215 + type NonFunctionPropertyNames = { [K in keyof T]: T[K] extends (...args: any[]) => any ? never : K }[keyof T] & string; + type FunctionPropertyNames = { [K in keyof T]: T[K] extends (...args: any[]) => any ? K : never }[keyof T] & string; + + interface DoneCallback { + (...args: any[]): any; + fail(error?: string | { message: string }): any; + } + + type ProvidesCallback = (cb: DoneCallback) => any; + + type Lifecycle = (fn: ProvidesCallback, timeout?: number) => any; + + interface FunctionLike { + readonly name: string; + } + + interface Each { + // Exclusively arrays. + (cases: ReadonlyArray): ( + name: string, + fn: (...args: T) => any, + timeout?: number + ) => void; + // Not arrays. + (cases: ReadonlyArray): ( + name: string, + fn: (...args: T[]) => any, + timeout?: number + ) => void; + (cases: ReadonlyArray>): ( + name: string, + fn: (...args: any[]) => any, + timeout?: number + ) => void; + (strings: TemplateStringsArray, ...placeholders: any[]): ( + name: string, + fn: (arg: any) => any, + timeout?: number + ) => void; + } + + /** + * Creates a test closure + */ + interface It { + /** + * Creates a test closure. + * + * @param name The name of your test + * @param fn The function for your test + * @param timeout The timeout for an async function test + */ + (name: string, fn?: ProvidesCallback, timeout?: number): void; + /** + * Only runs this test in the current file. + */ + only: It; + /** + * Skips running this test in the current file. + */ + skip: It; + /** + * Sketch out which tests to write in the future. + */ + todo: It; + /** + * Experimental and should be avoided. + */ + concurrent: It; + /** + * Use if you keep duplicating the same test with different data. `.each` allows you to write the + * test once and pass data in. + * + * `.each` is available with two APIs: + * + * #### 1 `test.each(table)(name, fn)` + * + * - `table`: Array of Arrays with the arguments that are passed into the test fn for each row. + * - `name`: String the title of the test block. + * - `fn`: Function the test to be ran, this is the function that will receive the parameters in each row as function arguments. + * + * + * #### 2 `test.each table(name, fn)` + * + * - `table`: Tagged Template Literal + * - `name`: String the title of the test, use `$variable` to inject test data into the test title from the tagged template expressions. + * - `fn`: Function the test to be ran, this is the function that will receive the test data object.. + * + * @example + * + * // API 1 + * test.each([[1, 1, 2], [1, 2, 3], [2, 1, 3]])( + * '.add(%i, %i)', + * (a, b, expected) => { + * expect(a + b).toBe(expected); + * }, + * ); + * + * // API 2 + * test.each` + * a | b | expected + * ${1} | ${1} | ${2} + * ${1} | ${2} | ${3} + * ${2} | ${1} | ${3} + * `('returns $expected when $a is added $b', ({a, b, expected}) => { + * expect(a + b).toBe(expected); + * }); + * + */ + each: Each; + } + + interface Describe { + // tslint:disable-next-line ban-types + (name: number | string | Function | FunctionLike, fn: EmptyFunction): void; + /** Only runs the tests inside this `describe` for the current file */ + only: Describe; + /** Skips running the tests inside this `describe` for the current file */ + skip: Describe; + each: Each; + } + + interface MatcherUtils { + readonly expand: boolean; + readonly isNot: boolean; + utils: { + readonly EXPECTED_COLOR: (text: string) => string; + readonly RECEIVED_COLOR: (text: string) => string; + diff: typeof import('jest-diff'); + ensureActualIsNumber(actual: any, matcherName?: string): void; + ensureExpectedIsNumber(actual: any, matcherName?: string): void; + ensureNoExpected(actual: any, matcherName?: string): void; + ensureNumbers(actual: any, expected: any, matcherName?: string): void; + /** + * get the type of a value with handling of edge cases like `typeof []` and `typeof null` + */ + getType(value: any): string; + matcherHint(matcherName: string, received?: string, expected?: string, options?: { secondArgument?: string, isDirectExpectCall?: boolean }): string; + pluralize(word: string, count: number): string; + printExpected(value: any): string; + printReceived(value: any): string; + printWithType(name: string, received: any, print: (value: any) => string): string; + stringify(object: {}, maxDepth?: number): string; + }; + /** + * This is a deep-equality function that will return true if two objects have the same values (recursively). + */ + equals(a: any, b: any): boolean; + } + + interface ExpectExtendMap { + [key: string]: CustomMatcher; + } + + type CustomMatcher = (this: MatcherUtils, received: any, ...actual: any[]) => CustomMatcherResult | Promise; + + interface CustomMatcherResult { + pass: boolean; + message: string | (() => string); + } + + interface SnapshotSerializerOptions { + callToJSON?: boolean; + edgeSpacing?: string; + spacing?: string; + escapeRegex?: boolean; + highlight?: boolean; + indent?: number; + maxDepth?: number; + min?: boolean; + plugins?: SnapshotSerializerPlugin[]; + printFunctionName?: boolean; + theme?: SnapshotSerializerOptionsTheme; + + // see https://github.com/facebook/jest/blob/e56103cf142d2e87542ddfb6bd892bcee262c0e6/types/PrettyFormat.js + } + interface SnapshotSerializerOptionsTheme { + comment?: string; + content?: string; + prop?: string; + tag?: string; + value?: string; + } + interface SnapshotSerializerColor { + close: string; + open: string; + } + interface SnapshotSerializerColors { + comment: SnapshotSerializerColor; + content: SnapshotSerializerColor; + prop: SnapshotSerializerColor; + tag: SnapshotSerializerColor; + value: SnapshotSerializerColor; + } + interface SnapshotSerializerPlugin { + print(val: any, serialize: ((val: any) => string), indent: ((str: string) => string), opts: SnapshotSerializerOptions, colors: SnapshotSerializerColors): string; + test(val: any): boolean; + } + + interface InverseAsymmetricMatchers { + /** + * `expect.not.arrayContaining(array)` matches a received array which + * does not contain all of the elements in the expected array. That is, + * the expected array is not a subset of the received array. It is the + * inverse of `expect.arrayContaining`. + */ + arrayContaining(arr: any[]): any; + /** + * `expect.not.objectContaining(object)` matches any received object + * that does not recursively match the expected properties. That is, the + * expected object is not a subset of the received object. Therefore, + * it matches a received object which contains properties that are not + * in the expected object. It is the inverse of `expect.objectContaining`. + */ + objectContaining(obj: {}): any; + /** + * `expect.not.stringMatching(string | regexp)` matches the received + * string that does not match the expected regexp. It is the inverse of + * `expect.stringMatching`. + */ + stringMatching(str: string | RegExp): any; + /** + * `expect.not.stringContaining(string)` matches the received string + * that does not contain the exact expected string. It is the inverse of + * `expect.stringContaining`. + */ + stringContaining(str: string): any; + } + + /** + * The `expect` function is used every time you want to test a value. + * You will rarely call `expect` by itself. + */ + interface Expect { + /** + * The `expect` function is used every time you want to test a value. + * You will rarely call `expect` by itself. + * + * @param actual The value to apply matchers against. + */ + (actual: T): Matchers; + /** + * Matches anything but null or undefined. You can use it inside `toEqual` or `toBeCalledWith` instead + * of a literal value. For example, if you want to check that a mock function is called with a + * non-null argument: + * + * @example + * + * test('map calls its argument with a non-null argument', () => { + * const mock = jest.fn(); + * [1].map(x => mock(x)); + * expect(mock).toBeCalledWith(expect.anything()); + * }); + * + */ + anything(): any; + /** + * Matches anything that was created with the given constructor. + * You can use it inside `toEqual` or `toBeCalledWith` instead of a literal value. + * + * @example + * + * function randocall(fn) { + * return fn(Math.floor(Math.random() * 6 + 1)); + * } + * + * test('randocall calls its callback with a number', () => { + * const mock = jest.fn(); + * randocall(mock); + * expect(mock).toBeCalledWith(expect.any(Number)); + * }); + */ + any(classType: any): any; + /** + * Matches any array made up entirely of elements in the provided array. + * You can use it inside `toEqual` or `toBeCalledWith` instead of a literal value. + */ + arrayContaining(arr: any[]): any; + /** + * Verifies that a certain number of assertions are called during a test. + * This is often useful when testing asynchronous code, in order to + * make sure that assertions in a callback actually got called. + */ + assertions(num: number): void; + /** + * Verifies that at least one assertion is called during a test. + * This is often useful when testing asynchronous code, in order to + * make sure that assertions in a callback actually got called. + */ + hasAssertions(): void; + /** + * You can use `expect.extend` to add your own matchers to Jest. + */ + extend(obj: ExpectExtendMap): void; + /** + * Adds a module to format application-specific data structures for serialization. + */ + addSnapshotSerializer(serializer: SnapshotSerializerPlugin): void; + /** + * Matches any object that recursively matches the provided keys. + * This is often handy in conjunction with other asymmetric matchers. + */ + objectContaining(obj: {}): any; + /** + * Matches any string that contains the exact provided string + */ + stringMatching(str: string | RegExp): any; + /** + * Matches any received string that contains the exact expected string + */ + stringContaining(str: string): any; + + not: InverseAsymmetricMatchers; + } + + interface Matchers { + /** + * Ensures the last call to a mock function was provided specific args. + */ + lastCalledWith(...args: any[]): R; + /** + * Ensure that the last call to a mock function has returned a specified value. + */ + lastReturnedWith(value: any): R; + /** + * If you know how to test something, `.not` lets you test its opposite. + */ + not: Matchers; + /** + * Ensure that a mock function is called with specific arguments on an Nth call. + */ + nthCalledWith(nthCall: number, ...params: any[]): R; + /** + * Ensure that the nth call to a mock function has returned a specified value. + */ + nthReturnedWith(n: number, value: any): R; + /** + * Use resolves to unwrap the value of a fulfilled promise so any other + * matcher can be chained. If the promise is rejected the assertion fails. + */ + resolves: Matchers>; + /** + * Unwraps the reason of a rejected promise so any other matcher can be chained. + * If the promise is fulfilled the assertion fails. + */ + rejects: Matchers>; + /** + * Checks that a value is what you expect. It uses `===` to check strict equality. + * Don't use `toBe` with floating-point numbers. + */ + toBe(expected: any): R; + /** + * Ensures that a mock function is called. + */ + toBeCalled(): R; + /** + * Ensures that a mock function is called an exact number of times. + */ + toBeCalledTimes(expected: number): R; + /** + * Ensure that a mock function is called with specific arguments. + */ + toBeCalledWith(...args: any[]): R; + /** + * Using exact equality with floating point numbers is a bad idea. + * Rounding means that intuitive things fail. + * The default for numDigits is 2. + */ + toBeCloseTo(expected: number, numDigits?: number): R; + /** + * Ensure that a variable is not undefined. + */ + toBeDefined(): R; + /** + * When you don't care what a value is, you just want to + * ensure a value is false in a boolean context. + */ + toBeFalsy(): R; + /** + * For comparing floating point numbers. + */ + toBeGreaterThan(expected: number): R; + /** + * For comparing floating point numbers. + */ + toBeGreaterThanOrEqual(expected: number): R; + /** + * Ensure that an object is an instance of a class. + * This matcher uses `instanceof` underneath. + */ + toBeInstanceOf(expected: any): R; + /** + * For comparing floating point numbers. + */ + toBeLessThan(expected: number): R; + /** + * For comparing floating point numbers. + */ + toBeLessThanOrEqual(expected: number): R; + /** + * This is the same as `.toBe(null)` but the error messages are a bit nicer. + * So use `.toBeNull()` when you want to check that something is null. + */ + toBeNull(): R; + /** + * Use when you don't care what a value is, you just want to ensure a value + * is true in a boolean context. In JavaScript, there are six falsy values: + * `false`, `0`, `''`, `null`, `undefined`, and `NaN`. Everything else is truthy. + */ + toBeTruthy(): R; + /** + * Used to check that a variable is undefined. + */ + toBeUndefined(): R; + /** + * Used to check that a variable is NaN. + */ + toBeNaN(): R; + /** + * Used when you want to check that an item is in a list. + * For testing the items in the list, this uses `===`, a strict equality check. + */ + toContain(expected: any): R; + /** + * Used when you want to check that an item is in a list. + * For testing the items in the list, this matcher recursively checks the + * equality of all fields, rather than checking for object identity. + */ + toContainEqual(expected: any): R; + /** + * Used when you want to check that two objects have the same value. + * This matcher recursively checks the equality of all fields, rather than checking for object identity. + */ + toEqual(expected: any): R; + /** + * Ensures that a mock function is called. + */ + toHaveBeenCalled(): R; + /** + * Ensures that a mock function is called an exact number of times. + */ + toHaveBeenCalledTimes(expected: number): R; + /** + * Ensure that a mock function is called with specific arguments. + */ + toHaveBeenCalledWith(...params: any[]): R; + /** + * Ensure that a mock function is called with specific arguments on an Nth call. + */ + toHaveBeenNthCalledWith(nthCall: number, ...params: any[]): R; + /** + * If you have a mock function, you can use `.toHaveBeenLastCalledWith` + * to test what arguments it was last called with. + */ + toHaveBeenLastCalledWith(...params: any[]): R; + /** + * Use to test the specific value that a mock function last returned. + * If the last call to the mock function threw an error, then this matcher will fail + * no matter what value you provided as the expected return value. + */ + toHaveLastReturnedWith(expected: any): R; + /** + * Used to check that an object has a `.length` property + * and it is set to a certain numeric value. + */ + toHaveLength(expected: number): R; + /** + * Use to test the specific value that a mock function returned for the nth call. + * If the nth call to the mock function threw an error, then this matcher will fail + * no matter what value you provided as the expected return value. + */ + toHaveNthReturnedWith(nthCall: number, expected: any): R; + /** + * Use to check if property at provided reference keyPath exists for an object. + * For checking deeply nested properties in an object you may use dot notation or an array containing + * the keyPath for deep references. + * + * Optionally, you can provide a value to check if it's equal to the value present at keyPath + * on the target object. This matcher uses 'deep equality' (like `toEqual()`) and recursively checks + * the equality of all fields. + * + * @example + * + * expect(houseForSale).toHaveProperty('kitchen.area', 20); + */ + toHaveProperty(propertyPath: string | any[], value?: any): R; + /** + * Use to test that the mock function successfully returned (i.e., did not throw an error) at least one time + */ + toHaveReturned(): R; + /** + * Use to ensure that a mock function returned successfully (i.e., did not throw an error) an exact number of times. + * Any calls to the mock function that throw an error are not counted toward the number of times the function returned. + */ + toHaveReturnedTimes(expected: number): R; + /** + * Use to ensure that a mock function returned a specific value. + */ + toHaveReturnedWith(expected: any): R; + /** + * Check that a string matches a regular expression. + */ + toMatch(expected: string | RegExp): R; + /** + * Used to check that a JavaScript object matches a subset of the properties of an object + * + * Optionally, you can provide an object to use as Generic type for the expected value. + * This ensures that the matching object matches the structure of the provided object-like type. + * + * @example + * + * type House = { + * bath: boolean; + * bedrooms: number; + * kitchen: { + * amenities: string[]; + * area: number; + * wallColor: string; + * } + * }; + * + * expect(desiredHouse).toMatchObject(...standardHouse, kitchen: {area: 20}) // wherein standardHouse is some base object of type House + */ + toMatchObject(expected: E): R; + /** + * This ensures that a value matches the most recent snapshot with property matchers. + * Check out [the Snapshot Testing guide](http://facebook.github.io/jest/docs/snapshot-testing.html) for more information. + */ + toMatchSnapshot(propertyMatchers: Partial, snapshotName?: string): R; + /** + * This ensures that a value matches the most recent snapshot. + * Check out [the Snapshot Testing guide](http://facebook.github.io/jest/docs/snapshot-testing.html) for more information. + */ + toMatchSnapshot(snapshotName?: string): R; + /** + * This ensures that a value matches the most recent snapshot with property matchers. + * Instead of writing the snapshot value to a .snap file, it will be written into the source code automatically. + * Check out [the Snapshot Testing guide](http://facebook.github.io/jest/docs/snapshot-testing.html) for more information. + */ + toMatchInlineSnapshot(propertyMatchers: Partial, snapshot?: string): R; + /** + * This ensures that a value matches the most recent snapshot with property matchers. + * Instead of writing the snapshot value to a .snap file, it will be written into the source code automatically. + * Check out [the Snapshot Testing guide](http://facebook.github.io/jest/docs/snapshot-testing.html) for more information. + */ + toMatchInlineSnapshot(snapshot?: string): R; + /** + * Ensure that a mock function has returned (as opposed to thrown) at least once. + */ + toReturn(): R; + /** + * Ensure that a mock function has returned (as opposed to thrown) a specified number of times. + */ + toReturnTimes(count: number): R; + /** + * Ensure that a mock function has returned a specified value at least once. + */ + toReturnWith(value: any): R; + /** + * Use to test that objects have the same types as well as structure. + */ + toStrictEqual(expected: {}): R; + /** + * Used to test that a function throws when it is called. + */ + toThrow(error?: string | Constructable | RegExp | Error): R; + /** + * If you want to test that a specific error is thrown inside a function. + */ + toThrowError(error?: string | Constructable | RegExp | Error): R; + /** + * Used to test that a function throws a error matching the most recent snapshot when it is called. + */ + toThrowErrorMatchingSnapshot(): R; + /** + * Used to test that a function throws a error matching the most recent snapshot when it is called. + * Instead of writing the snapshot value to a .snap file, it will be written into the source code automatically. + */ + toThrowErrorMatchingInlineSnapshot(snapshot?: string): R; + } + + interface Constructable { + new (...args: any[]): any; + } + + interface Mock extends Function, MockInstance { + new (...args: Y): T; + (...args: Y): T; + } + + interface SpyInstance extends MockInstance {} + + /** + * Wrap module with mock definitions + * + * @example + * + * jest.mock("../api"); + * import { Api } from "../api"; + * + * const myApi: jest.Mocked = new Api() as any; + * myApi.myApiMethod.mockImplementation(() => "test"); + */ + type Mocked = { + [P in keyof T]: T[P] extends (...args: any[]) => any ? MockInstance, ArgsType>: T[P]; + } & T; + + interface MockInstance { + /** Returns the mock name string set by calling `mockFn.mockName(value)`. */ + getMockName(): string; + /** Provides access to the mock's metadata */ + mock: MockContext; + /** + * Resets all information stored in the mockFn.mock.calls and mockFn.mock.instances arrays. + * + * Often this is useful when you want to clean up a mock's usage data between two assertions. + * + * Beware that `mockClear` will replace `mockFn.mock`, not just `mockFn.mock.calls` and `mockFn.mock.instances`. + * You should therefore avoid assigning mockFn.mock to other variables, temporary or not, to make sure you + * don't access stale data. + */ + mockClear(): void; + /** + * Resets all information stored in the mock, including any initial implementation and mock name given. + * + * This is useful when you want to completely restore a mock back to its initial state. + * + * Beware that `mockReset` will replace `mockFn.mock`, not just `mockFn.mock.calls` and `mockFn.mock.instances`. + * You should therefore avoid assigning mockFn.mock to other variables, temporary or not, to make sure you + * don't access stale data. + */ + mockReset(): void; + /** + * Does everything that `mockFn.mockReset()` does, and also restores the original (non-mocked) implementation. + * + * This is useful when you want to mock functions in certain test cases and restore the original implementation in others. + * + * Beware that `mockFn.mockRestore` only works when mock was created with `jest.spyOn`. Thus you have to take care of restoration + * yourself when manually assigning `jest.fn()`. + * + * The [`restoreMocks`](https://jestjs.io/docs/en/configuration.html#restoremocks-boolean) configuration option is available + * to restore mocks automatically between tests. + */ + mockRestore(): void; + /** + * Accepts a function that should be used as the implementation of the mock. The mock itself will still record + * all calls that go into and instances that come from itself – the only difference is that the implementation + * will also be executed when the mock is called. + * + * Note: `jest.fn(implementation)` is a shorthand for `jest.fn().mockImplementation(implementation)`. + */ + mockImplementation(fn?: (...args: Y) => T): this; + /** + * Accepts a function that will be used as an implementation of the mock for one call to the mocked function. + * Can be chained so that multiple function calls produce different results. + * + * @example + * + * const myMockFn = jest + * .fn() + * .mockImplementationOnce(cb => cb(null, true)) + * .mockImplementationOnce(cb => cb(null, false)); + * + * myMockFn((err, val) => console.log(val)); // true + * + * myMockFn((err, val) => console.log(val)); // false + */ + mockImplementationOnce(fn: (...args: Y) => T): this; + /** Sets the name of the mock`. */ + mockName(name: string): this; + /** + * Just a simple sugar function for: + * + * @example + * + * jest.fn(function() { + * return this; + * }); + */ + mockReturnThis(): this; + /** + * Accepts a value that will be returned whenever the mock function is called. + * + * @example + * + * const mock = jest.fn(); + * mock.mockReturnValue(42); + * mock(); // 42 + * mock.mockReturnValue(43); + * mock(); // 43 + */ + mockReturnValue(value: T): this; + /** + * Accepts a value that will be returned for one call to the mock function. Can be chained so that + * successive calls to the mock function return different values. When there are no more + * `mockReturnValueOnce` values to use, calls will return a value specified by `mockReturnValue`. + * + * @example + * + * const myMockFn = jest.fn() + * .mockReturnValue('default') + * .mockReturnValueOnce('first call') + * .mockReturnValueOnce('second call'); + * + * // 'first call', 'second call', 'default', 'default' + * console.log(myMockFn(), myMockFn(), myMockFn(), myMockFn()); + * + */ + mockReturnValueOnce(value: T): this; + /** + * Simple sugar function for: `jest.fn().mockImplementation(() => Promise.resolve(value));` + */ + mockResolvedValue(value: ResolvedValue): this; + /** + * Simple sugar function for: `jest.fn().mockImplementationOnce(() => Promise.resolve(value));` + * + * @example + * + * test('async test', async () => { + * const asyncMock = jest + * .fn() + * .mockResolvedValue('default') + * .mockResolvedValueOnce('first call') + * .mockResolvedValueOnce('second call'); + * + * await asyncMock(); // first call + * await asyncMock(); // second call + * await asyncMock(); // default + * await asyncMock(); // default + * }); + * + */ + mockResolvedValueOnce(value: ResolvedValue): this; + /** + * Simple sugar function for: `jest.fn().mockImplementation(() => Promise.reject(value));` + * + * @example + * + * test('async test', async () => { + * const asyncMock = jest.fn().mockRejectedValue(new Error('Async error')); + * + * await asyncMock(); // throws "Async error" + * }); + */ + mockRejectedValue(value: RejectedValue): this; + + /** + * Simple sugar function for: `jest.fn().mockImplementationOnce(() => Promise.reject(value));` + * + * @example + * + * test('async test', async () => { + * const asyncMock = jest + * .fn() + * .mockResolvedValueOnce('first call') + * .mockRejectedValueOnce(new Error('Async error')); + * + * await asyncMock(); // first call + * await asyncMock(); // throws "Async error" + * }); + * + */ + mockRejectedValueOnce(value: RejectedValue): this; + } + + /** + * Represents the result of a single call to a mock function with a return value. + */ + interface MockResultReturn { + type: 'return'; + value: T; + } + /** + * Represents the result of a single incomplete call to a mock function. + */ + interface MockResultIncomplete { + type: 'incomplete'; + value: undefined; + } + /** + * Represents the result of a single call to a mock function with a thrown error. + */ + interface MockResultThrow { + type: 'throw'; + value: any; + } + + type MockResult = MockResultReturn | MockResultThrow | MockResultIncomplete; + + interface MockContext { + calls: Y[]; + instances: T[]; + invocationCallOrder: number[]; + /** + * List of results of calls to the mock function. + */ + results: Array>; + } +} + +// Jest ships with a copy of Jasmine. They monkey-patch its APIs and divergence/deprecation are expected. +// Relevant parts of Jasmine's API are below so they can be changed and removed over time. +// This file can't reference jasmine.d.ts since the globals aren't compatible. + +declare function spyOn(object: T, method: keyof T): jasmine.Spy; +/** + * If you call the function pending anywhere in the spec body, + * no matter the expectations, the spec will be marked pending. + */ +declare function pending(reason?: string): void; +/** + * Fails a test when called within one. + */ +declare function fail(error?: any): never; +declare namespace jasmine { + let DEFAULT_TIMEOUT_INTERVAL: number; + function clock(): Clock; + function any(aclass: any): Any; + function anything(): Any; + function arrayContaining(sample: any[]): ArrayContaining; + function objectContaining(sample: any): ObjectContaining; + function createSpy(name?: string, originalFn?: (...args: any[]) => any): Spy; + function createSpyObj(baseName: string, methodNames: any[]): any; + function createSpyObj(baseName: string, methodNames: any[]): T; + function pp(value: any): string; + function addCustomEqualityTester(equalityTester: CustomEqualityTester): void; + function addMatchers(matchers: CustomMatcherFactories): void; + function stringMatching(value: string | RegExp): Any; + + interface Clock { + install(): void; + uninstall(): void; + /** + * Calls to any registered callback are triggered when the clock isticked forward + * via the jasmine.clock().tick function, which takes a number of milliseconds. + */ + tick(ms: number): void; + mockDate(date?: Date): void; + } + + interface Any { + new (expectedClass: any): any; + jasmineMatches(other: any): boolean; + jasmineToString(): string; + } + + interface ArrayContaining { + new (sample: any[]): any; + asymmetricMatch(other: any): boolean; + jasmineToString(): string; + } + + interface ObjectContaining { + new (sample: any): any; + jasmineMatches(other: any, mismatchKeys: any[], mismatchValues: any[]): boolean; + jasmineToString(): string; + } + + interface Spy { + (...params: any[]): any; + identity: string; + and: SpyAnd; + calls: Calls; + mostRecentCall: { args: any[]; }; + argsForCall: any[]; + wasCalled: boolean; + } + + interface SpyAnd { + /** + * By chaining the spy with and.callThrough, the spy will still track all + * calls to it but in addition it will delegate to the actual implementation. + */ + callThrough(): Spy; + /** + * By chaining the spy with and.returnValue, all calls to the function + * will return a specific value. + */ + returnValue(val: any): Spy; + /** + * By chaining the spy with and.returnValues, all calls to the function + * will return specific values in order until it reaches the end of the return values list. + */ + returnValues(...values: any[]): Spy; + /** + * By chaining the spy with and.callFake, all calls to the spy + * will delegate to the supplied function. + */ + callFake(fn: (...args: any[]) => any): Spy; + /** + * By chaining the spy with and.throwError, all calls to the spy + * will throw the specified value. + */ + throwError(msg: string): Spy; + /** + * When a calling strategy is used for a spy, the original stubbing + * behavior can be returned at any time with and.stub. + */ + stub(): Spy; + } + + interface Calls { + /** + * By chaining the spy with calls.any(), + * will return false if the spy has not been called at all, + * and then true once at least one call happens. + */ + any(): boolean; + /** + * By chaining the spy with calls.count(), + * will return the number of times the spy was called + */ + count(): number; + /** + * By chaining the spy with calls.argsFor(), + * will return the arguments passed to call number index + */ + argsFor(index: number): any[]; + /** + * By chaining the spy with calls.allArgs(), + * will return the arguments to all calls + */ + allArgs(): any[]; + /** + * By chaining the spy with calls.all(), will return the + * context (the this) and arguments passed all calls + */ + all(): CallInfo[]; + /** + * By chaining the spy with calls.mostRecent(), will return the + * context (the this) and arguments for the most recent call + */ + mostRecent(): CallInfo; + /** + * By chaining the spy with calls.first(), will return the + * context (the this) and arguments for the first call + */ + first(): CallInfo; + /** + * By chaining the spy with calls.reset(), will clears all tracking for a spy + */ + reset(): void; + } + + interface CallInfo { + /** + * The context (the this) for the call + */ + object: any; + /** + * All arguments passed to the call + */ + args: any[]; + /** + * The return value of the call + */ + returnValue: any; + } + + interface CustomMatcherFactories { + [index: string]: CustomMatcherFactory; + } + + type CustomMatcherFactory = (util: MatchersUtil, customEqualityTesters: CustomEqualityTester[]) => CustomMatcher; + + interface MatchersUtil { + equals(a: any, b: any, customTesters?: CustomEqualityTester[]): boolean; + contains(haystack: ArrayLike | string, needle: any, customTesters?: CustomEqualityTester[]): boolean; + buildFailureMessage(matcherName: string, isNot: boolean, actual: any, ...expected: any[]): string; + } + + type CustomEqualityTester = (first: any, second: any) => boolean; + + interface CustomMatcher { + compare(actual: T, expected: T, ...args: any[]): CustomMatcherResult; + compare(actual: any, ...expected: any[]): CustomMatcherResult; + } + + interface CustomMatcherResult { + pass: boolean; + message: string | (() => string); + } + + interface ArrayLike { + length: number; + [n: number]: T; + } +} + +declare namespace jest { + // types for implementing custom interfaces, from https://github.com/facebook/jest/tree/dd6c5c4/types + + // https://facebook.github.io/jest/docs/en/configuration.html#transform-object-string-string + // const transformer: Transformer; + + // https://facebook.github.io/jest/docs/en/configuration.html#reporters-array-modulename-modulename-options + // const reporter: Reporter; + + // https://facebook.github.io/jest/docs/en/configuration.html#testrunner-string + // const testRunner: TestFramework; + + // https://facebook.github.io/jest/docs/en/configuration.html#testresultsprocessor-string + // const testResultsProcessor: TestResultsProcessor; + + // leave above declarations for referening type-dependencies + // .vscode/settings.json: "typescript.referencesCodeLens.enabled": true + + // custom + + // flow's Maybe type https://flow.org/en/docs/types/primitives/#toc-maybe-types + type Maybe = void | null | undefined | T; // tslint:disable-line:void-return + + type TestResultsProcessor = (testResult: AggregatedResult) => AggregatedResult; + + type HasteResolver = any; // import HasteResolver from 'jest-resolve'; + type ModuleMocker = any; // import { ModuleMocker } from 'jest-mock'; + type ModuleMap = any; // import {ModuleMap} from 'jest-haste-map'; + type HasteFS = any; // import {FS as HasteFS} from 'jest-haste-map'; + type Runtime = any; // import Runtime from 'jest-runtime'; + type Script = any; // import {Script} from 'vm'; + + // Config + + type Path = string; + type Glob = string; + + interface HasteConfig { + defaultPlatform?: Maybe; + hasteImplModulePath?: string; + platforms?: string[]; + providesModuleNodeModules: string[]; + } + + type ReporterConfig = [string, object]; + + type ConfigGlobals = object; + + type SnapshotUpdateState = 'all' | 'new' | 'none'; + + interface DefaultOptions { + automock: boolean; + bail: boolean; + browser: boolean; + cache: boolean; + cacheDirectory: Path; + changedFilesWithAncestor: boolean; + clearMocks: boolean; + collectCoverage: boolean; + collectCoverageFrom: Maybe; + coverageDirectory: Maybe; + coveragePathIgnorePatterns: string[]; + coverageReporters: string[]; + coverageThreshold: Maybe<{global: {[key: string]: number}}>; + errorOnDeprecated: boolean; + expand: boolean; + filter: Maybe; + forceCoverageMatch: Glob[]; + globals: ConfigGlobals; + globalSetup: Maybe; + globalTeardown: Maybe; + haste: HasteConfig; + detectLeaks: boolean; + detectOpenHandles: boolean; + moduleDirectories: string[]; + moduleFileExtensions: string[]; + moduleNameMapper: {[key: string]: string}; + modulePathIgnorePatterns: string[]; + noStackTrace: boolean; + notify: boolean; + notifyMode: string; + preset: Maybe; + projects: Maybe>; + resetMocks: boolean; + resetModules: boolean; + resolver: Maybe; + restoreMocks: boolean; + rootDir: Maybe; + roots: Maybe; + runner: string; + runTestsByPath: boolean; + setupFiles: Path[]; + setupTestFrameworkScriptFile: Maybe; + skipFilter: boolean; + snapshotSerializers: Path[]; + testEnvironment: string; + testEnvironmentOptions: object; + testFailureExitCode: string | number; + testLocationInResults: boolean; + testMatch: Glob[]; + testPathIgnorePatterns: string[]; + testRegex: string; + testResultsProcessor: Maybe; + testRunner: Maybe; + testURL: string; + timers: 'real' | 'fake'; + transform: Maybe<{[key: string]: string}>; + transformIgnorePatterns: Glob[]; + watchPathIgnorePatterns: string[]; + useStderr: boolean; + verbose: Maybe; + watch: boolean; + watchman: boolean; + } + + interface InitialOptions { + automock?: boolean; + bail?: boolean; + browser?: boolean; + cache?: boolean; + cacheDirectory?: Path; + clearMocks?: boolean; + changedFilesWithAncestor?: boolean; + changedSince?: string; + collectCoverage?: boolean; + collectCoverageFrom?: Glob[]; + collectCoverageOnlyFrom?: {[key: string]: boolean}; + coverageDirectory?: string; + coveragePathIgnorePatterns?: string[]; + coverageReporters?: string[]; + coverageThreshold?: {global: {[key: string]: number}}; + detectLeaks?: boolean; + detectOpenHandles?: boolean; + displayName?: string; + expand?: boolean; + filter?: Path; + findRelatedTests?: boolean; + forceCoverageMatch?: Glob[]; + forceExit?: boolean; + json?: boolean; + globals?: ConfigGlobals; + globalSetup?: Maybe; + globalTeardown?: Maybe; + haste?: HasteConfig; + reporters?: Array; + logHeapUsage?: boolean; + lastCommit?: boolean; + listTests?: boolean; + mapCoverage?: boolean; + moduleDirectories?: string[]; + moduleFileExtensions?: string[]; + moduleLoader?: Path; + moduleNameMapper?: {[key: string]: string}; + modulePathIgnorePatterns?: string[]; + modulePaths?: string[]; + name?: string; + noStackTrace?: boolean; + notify?: boolean; + notifyMode?: string; + onlyChanged?: boolean; + outputFile?: Path; + passWithNoTests?: boolean; + preprocessorIgnorePatterns?: Glob[]; + preset?: Maybe; + projects?: Glob[]; + replname?: Maybe; + resetMocks?: boolean; + resetModules?: boolean; + resolver?: Maybe; + restoreMocks?: boolean; + rootDir?: Path; + roots?: Path[]; + runner?: string; + runTestsByPath?: boolean; + scriptPreprocessor?: string; + setupFiles?: Path[]; + setupFilesAfterEnv?: Path[]; + setupTestFrameworkScriptFile?: Path; + silent?: boolean; + skipFilter?: boolean; + skipNodeResolution?: boolean; + snapshotSerializers?: Path[]; + errorOnDeprecated?: boolean; + testEnvironment?: string; + testEnvironmentOptions?: object; + testFailureExitCode?: string | number; + testLocationInResults?: boolean; + testMatch?: Glob[]; + testNamePattern?: string; + testPathDirs?: Path[]; + testPathIgnorePatterns?: string[]; + testRegex?: string; + testResultsProcessor?: Maybe; + testRunner?: string; + testURL?: string; + timers?: 'real' | 'fake'; + transform?: {[key: string]: string}; + transformIgnorePatterns?: Glob[]; + watchPathIgnorePatterns?: string[]; + unmockedModulePathPatterns?: string[]; + updateSnapshot?: boolean; + useStderr?: boolean; + verbose?: Maybe; + watch?: boolean; + watchAll?: boolean; + watchman?: boolean; + watchPlugins?: string[]; + } + + interface GlobalConfig { + bail: boolean; + collectCoverage: boolean; + collectCoverageFrom: Glob[]; + collectCoverageOnlyFrom: Maybe<{[key: string]: boolean}>; + coverageDirectory: string; + coverageReporters: string[]; + coverageThreshold: {global: {[key: string]: number}}; + expand: boolean; + forceExit: boolean; + logHeapUsage: boolean; + mapCoverage: boolean; + noStackTrace: boolean; + notify: boolean; + projects: Glob[]; + replname: Maybe; + reporters: ReporterConfig[]; + rootDir: Path; + silent: boolean; + testNamePattern: string; + testPathPattern: string; + testResultsProcessor: Maybe; + updateSnapshot: SnapshotUpdateState; + useStderr: boolean; + verbose: Maybe; + watch: boolean; + watchman: boolean; + } + + interface ProjectConfig { + automock: boolean; + browser: boolean; + cache: boolean; + cacheDirectory: Path; + clearMocks: boolean; + coveragePathIgnorePatterns: string[]; + cwd: Path; + detectLeaks: boolean; + displayName: Maybe; + forceCoverageMatch: Glob[]; + globals: ConfigGlobals; + haste: HasteConfig; + moduleDirectories: string[]; + moduleFileExtensions: string[]; + moduleLoader: Path; + moduleNameMapper: Array<[string, string]>; + modulePathIgnorePatterns: string[]; + modulePaths: string[]; + name: string; + resetMocks: boolean; + resetModules: boolean; + resolver: Maybe; + rootDir: Path; + roots: Path[]; + runner: string; + setupFiles: Path[]; + setupTestFrameworkScriptFile: Path; + skipNodeResolution: boolean; + snapshotSerializers: Path[]; + testEnvironment: string; + testEnvironmentOptions: object; + testLocationInResults: boolean; + testMatch: Glob[]; + testPathIgnorePatterns: string[]; + testRegex: string; + testRunner: string; + testURL: string; + timers: 'real' | 'fake'; + transform: Array<[string, Path]>; + transformIgnorePatterns: Glob[]; + unmockedModulePathPatterns: Maybe; + watchPathIgnorePatterns: string[]; + } + + // Console + + type LogMessage = string; + interface LogEntry { + message: LogMessage; + origin: string; + type: LogType; + } + type LogType = 'log' | 'info' | 'warn' | 'error'; + type ConsoleBuffer = LogEntry[]; + + // Context + + interface Context { + config: ProjectConfig; + hasteFS: HasteFS; + moduleMap: ModuleMap; + resolver: HasteResolver; + } + + // Environment + + interface FakeTimers { + clearAllTimers(): void; + runAllImmediates(): void; + runAllTicks(): void; + runAllTimers(): void; + runTimersToTime(msToRun: number): void; + advanceTimersByTime(msToRun: number): void; + runOnlyPendingTimers(): void; + runWithRealTimers(callback: any): void; + useFakeTimers(): void; + useRealTimers(): void; + } + + interface $JestEnvironment { + global: Global; + fakeTimers: FakeTimers; + testFilePath: string; + moduleMocker: ModuleMocker; + + dispose(): void; + runScript(script: Script): any; + } + + type Environment = $JestEnvironment; + + // Global + + type Global = object; + + // Reporter + + interface ReporterOnStartOptions { + estimatedTime: number; + showStatus: boolean; + } + + // TestResult + + interface RawFileCoverage { + path: string; + s: {[statementId: number]: number}; + b: {[branchId: number]: number}; + f: {[functionId: number]: number}; + l: {[lineId: number]: number}; + fnMap: {[functionId: number]: any}; + statementMap: {[statementId: number]: any}; + branchMap: {[branchId: number]: any}; + inputSourceMap?: object; + } + + interface RawCoverage { + [filePath: string]: RawFileCoverage; + } + + interface FileCoverageTotal { + total: number; + covered: number; + skipped: number; + pct?: number; + } + + interface CoverageSummary { + lines: FileCoverageTotal; + statements: FileCoverageTotal; + branches: FileCoverageTotal; + functions: FileCoverageTotal; + } + + interface FileCoverage { + getLineCoverage(): object; + getUncoveredLines(): number[]; + getBranchCoverageByLine(): object; + toJSON(): object; + merge(other: object): void; + computeSimpleTotals(property: string): FileCoverageTotal; + computeBranchTotals(): FileCoverageTotal; + resetHits(): void; + toSummary(): CoverageSummary; + } + + interface CoverageMap { + merge(data: object): void; + getCoverageSummary(): FileCoverage; + data: RawCoverage; + addFileCoverage(fileCoverage: RawFileCoverage): void; + files(): string[]; + fileCoverageFor(file: string): FileCoverage; + } + + interface SerializableError { + code?: any; + message: string; + stack: Maybe; + type?: string; + } + + type Status = 'passed' | 'failed' | 'skipped' | 'pending'; + + type Bytes = number; + type Milliseconds = number; + + interface AssertionResult { + ancestorTitles: string[]; + duration?: Maybe; + failureMessages: string[]; + fullName: string; + numPassingAsserts: number; + status: Status; + title: string; + } + + interface AggregatedResult { + coverageMap?: Maybe; + numFailedTests: number; + numFailedTestSuites: number; + numPassedTests: number; + numPassedTestSuites: number; + numPendingTests: number; + numPendingTestSuites: number; + numRuntimeErrorTestSuites: number; + numTodoTests: number; + numTotalTests: number; + numTotalTestSuites: number; + snapshot: SnapshotSummary; + startTime: number; + success: boolean; + testResults: TestResult[]; + wasInterrupted: boolean; + } + + interface TestResult { + console: Maybe; + coverage?: RawCoverage; + memoryUsage?: Bytes; + failureMessage: Maybe; + numFailingTests: number; + numPassingTests: number; + numPendingTests: number; + perfStats: { + end: Milliseconds, + start: Milliseconds, + }; + skipped: boolean; + snapshot: { + added: number, + fileDeleted: boolean, + matched: number, + unchecked: number, + unmatched: number, + updated: number, + }; + sourceMaps: {[sourcePath: string]: string}; + testExecError?: SerializableError; + testFilePath: string; + testResults: AssertionResult[]; + } + + interface SnapshotSummary { + added: number; + didUpdate: boolean; + failure: boolean; + filesAdded: number; + filesRemoved: number; + filesUnmatched: number; + filesUpdated: number; + matched: number; + total: number; + unchecked: number; + unmatched: number; + updated: number; + } + + // TestRunner + + interface Test { + context: Context; + duration?: number; + path: Path; + } + + // tslint:disable-next-line:no-empty-interface + interface Set {} // To allow non-ES6 users the Set below + interface Reporter { + onTestResult?(test: Test, testResult: TestResult, aggregatedResult: AggregatedResult): void; + onRunStart?(results: AggregatedResult, options: ReporterOnStartOptions): void; + onTestStart?(test: Test): void; + onRunComplete?(contexts: Set, results: AggregatedResult): Maybe>; + getLastError?(): Maybe; + } + + type TestFramework = ( + globalConfig: GlobalConfig, + config: ProjectConfig, + environment: Environment, + runtime: Runtime, + testPath: string, + ) => Promise; + + // Transform + + interface TransformedSource { + code: string; + map: Maybe; + } + + interface TransformOptions { + instrument: boolean; + } + + interface Transformer { + canInstrument?: boolean; + createTransformer?(options: any): Transformer; + + getCacheKey?( + fileData: string, + filePath: Path, + configStr: string, + options: TransformOptions, + ): string; + + process( + sourceText: string, + sourcePath: Path, + config: ProjectConfig, + options?: TransformOptions, + ): string | TransformedSource; + } +} diff --git a/node_modules/@types/jest/package.json b/node_modules/@types/jest/package.json new file mode 100644 index 00000000..ec831fe9 --- /dev/null +++ b/node_modules/@types/jest/package.json @@ -0,0 +1,125 @@ +{ + "name": "@types/jest", + "version": "24.0.15", + "description": "TypeScript definitions for Jest", + "license": "MIT", + "contributors": [ + { + "name": "Asana (https://asana.com)\n// Ivo Stratev", + "url": "https://github.com/NoHomey", + "githubUsername": "NoHomey" + }, + { + "name": "jwbay", + "url": "https://github.com/jwbay", + "githubUsername": "jwbay" + }, + { + "name": "Alexey Svetliakov", + "url": "https://github.com/asvetliakov", + "githubUsername": "asvetliakov" + }, + { + "name": "Alex Jover Morales", + "url": "https://github.com/alexjoverm", + "githubUsername": "alexjoverm" + }, + { + "name": "Allan Lukwago", + "url": "https://github.com/epicallan", + "githubUsername": "epicallan" + }, + { + "name": "Ika", + "url": "https://github.com/ikatyang", + "githubUsername": "ikatyang" + }, + { + "name": "Waseem Dahman", + "url": "https://github.com/wsmd", + "githubUsername": "wsmd" + }, + { + "name": "Jamie Mason", + "url": "https://github.com/JamieMason", + "githubUsername": "JamieMason" + }, + { + "name": "Douglas Duteil", + "url": "https://github.com/douglasduteil", + "githubUsername": "douglasduteil" + }, + { + "name": "Ahn", + "url": "https://github.com/ahnpnl", + "githubUsername": "ahnpnl" + }, + { + "name": "Josh Goldberg", + "url": "https://github.com/joshuakgoldberg", + "githubUsername": "joshuakgoldberg" + }, + { + "name": "Jeff Lau", + "url": "https://github.com/UselessPickles", + "githubUsername": "UselessPickles" + }, + { + "name": "Andrew Makarov", + "url": "https://github.com/r3nya", + "githubUsername": "r3nya" + }, + { + "name": "Martin Hochel", + "url": "https://github.com/hotell", + "githubUsername": "hotell" + }, + { + "name": "Sebastian Sebald", + "url": "https://github.com/sebald", + "githubUsername": "sebald" + }, + { + "name": "Andy", + "url": "https://github.com/andys8", + "githubUsername": "andys8" + }, + { + "name": "Antoine Brault", + "url": "https://github.com/antoinebrault", + "githubUsername": "antoinebrault" + }, + { + "name": "Jeroen Claassens", + "url": "https://github.com/favna", + "githubUsername": "favna" + }, + { + "name": "Gregor Stamać", + "url": "https://github.com/gstamac", + "githubUsername": "gstamac" + }, + { + "name": "ExE Boss", + "url": "https://github.com/ExE-Boss", + "githubUsername": "ExE-Boss" + } + ], + "main": "", + "types": "index", + "repository": { + "type": "git", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", + "directory": "types/jest" + }, + "scripts": {}, + "dependencies": { + "@types/jest-diff": "*" + }, + "typesPublisherContentHash": "cac349662faf97b0b34c42324afbb9a9b5972d64215a0892229785c315a2f836", + "typeScriptVersion": "3.0" + +,"_resolved": "https://registry.npmjs.org/@types/jest/-/jest-24.0.15.tgz" +,"_integrity": "sha512-MU1HIvWUme74stAoc3mgAi+aMlgKOudgEvQDIm1v4RkrDudBh1T+NFp5sftpBAdXdx1J0PbdpJ+M2EsSOi1djA==" +,"_from": "@types/jest@24.0.15" +} \ No newline at end of file diff --git a/node_modules/@types/normalize-package-data/LICENSE b/node_modules/@types/normalize-package-data/LICENSE new file mode 100755 index 00000000..21071075 --- /dev/null +++ b/node_modules/@types/normalize-package-data/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/node_modules/@types/normalize-package-data/README.md b/node_modules/@types/normalize-package-data/README.md new file mode 100755 index 00000000..e24ae276 --- /dev/null +++ b/node_modules/@types/normalize-package-data/README.md @@ -0,0 +1,16 @@ +# Installation +> `npm install --save @types/normalize-package-data` + +# Summary +This package contains type definitions for normalize-package-data (https://github.com/npm/normalize-package-data#readme). + +# Details +Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/normalize-package-data + +Additional Details + * Last updated: Sun, 07 Jan 2018 07:34:38 GMT + * Dependencies: none + * Global values: none + +# Credits +These definitions were written by Jeff Dickey . diff --git a/node_modules/@types/normalize-package-data/index.d.ts b/node_modules/@types/normalize-package-data/index.d.ts new file mode 100755 index 00000000..fa8186b0 --- /dev/null +++ b/node_modules/@types/normalize-package-data/index.d.ts @@ -0,0 +1,46 @@ +// Type definitions for normalize-package-data 2.4 +// Project: https://github.com/npm/normalize-package-data#readme +// Definitions by: Jeff Dickey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = normalize; + +declare function normalize(data: normalize.Input, warn?: normalize.WarnFn, strict?: boolean): void; +declare function normalize(data: normalize.Input, strict?: boolean): void; + +declare namespace normalize { + type WarnFn = (msg: string) => void; + interface Input {[k: string]: any; } + + interface Person { + name?: string; + email?: string; + url?: string; + } + + interface Package { + [k: string]: any; + name: string; + version: string; + files?: string[]; + bin?: {[k: string]: string }; + man?: string[]; + keywords?: string[]; + author?: Person; + maintainers?: Person[]; + contributors?: Person[]; + bundleDependencies?: {[name: string]: string; }; + dependencies?: {[name: string]: string; }; + devDependencies?: {[name: string]: string; }; + optionalDependencies?: {[name: string]: string; }; + description?: string; + engines?: {[type: string]: string }; + license?: string; + repository?: { type: string, url: string }; + bugs?: { url: string, email?: string } | { url?: string, email: string }; + homepage?: string; + scripts?: {[k: string]: string}; + readme: string; + _id: string; + } +} diff --git a/node_modules/@types/normalize-package-data/package.json b/node_modules/@types/normalize-package-data/package.json new file mode 100755 index 00000000..82b657ae --- /dev/null +++ b/node_modules/@types/normalize-package-data/package.json @@ -0,0 +1,26 @@ +{ + "name": "@types/normalize-package-data", + "version": "2.4.0", + "description": "TypeScript definitions for normalize-package-data", + "license": "MIT", + "contributors": [ + { + "name": "Jeff Dickey", + "url": "https://github.com/jdxcode", + "githubUsername": "jdxcode" + } + ], + "main": "", + "repository": { + "type": "git", + "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" + }, + "scripts": {}, + "dependencies": {}, + "typesPublisherContentHash": "5d2101e9e55c73e1d649a6c311e0d40bdfaa25bb06bb75ea6f3bb0d149c1303b", + "typeScriptVersion": "2.0" + +,"_resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz" +,"_integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==" +,"_from": "@types/normalize-package-data@2.4.0" +} \ No newline at end of file diff --git a/node_modules/@types/semver/LICENSE b/node_modules/@types/semver/LICENSE new file mode 100644 index 00000000..4b1ad51b --- /dev/null +++ b/node_modules/@types/semver/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/node_modules/@types/semver/README.md b/node_modules/@types/semver/README.md new file mode 100644 index 00000000..17d17dc5 --- /dev/null +++ b/node_modules/@types/semver/README.md @@ -0,0 +1,16 @@ +# Installation +> `npm install --save @types/semver` + +# Summary +This package contains type definitions for semver (https://github.com/npm/node-semver). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/semver + +Additional Details + * Last updated: Fri, 21 Jun 2019 00:42:59 GMT + * Dependencies: none + * Global values: none + +# Credits +These definitions were written by Bart van der Schoor , BendingBender , Lucian Buzzo , and Klaus Meinhardt . diff --git a/node_modules/@types/semver/index.d.ts b/node_modules/@types/semver/index.d.ts new file mode 100644 index 00000000..5475b8af --- /dev/null +++ b/node_modules/@types/semver/index.d.ts @@ -0,0 +1,212 @@ +// Type definitions for semver 6.0 +// Project: https://github.com/npm/node-semver +// Definitions by: Bart van der Schoor +// BendingBender +// Lucian Buzzo +// Klaus Meinhardt +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/semver + +export const SEMVER_SPEC_VERSION: "2.0.0"; + +export type ReleaseType = "major" | "premajor" | "minor" | "preminor" | "patch" | "prepatch" | "prerelease"; + +export interface Options { + loose?: boolean; + includePrerelease?: boolean; +} + +/** + * Return the parsed version as a SemVer object, or null if it's not valid. + */ +export function parse(v: string | SemVer, optionsOrLoose?: boolean | Options): SemVer | null; +/** + * Return the parsed version, or null if it's not valid. + */ +export function valid(v: string | SemVer, optionsOrLoose?: boolean | Options): string | null; +/** + * Returns cleaned (removed leading/trailing whitespace, remove '=v' prefix) and parsed version, or null if version is invalid. + */ +export function clean(version: string, optionsOrLoose?: boolean | Options): string | null; +/** + * Return the version incremented by the release type (major, minor, patch, or prerelease), or null if it's not valid. + */ +export function inc(v: string | SemVer, release: ReleaseType, optionsOrLoose?: boolean | Options, identifier?: string): string | null; +/** + * Return the major version number. + */ +export function major(v: string | SemVer, optionsOrLoose?: boolean | Options): number; +/** + * Return the minor version number. + */ +export function minor(v: string | SemVer, optionsOrLoose?: boolean | Options): number; +/** + * Return the patch version number. + */ +export function patch(v: string | SemVer, optionsOrLoose?: boolean | Options): number; +/** + * Returns an array of prerelease components, or null if none exist. + */ +export function prerelease(v: string | SemVer, optionsOrLoose?: boolean | Options): ReadonlyArray | null; + +// Comparison +/** + * v1 > v2 + */ +export function gt(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | Options): boolean; +/** + * v1 >= v2 + */ +export function gte(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | Options): boolean; +/** + * v1 < v2 + */ +export function lt(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | Options): boolean; +/** + * v1 <= v2 + */ +export function lte(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | Options): boolean; +/** + * v1 == v2 This is true if they're logically equivalent, even if they're not the exact same string. You already know how to compare strings. + */ +export function eq(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | Options): boolean; +/** + * v1 != v2 The opposite of eq. + */ +export function neq(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | Options): boolean; + +/** + * Pass in a comparison string, and it'll call the corresponding semver comparison function. + * "===" and "!==" do simple string comparison, but are included for completeness. + * Throws if an invalid comparison string is provided. + */ +export function cmp(v1: string | SemVer, operator: Operator, v2: string | SemVer, optionsOrLoose?: boolean | Options): boolean; +export type Operator = '===' | '!==' | '' | '=' | '==' | '!=' | '>' | '>=' | '<' | '<='; + +/** + * Return 0 if v1 == v2, or 1 if v1 is greater, or -1 if v2 is greater. Sorts in ascending order if passed to Array.sort(). + */ +export function compare(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | Options): 1 | 0 | -1; +/** + * The reverse of compare. Sorts an array of versions in descending order when passed to Array.sort(). + */ +export function rcompare(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | Options): 1 | 0 | -1; + +/** + * Compares two identifiers, must be numeric strings or truthy/falsy values. Sorts in ascending order if passed to Array.sort(). + */ +export function compareIdentifiers(a: string | null, b: string | null): 1 | 0 | -1; +/** + * The reverse of compareIdentifiers. Sorts in descending order when passed to Array.sort(). + */ +export function rcompareIdentifiers(a: string | null, b: string | null): 1 | 0 | -1; + +/** + * Sorts an array of semver entries in ascending order. + */ +export function sort(list: T[], optionsOrLoose?: boolean | Options): T[]; +/** + * Sorts an array of semver entries in descending order. + */ +export function rsort(list: T[], optionsOrLoose?: boolean | Options): T[]; + +/** + * Returns difference between two versions by the release type (major, premajor, minor, preminor, patch, prepatch, or prerelease), or null if the versions are the same. + */ +export function diff(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | Options): ReleaseType | null; + +// Ranges +/** + * Return the valid range or null if it's not valid + */ +export function validRange(range: string | Range, optionsOrLoose?: boolean | Options): string; +/** + * Return true if the version satisfies the range. + */ +export function satisfies(version: string | SemVer, range: string | Range, optionsOrLoose?: boolean | Options): boolean; +/** + * Return the highest version in the list that satisfies the range, or null if none of them do. + */ +export function maxSatisfying(versions: ReadonlyArray, range: string | Range, optionsOrLoose?: boolean | Options): T | null; +/** + * Return the lowest version in the list that satisfies the range, or null if none of them do. + */ +export function minSatisfying(versions: ReadonlyArray, range: string | Range, optionsOrLoose?: boolean | Options): T | null; +/** + * Return the lowest version that can possibly match the given range. + */ +export function minVersion(range: string | Range, optionsOrLoose?: boolean | Options): SemVer | null; +/** + * Return true if version is greater than all the versions possible in the range. + */ +export function gtr(version: string | SemVer, range: string | Range, optionsOrLoose?: boolean | Options): boolean; +/** + * Return true if version is less than all the versions possible in the range. + */ +export function ltr(version: string | SemVer, range: string | Range, optionsOrLoose?: boolean | Options): boolean; +/** + * Return true if the version is outside the bounds of the range in either the high or low direction. + * The hilo argument must be either the string '>' or '<'. (This is the function called by gtr and ltr.) + */ +export function outside(version: string | SemVer, range: string | Range, hilo: '>' | '<', optionsOrLoose?: boolean | Options): boolean; +/** + * Return true if any of the ranges comparators intersect + */ +export function intersects(range1: string | Range, range2: string | Range, optionsOrLoose?: boolean | Options): boolean; + +// Coercion +/** + * Coerces a string to semver if possible + */ +export function coerce(version: string | SemVer): SemVer | null; + +export class SemVer { + constructor(version: string | SemVer, optionsOrLoose?: boolean | Options); + + raw: string; + loose: boolean; + options: Options; + format(): string; + inspect(): string; + + major: number; + minor: number; + patch: number; + version: string; + build: ReadonlyArray; + prerelease: ReadonlyArray; + + compare(other: string | SemVer): 1 | 0 | -1; + compareMain(other: string | SemVer): 1 | 0 | -1; + comparePre(other: string | SemVer): 1 | 0 | -1; + inc(release: ReleaseType, identifier?: string): SemVer; +} + +export class Comparator { + constructor(comp: string | Comparator, optionsOrLoose?: boolean | Options); + + semver: SemVer; + operator: '' | '=' | '<' | '>' | '<=' | '>='; + value: string; + loose: boolean; + options: Options; + parse(comp: string): void; + test(version: string | SemVer): boolean; + intersects(comp: Comparator, optionsOrLoose?: boolean | Options): boolean; +} + +export class Range { + constructor(range: string | Range, optionsOrLoose?: boolean | Options); + + range: string; + raw: string; + loose: boolean; + options: Options; + includePrerelease: boolean; + format(): string; + inspect(): string; + + set: ReadonlyArray>; + parseRange(range: string): ReadonlyArray; + test(version: string | SemVer): boolean; + intersects(range: Range, optionsOrLoose?: boolean | Options): boolean; +} diff --git a/node_modules/@types/semver/package.json b/node_modules/@types/semver/package.json new file mode 100644 index 00000000..5191963b --- /dev/null +++ b/node_modules/@types/semver/package.json @@ -0,0 +1,43 @@ +{ + "name": "@types/semver", + "version": "6.0.1", + "description": "TypeScript definitions for semver", + "license": "MIT", + "contributors": [ + { + "name": "Bart van der Schoor", + "url": "https://github.com/Bartvds", + "githubUsername": "Bartvds" + }, + { + "name": "BendingBender", + "url": "https://github.com/BendingBender", + "githubUsername": "BendingBender" + }, + { + "name": "Lucian Buzzo", + "url": "https://github.com/LucianBuzzo", + "githubUsername": "LucianBuzzo" + }, + { + "name": "Klaus Meinhardt", + "url": "https://github.com/ajafff", + "githubUsername": "ajafff" + } + ], + "main": "", + "types": "index", + "repository": { + "type": "git", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", + "directory": "types/semver" + }, + "scripts": {}, + "dependencies": {}, + "typesPublisherContentHash": "2fbf12f1845229c1b285bd981b793f64bc89a14bb6f2d36a44eccb80c34cc946", + "typeScriptVersion": "2.0" + +,"_resolved": "https://registry.npmjs.org/@types/semver/-/semver-6.0.1.tgz" +,"_integrity": "sha512-ffCdcrEE5h8DqVxinQjo+2d1q+FV5z7iNtPofw3JsrltSoSVlOGaW0rY8XxtO9XukdTn8TaCGWmk2VFGhI70mg==" +,"_from": "@types/semver@6.0.1" +} \ No newline at end of file diff --git a/node_modules/@types/stack-utils/LICENSE b/node_modules/@types/stack-utils/LICENSE new file mode 100644 index 00000000..4b1ad51b --- /dev/null +++ b/node_modules/@types/stack-utils/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/node_modules/@types/stack-utils/README.md b/node_modules/@types/stack-utils/README.md new file mode 100644 index 00000000..5d1fdb45 --- /dev/null +++ b/node_modules/@types/stack-utils/README.md @@ -0,0 +1,16 @@ +# Installation +> `npm install --save @types/stack-utils` + +# Summary +This package contains type definitions for stack-utils (https://github.com/tapjs/stack-utils#readme). + +# Details +Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stack-utils + +Additional Details + * Last updated: Tue, 07 Nov 2017 17:49:01 GMT + * Dependencies: none + * Global values: none + +# Credits +These definitions were written by BendingBender . diff --git a/node_modules/@types/stack-utils/index.d.ts b/node_modules/@types/stack-utils/index.d.ts new file mode 100644 index 00000000..a2e890b3 --- /dev/null +++ b/node_modules/@types/stack-utils/index.d.ts @@ -0,0 +1,64 @@ +// Type definitions for stack-utils 1.0 +// Project: https://github.com/tapjs/stack-utils#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +export = StackUtils; + +declare class StackUtils { + static nodeInternals(): RegExp[]; + constructor(options?: StackUtils.Options); + clean(stack: string | string[]): string; + capture(limit?: number, startStackFunction?: Function): StackUtils.CallSite[]; + capture(startStackFunction: Function): StackUtils.CallSite[]; + captureString(limit?: number, startStackFunction?: Function): string; + captureString(startStackFunction: Function): string; + at(startStackFunction?: Function): StackUtils.CallSiteLike; + parseLine(line: string): StackUtils.StackLineData | null; +} + +declare namespace StackUtils { + interface Options { + internals?: RegExp[]; + cwd?: string; + wrapCallSite?(callSite: CallSite): CallSite; + } + + interface CallSite { + getThis(): object | undefined; + getTypeName(): string; + getFunction(): Function | undefined; + getFunctionName(): string; + getMethodName(): string | null; + getFileName(): string | undefined; + getLineNumber(): number; + getColumnNumber(): number; + getEvalOrigin(): CallSite | string; + isToplevel(): boolean; + isEval(): boolean; + isNative(): boolean; + isConstructor(): boolean; + } + + interface CallSiteLike extends StackData { + type?: string; + } + + interface StackLineData extends StackData { + evalLine?: number; + evalColumn?: number; + evalFile?: string; + } + + interface StackData { + line?: number; + column?: number; + file?: string; + constructor?: boolean; + evalOrigin?: string; + native?: boolean; + function?: string; + method?: string; + } +} diff --git a/node_modules/@types/stack-utils/package.json b/node_modules/@types/stack-utils/package.json new file mode 100644 index 00000000..3ad2e78d --- /dev/null +++ b/node_modules/@types/stack-utils/package.json @@ -0,0 +1,26 @@ +{ + "name": "@types/stack-utils", + "version": "1.0.1", + "description": "TypeScript definitions for stack-utils", + "license": "MIT", + "contributors": [ + { + "name": "BendingBender", + "url": "https://github.com/BendingBender", + "githubUsername": "BendingBender" + } + ], + "main": "", + "repository": { + "type": "git", + "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" + }, + "scripts": {}, + "dependencies": {}, + "typesPublisherContentHash": "c3d5963386c8535320c11b5edfb22c4bf60fb3e4bcbca34f094f7026b9749d86", + "typeScriptVersion": "2.2" + +,"_resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-1.0.1.tgz" +,"_integrity": "sha512-l42BggppR6zLmpfU6fq9HEa2oGPEI8yrSPL3GITjfRInppYFahObbIQOQK3UGxEnyQpltZLaPe75046NOZQikw==" +,"_from": "@types/stack-utils@1.0.1" +} \ No newline at end of file diff --git a/node_modules/@types/yargs/LICENSE b/node_modules/@types/yargs/LICENSE new file mode 100644 index 00000000..4b1ad51b --- /dev/null +++ b/node_modules/@types/yargs/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/node_modules/@types/yargs/README.md b/node_modules/@types/yargs/README.md new file mode 100644 index 00000000..c1171a86 --- /dev/null +++ b/node_modules/@types/yargs/README.md @@ -0,0 +1,16 @@ +# Installation +> `npm install --save @types/yargs` + +# Summary +This package contains type definitions for yargs ( https://github.com/chevex/yargs ). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yargs/v12 + +Additional Details + * Last updated: Mon, 08 Apr 2019 01:51:31 GMT + * Dependencies: none + * Global values: none + +# Credits +These definitions were written by Martin Poelstra , Mizunashi Mana , Jeffery Grajkowski , Jeff Kenney , Jimi (Dimitris) Charalampidis , Steffen Viken Valvåg , Emily Marigold Klassen . diff --git a/node_modules/@types/yargs/index.d.ts b/node_modules/@types/yargs/index.d.ts new file mode 100644 index 00000000..c574520a --- /dev/null +++ b/node_modules/@types/yargs/index.d.ts @@ -0,0 +1,425 @@ +// Type definitions for yargs 12.0 +// Project: https://github.com/chevex/yargs, https://yargs.js.org +// Definitions by: Martin Poelstra +// Mizunashi Mana +// Jeffery Grajkowski +// Jeff Kenney +// Jimi (Dimitris) Charalampidis +// Steffen Viken Valvåg +// Emily Marigold Klassen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.0 + +// The following TSLint rules have been disabled: +// unified-signatures: Because there is useful information in the argument names of the overloaded signatures + +// Convention: +// Use 'union types' when: +// - parameter types have similar signature type (i.e. 'string | ReadonlyArray') +// - parameter names have the same semantic meaning (i.e. ['command', 'commands'] , ['key', 'keys']) +// An example for not using 'union types' is the declaration of 'env' where `prefix` and `enable` parameters +// have different semantics. On the other hand, in the declaration of 'usage', a `command: string` parameter +// has the same semantic meaning with declaring an overload method by using `commands: ReadonlyArray`, +// thus it's preferred to use `command: string | ReadonlyArray` +// Use parameterless declaration instead of declaring all parameters optional, +// when all parameters are optional and more than one + +declare namespace yargs { + // The type parameter T is the expected shape of the parsed options. + // Arguments is those options plus _ and $0, and an indexer falling + // back to unknown for unknown options. + // + // For the return type / argv property, we create a mapped type over + // Arguments to simplify the inferred type signature in client code. + interface Argv { + (): { [key in keyof Arguments]: Arguments[key] }; + (args: ReadonlyArray, cwd?: string): Argv; + + // Aliases for previously declared options can inherit the types of those options. + alias(shortName: K1, longName: K2 | ReadonlyArray): Argv; + alias(shortName: K2, longName: K1 | ReadonlyArray): Argv; + alias(shortName: string | ReadonlyArray, longName: string | ReadonlyArray): Argv; + alias(aliases: { [shortName: string]: string | ReadonlyArray }): Argv; + + argv: { [key in keyof Arguments]: Arguments[key] }; + + array(key: K | ReadonlyArray): Argv & { [key in K]: ToArray }>; + array(key: K | ReadonlyArray): Argv | undefined }>; + + boolean(key: K | ReadonlyArray): Argv & { [key in K]: boolean | undefined }>; + boolean(key: K | ReadonlyArray): Argv; + + check(func: (argv: Arguments, aliases: { [alias: string]: string }) => any, global?: boolean): Argv; + + choices>(key: K, values: C): Argv & { [key in K]: C[number] | undefined }>; + choices>(key: K, values: C): Argv; + choices }>(choices: C): Argv & { [key in keyof C]: C[key][number] | undefined }>; + + coerce(key: K | ReadonlyArray, func: (arg: any) => V): Argv & { [key in K]: V | undefined }>; + coerce(key: K | ReadonlyArray, func: (arg: any) => V): Argv; + coerce any }>(opts: O): Argv & { [key in keyof O]: ReturnType | undefined }>; + + command(command: string | ReadonlyArray, description: string, builder?: (args: Argv) => Argv, handler?: (args: Arguments) => void): Argv; + command(command: string | ReadonlyArray, description: string, builder?: O, handler?: (args: Arguments>) => void): Argv; + command(command: string | ReadonlyArray, description: string, module: CommandModule): Argv; + command(command: string | ReadonlyArray, showInHelp: false, builder?: (args: Argv) => Argv, handler?: (args: Arguments) => void): Argv; + command(command: string | ReadonlyArray, showInHelp: false, builder?: O, handler?: (args: Arguments>) => void): Argv; + command(command: string | ReadonlyArray, showInHelp: false, module: CommandModule): Argv; + command(module: CommandModule): Argv; + + // Advanced API + commandDir(dir: string, opts?: RequireDirectoryOptions): Argv; + + completion(): Argv; + completion(cmd: string, func?: AsyncCompletionFunction): Argv; + completion(cmd: string, func?: SyncCompletionFunction): Argv; + completion(cmd: string, description?: string, func?: AsyncCompletionFunction): Argv; + completion(cmd: string, description?: string, func?: SyncCompletionFunction): Argv; + + config(): Argv; + config(key: string | ReadonlyArray, description?: string, parseFn?: (configPath: string) => object): Argv; + config(key: string | ReadonlyArray, parseFn: (configPath: string) => object): Argv; + config(explicitConfigurationObject: object): Argv; + + conflicts(key: string, value: string | ReadonlyArray): Argv; + conflicts(conflicts: { [key: string]: string | ReadonlyArray }): Argv; + + count(key: K | ReadonlyArray): Argv & { [key in K]: number }>; + count(key: K | ReadonlyArray): Argv; + + default(key: K, value: V, description?: string): Argv & { [key in K]: V }>; + default(key: K, value: V, description?: string): Argv; + default(defaults: D, description?: string): Argv & D>; + + /** + * @deprecated since version 6.6.0 + * Use '.demandCommand()' or '.demandOption()' instead + */ + demand(key: K | ReadonlyArray, msg?: string | true): Argv>; + demand(key: K | ReadonlyArray, msg?: string | true): Argv; + demand(key: string | ReadonlyArray, required?: boolean): Argv; + demand(positionals: number, msg: string): Argv; + demand(positionals: number, required?: boolean): Argv; + demand(positionals: number, max: number, msg?: string): Argv; + + demandOption(key: K | ReadonlyArray, msg?: string | true): Argv>; + demandOption(key: K | ReadonlyArray, msg?: string | true): Argv; + demandOption(key: string | ReadonlyArray, demand?: boolean): Argv; + + demandCommand(): Argv; + demandCommand(min: number, minMsg?: string): Argv; + demandCommand(min: number, max?: number, minMsg?: string, maxMsg?: string): Argv; + + describe(key: string | ReadonlyArray, description: string): Argv; + describe(descriptions: { [key: string]: string }): Argv; + + detectLocale(detect: boolean): Argv; + + env(): Argv; + env(prefix: string): Argv; + env(enable: boolean): Argv; + + epilog(msg: string): Argv; + + epilogue(msg: string): Argv; + + example(command: string, description: string): Argv; + + exit(code: number, err: Error): void; + + exitProcess(enabled: boolean): Argv; + + fail(func: (msg: string, err: Error) => any): Argv; + + getCompletion(args: ReadonlyArray, done: (completions: ReadonlyArray) => void): Argv; + + global(key: string | ReadonlyArray): Argv; + + group(key: string | ReadonlyArray, groupName: string): Argv; + + hide(key: string): Argv; + + help(): Argv; + help(enableExplicit: boolean): Argv; + help(option: string, enableExplicit: boolean): Argv; + help(option: string, description?: string, enableExplicit?: boolean): Argv; + + implies(key: string, value: string | ReadonlyArray): Argv; + implies(implies: { [key: string]: string | ReadonlyArray }): Argv; + + locale(): string; + locale(loc: string): Argv; + + middleware(callbacks: MiddlewareFunction | ReadonlyArray>): Argv; + + nargs(key: string, count: number): Argv; + nargs(nargs: { [key: string]: number }): Argv; + + normalize(key: K | ReadonlyArray): Argv & { [key in K]: ToString }>; + normalize(key: K | ReadonlyArray): Argv; + + number(key: K | ReadonlyArray): Argv & { [key in K]: ToNumber }>; + number(key: K | ReadonlyArray): Argv; + + option(key: K, options: O): Argv & { [key in K]: InferredOptionType }>; + option(key: K, options: O): Argv }>; + option(options: O): Argv & InferredOptionTypes>; + + options(key: K, options: O): Argv & { [key in K]: InferredOptionType }>; + options(key: K, options: O): Argv }>; + options(options: O): Argv & InferredOptionTypes>; + + parse(): { [key in keyof Arguments]: Arguments[key] }; + parse(arg: string | ReadonlyArray, context?: object, parseCallback?: ParseCallback): { [key in keyof Arguments]: Arguments[key] }; + + parsed: DetailedArguments | false; + + pkgConf(key: string | ReadonlyArray, cwd?: string): Argv; + + /** + * 'positional' should be called in a command's builder function, and is not + * available on the top-level yargs instance. If so, it will throw an error. + */ + positional(key: K, opt: O): Argv & { [key in K]: InferredOptionType }>; + positional(key: K, opt: O): Argv }>; + + recommendCommands(): Argv; + + /** + * @deprecated since version 6.6.0 + * Use '.demandCommand()' or '.demandOption()' instead + */ + require(key: K | ReadonlyArray, msg?: string | true): Argv>; + require(key: string, msg: string): Argv; + require(key: string, required: boolean): Argv; + require(keys: ReadonlyArray, msg: string): Argv; + require(keys: ReadonlyArray, required: boolean): Argv; + require(positionals: number, required: boolean): Argv; + require(positionals: number, msg: string): Argv; + + /** + * @deprecated since version 6.6.0 + * Use '.demandCommand()' or '.demandOption()' instead + */ + required(key: K | ReadonlyArray, msg?: string | true): Argv>; + required(key: string, msg: string): Argv; + required(key: string, required: boolean): Argv; + required(keys: ReadonlyArray, msg: string): Argv; + required(keys: ReadonlyArray, required: boolean): Argv; + required(positionals: number, required: boolean): Argv; + required(positionals: number, msg: string): Argv; + + requiresArg(key: string | ReadonlyArray): Argv; + + /** + * @deprecated since version 6.6.0 + * Use '.global()' instead + */ + reset(): Argv; + + scriptName($0: string): Argv; + + showCompletionScript(): Argv; + + showHidden(option?: string | boolean): Argv; + showHidden(option: string, description?: string): Argv; + + showHelp(consoleLevel?: string): Argv; + + showHelpOnFail(enable: boolean, message?: string): Argv; + + skipValidation(key: string | ReadonlyArray): Argv; + + strict(): Argv; + strict(enabled: boolean): Argv; + + string(key: K | ReadonlyArray): Argv & { [key in K]: ToString }>; + string(key: K | ReadonlyArray): Argv; + + // Intended to be used with '.wrap()' + terminalWidth(): number; + + updateLocale(obj: { [key: string]: string }): Argv; + + updateStrings(obj: { [key: string]: string }): Argv; + + usage(message: string): Argv; + usage(command: string | ReadonlyArray, description: string, builder?: (args: Argv) => Argv, handler?: (args: Arguments) => void): Argv; + usage(command: string | ReadonlyArray, showInHelp: boolean, builder?: (args: Argv) => Argv, handler?: (args: Arguments) => void): Argv; + usage(command: string | ReadonlyArray, description: string, builder?: O, handler?: (args: Arguments>) => void): Argv; + usage(command: string | ReadonlyArray, showInHelp: boolean, builder?: O, handler?: (args: Arguments>) => void): Argv; + + version(): Argv; + version(version: string): Argv; + version(enable: boolean): Argv; + version(optionKey: string, version: string): Argv; + version(optionKey: string, description: string, version: string): Argv; + + wrap(columns: number | null): Argv; + } + + type Arguments = T & { + /** Non-option arguments */ + _: string[]; + /** The script name or node command */ + $0: string; + /** All remaining options */ + [argName: string]: unknown; + }; + + interface DetailedArguments { + argv: Arguments; + error: Error | null; + aliases: {[alias: string]: string[]}; + newAliases: {[alias: string]: boolean}; + configuration: Configuration; + } + + interface Configuration { + 'boolean-negation': boolean; + 'camel-case-expansion': boolean; + 'combine-arrays': boolean; + 'dot-notation': boolean; + 'duplicate-arguments-array': boolean; + 'flatten-duplicate-arrays': boolean; + 'negation-prefix': string; + 'parse-numbers': boolean; + 'populate--': boolean; + 'set-placeholder-key': boolean; + 'short-option-groups': boolean; + } + + interface RequireDirectoryOptions { + recurse?: boolean; + extensions?: ReadonlyArray; + visit?: (commandObject: any, pathToFile?: string, filename?: string) => any; + include?: RegExp | ((pathToFile: string) => boolean); + exclude?: RegExp | ((pathToFile: string) => boolean); + } + + interface Options { + alias?: string | ReadonlyArray; + array?: boolean; + boolean?: boolean; + choices?: Choices; + coerce?: (arg: any) => any; + config?: boolean; + configParser?: (configPath: string) => object; + conflicts?: string | ReadonlyArray | { [key: string]: string | ReadonlyArray }; + count?: boolean; + default?: any; + defaultDescription?: string; + /** + * @deprecated since version 6.6.0 + * Use 'demandOption' instead + */ + demand?: boolean | string; + demandOption?: boolean | string; + desc?: string; + describe?: string; + description?: string; + global?: boolean; + group?: string; + hidden?: boolean; + implies?: string | ReadonlyArray | { [key: string]: string | ReadonlyArray }; + nargs?: number; + normalize?: boolean; + number?: boolean; + /** + * @deprecated since version 6.6.0 + * Use 'demandOption' instead + */ + require?: boolean | string; + /** + * @deprecated since version 6.6.0 + * Use 'demandOption' instead + */ + required?: boolean | string; + requiresArg?: boolean; + skipValidation?: boolean; + string?: boolean; + type?: "array" | "count" | PositionalOptionsType; + } + + interface PositionalOptions { + alias?: string | ReadonlyArray; + choices?: Choices; + coerce?: (arg: any) => any; + conflicts?: string | ReadonlyArray | { [key: string]: string | ReadonlyArray }; + default?: any; + desc?: string; + describe?: string; + description?: string; + implies?: string | ReadonlyArray | { [key: string]: string | ReadonlyArray }; + normalize?: boolean; + type?: PositionalOptionsType; + } + + /** Remove keys K in T */ + type Omit = { [key in Exclude]: T[key] }; + + /** Remove undefined as a possible value for keys K in T */ + type Defined = Omit & { [key in K]: Exclude }; + + /** Convert T to T[] and T | undefined to T[] | undefined */ + type ToArray = Array> | Extract; + + /** Gives string[] if T is an array type, otherwise string. Preserves | undefined. */ + type ToString = (Exclude extends any[] ? string[] : string) | Extract; + + /** Gives number[] if T is an array type, otherwise number. Preserves | undefined. */ + type ToNumber = (Exclude extends any[] ? number[] : number) | Extract; + + type InferredOptionType = + O extends { default: infer D } ? D : + O extends { type: "count" } ? number : + O extends { count: true } ? number : + O extends { required: string | true } ? RequiredOptionType : + O extends { require: string | true } ? RequiredOptionType : + O extends { demand: string | true } ? RequiredOptionType : + O extends { demandOption: string | true } ? RequiredOptionType : + RequiredOptionType | undefined; + + type RequiredOptionType = + O extends { type: "array", string: true } ? string[] : + O extends { type: "array", number: true } ? number[] : + O extends { type: "array", normalize: true } ? string[] : + O extends { type: "string", array: true } ? string[] : + O extends { type: "number", array: true } ? number[] : + O extends { string: true, array: true } ? string[] : + O extends { number: true, array: true } ? number[] : + O extends { normalize: true, array: true } ? string[] : + O extends { type: "array" } ? Array : + O extends { type: "boolean" } ? boolean : + O extends { type: "number" } ? number : + O extends { type: "string" } ? string : + O extends { array: true } ? Array : + O extends { boolean: true } ? boolean : + O extends { number: true } ? number : + O extends { string: true } ? string : + O extends { normalize: true } ? string : + O extends { choices: ReadonlyArray } ? C : + O extends { coerce: (arg: any) => infer T } ? T : + unknown; + + type InferredOptionTypes = { [key in keyof O]: InferredOptionType }; + + interface CommandModule { + aliases?: ReadonlyArray | string; + builder?: CommandBuilder; + command?: ReadonlyArray | string; + describe?: string | false; + handler: (args: Arguments) => void; + } + + type ParseCallback = (err: Error | undefined, argv: Arguments, output: string) => void; + type CommandBuilder = { [key: string]: Options } | ((args: Argv) => Argv); + type SyncCompletionFunction = (current: string, argv: any) => string[]; + type AsyncCompletionFunction = (current: string, argv: any, done: (completion: ReadonlyArray) => void) => void; + type MiddlewareFunction = (args: Arguments) => void; + type Choices = ReadonlyArray; + type PositionalOptionsType = "boolean" | "number" | "string"; +} + +declare var yargs: yargs.Argv; +export = yargs; diff --git a/node_modules/@types/yargs/package.json b/node_modules/@types/yargs/package.json new file mode 100644 index 00000000..5646299e --- /dev/null +++ b/node_modules/@types/yargs/package.json @@ -0,0 +1,58 @@ +{ + "name": "@types/yargs", + "version": "12.0.12", + "description": "TypeScript definitions for yargs", + "license": "MIT", + "contributors": [ + { + "name": "Martin Poelstra", + "url": "https://github.com/poelstra", + "githubUsername": "poelstra" + }, + { + "name": "Mizunashi Mana", + "url": "https://github.com/mizunashi-mana", + "githubUsername": "mizunashi-mana" + }, + { + "name": "Jeffery Grajkowski", + "url": "https://github.com/pushplay", + "githubUsername": "pushplay" + }, + { + "name": "Jeff Kenney", + "url": "https://github.com/jeffkenney", + "githubUsername": "jeffkenney" + }, + { + "name": "Jimi (Dimitris) Charalampidis", + "url": "https://github.com/JimiC", + "githubUsername": "JimiC" + }, + { + "name": "Steffen Viken Valvåg", + "url": "https://github.com/steffenvv", + "githubUsername": "steffenvv" + }, + { + "name": "Emily Marigold Klassen", + "url": "https://github.com/forivall", + "githubUsername": "forivall" + } + ], + "main": "", + "types": "index", + "repository": { + "type": "git", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", + "directory": "types/yargs" + }, + "scripts": {}, + "dependencies": {}, + "typesPublisherContentHash": "797da61a576678d4a7247c12796a39175a72c67c12a6b2e34a47306ad6c42cdf", + "typeScriptVersion": "3.0" + +,"_resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-12.0.12.tgz" +,"_integrity": "sha512-SOhuU4wNBxhhTHxYaiG5NY4HBhDIDnJF60GU+2LqHAdKKer86//e4yg69aENCtQ04n0ovz+tq2YPME5t5yp4pw==" +,"_from": "@types/yargs@12.0.12" +} \ No newline at end of file diff --git a/node_modules/@types/yargs/yargs.d.ts b/node_modules/@types/yargs/yargs.d.ts new file mode 100644 index 00000000..f022ae4b --- /dev/null +++ b/node_modules/@types/yargs/yargs.d.ts @@ -0,0 +1,9 @@ +import { Argv } from '.'; + +export = Yargs; + +declare function Yargs( + processArgs?: ReadonlyArray, + cwd?: string, + parentRequire?: NodeRequireFunction, +): Argv;