Merge remote-tracking branch 'upstream/master'

This commit is contained in:
breeze9527
2019-03-07 14:19:57 +08:00
1153 changed files with 37360 additions and 9574 deletions

View File

@@ -240,6 +240,12 @@
"sourceRepoURL": "https://github.com/mapbox/cheap-ruler",
"asOfVersion": "2.5.0"
},
{
"libraryName": "chokidar",
"typingsPackageName": "chokidar",
"sourceRepoURL": "https://github.com/paulmillr/chokidar",
"asOfVersion": "2.1.3"
},
{
"libraryName": "chunked-dc",
"typingsPackageName": "chunked-dc",
@@ -414,6 +420,12 @@
"sourceRepoURL": "git@github.com:KyleAMathews/deepmerge.git",
"asOfVersion": "2.2.0"
},
{
"libraryName": "del",
"typingsPackageName": "del",
"sourceRepoURL": "https://github.com/sindresorhus/del",
"asOfVersion": "4.0.0"
},
{
"libraryName": "delay",
"typingsPackageName": "delay",
@@ -714,6 +726,12 @@
"sourceRepoURL": "https://github.com/ivogabe/gulp-typescript",
"asOfVersion": "2.13.0"
},
{
"libraryName": "handlebars",
"typingsPackageName": "handlebars",
"sourceRepoURL": "https://github.com/wycats/handlebars.js",
"asOfVersion": "4.1.0"
},
{
"libraryName": "handsontable",
"typingsPackageName": "handsontable",
@@ -780,6 +798,12 @@
"sourceRepoURL": "https://github.com/taye/interact.js",
"asOfVersion": "1.3.0"
},
{
"libraryName": "internal-ip",
"typingsPackageName": "internal-ip",
"sourceRepoURL": "https://github.com/sindresorhus/internal-ip",
"asOfVersion": "4.1.0"
},
{
"libraryName": "inversify",
"typingsPackageName": "inversify",
@@ -828,6 +852,12 @@
"sourceRepoURL": "https://github.com/blakeembrey/is-lower-case",
"asOfVersion": "1.1.2"
},
{
"libraryName": "is-online",
"typingsPackageName": "is-online",
"sourceRepoURL": "https://github.com/sindresorhus/is-online",
"asOfVersion": "8.1.0"
},
{
"libraryName": "is-plain-object",
"typingsPackageName": "is-plain-object",
@@ -1104,12 +1134,24 @@
"sourceRepoURL": "https://github.com/theoephraim/node-pg-migrate#readme",
"asOfVersion": "2.15.0"
},
{
"libraryName": "png-async",
"typingsPackageName": "png-async",
"sourceRepoURL": "https://github.com/kanreisa/node-png-async",
"asOfVersion": "0.9.4"
},
{
"libraryName": "node-waves",
"typingsPackageName": "node-waves",
"sourceRepoURL": "http://fian.my.id/Waves",
"asOfVersion": "0.7.6"
},
{
"libraryName": "normalize-url",
"typingsPackageName": "normalize-url",
"sourceRepoURL": "https://github.com/sindresorhus/normalize-url",
"asOfVersion": "4.2.0"
},
{
"libraryName": "Normalizr",
"typingsPackageName": "normalizr",
@@ -1134,11 +1176,41 @@
"sourceRepoURL": "http://onsen.io",
"asOfVersion": "2.0.0"
},
{
"libraryName": "p-event",
"typingsPackageName": "p-event",
"sourceRepoURL": "https://github.com/sindresorhus/p-event",
"asOfVersion": "3.0.0"
},
{
"libraryName": "p-limit",
"typingsPackageName": "p-limit",
"sourceRepoURL": "https://github.com/sindresorhus/p-limit",
"asOfVersion": "2.2.0"
},
{
"libraryName": "p-map",
"typingsPackageName": "p-map",
"sourceRepoURL": "https://github.com/sindresorhus/p-map",
"asOfVersion": "2.0.0"
},
{
"libraryName": "p-pipe",
"typingsPackageName": "p-pipe",
"sourceRepoURL": "https://github.com/sindresorhus/p-pipe",
"asOfVersion": "2.0.1"
},
{
"libraryName": "p-queue",
"typingsPackageName": "p-queue",
"sourceRepoURL": "https://github.com/sindresorhus/p-queue",
"asOfVersion": "3.2.1"
},
{
"libraryName": "p-throttle",
"typingsPackageName": "p-throttle",
"sourceRepoURL": "https://github.com/sindresorhus/p-throttle",
"asOfVersion": "2.0.0"
"asOfVersion": "2.1.0"
},
{
"libraryName": "param-case",
@@ -1662,6 +1734,12 @@
"sourceRepoURL": "http://tabrisjs.com",
"asOfVersion": "1.8.0"
},
{
"libraryName": "tabris-plugin-firebase",
"typingsPackageName": "tabris-plugin-firebase",
"sourceRepoURL": "https://github.com/eclipsesource/tabris-plugin-firebase",
"asOfVersion": "2.1.0"
},
{
"libraryName": "tcomb",
"typingsPackageName": "tcomb",
@@ -1788,6 +1866,12 @@
"sourceRepoURL": "https://github.com/vuejs/vue-router",
"asOfVersion": "2.0.0"
},
{
"libraryName": "wait-for-localhost",
"typingsPackageName": "wait-for-localhost",
"sourceRepoURL": "https://github.com/sindresorhus/wait-for-localhost",
"asOfVersion": "3.1.0"
},
{
"libraryName": "webcola",
"typingsPackageName": "webcola",

View File

@@ -17,6 +17,7 @@
"scripts": {
"compile-scripts": "tsc -p scripts",
"not-needed": "node scripts/not-needed.js",
"update-codeowners": "node scripts/update-codeowners.js",
"test": "node node_modules/types-publisher/bin/tester/test.js --run-from-definitely-typed",
"lint": "dtslint types"
},

View File

@@ -1,13 +1,10 @@
{
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"strict": true,
"baseUrl": "../types",
"typeRoots": [
"../types"
@@ -15,4 +12,4 @@
"types": [],
"forceConsistentCasingInFileNames": true
}
}
}

View File

@@ -0,0 +1,126 @@
/// <reference lib="esnext.asynciterable" />
// Must reference esnext.asynciterable lib, since octokit uses AsyncIterable internally
const cp = require("child_process");
const Octokit = require("@octokit/rest");
const { AllPackages, getDefinitelyTyped, loggerWithErrors,
parseDefinitions, parseNProcesses, clean } = require("types-publisher");
const { writeFile } = require("fs-extra");
async function main() {
const options = { definitelyTypedPath: ".", progress: false, parseInParallel: true };
const log = loggerWithErrors()[0];
clean();
const dt = await getDefinitelyTyped(options, log);
await parseDefinitions(dt, { nProcesses: parseNProcesses(), definitelyTypedPath: "." }, log);
const allPackages = await AllPackages.read(dt);
const typings = allPackages.allTypings();
const maxPathLen = Math.max(...typings.map(t => t.subDirectoryPath.length));
const entries = mapDefined(typings, t => getEntry(t, maxPathLen));
await writeFile([options.definitelyTypedPath, ".github", "CODEOWNERS"].join("/"), `${header}\n\n${entries.join("\n")}\n`, { encoding: "utf-8" });
}
const token = /** @type {string} */(process.env.GH_TOKEN);
const gh = new Octokit();
const reviewers = ["weswigham", "sandersn", "RyanCavanaugh"]
const now = new Date();
const branchName = `codeowner-update-${now.getFullYear()}${padNum(now.getMonth())}${padNum(now.getDay())}`;
const remoteUrl = `https://${token}@github.com/DefinitelyTyped/DefinitelyTyped.git`;
runSequence([
["git", ["checkout", "."]], // reset any changes
]);
main().then(() => {
runSequence([
["git", ["checkout", "-b", branchName]], // create a branch
["git", ["add", ".github/CODEOWNERS"]], // Add CODEOWNERS
["git", ["commit", "-m", `"Update CODEOWNERS"`]], // Commit all changes
["git", ["remote", "add", "fork", remoteUrl]], // Add the remote fork
["git", ["push", "--set-upstream", "fork", branchName, "-f"]] // push the branch
]);
gh.authenticate({
type: "token",
token,
});
return gh.pulls.create({
owner: "DefinitelyTyped",
repo: "DefinitelyTyped",
maintainer_can_modify: true,
title: `🤖 CODEOWNERS has changed`,
head: `DefinitelyTyped:${branchName}`,
base: "master",
body:
`Please review the diff and merge if no changes are unexpected.
cc ${reviewers.map(r => "@" + r).join(" ")}`,
})
}).then(r => {
const num = r.data.number;
console.log(`Pull request ${num} created.`);
return gh.pulls.createReviewRequest({
owner: "DefinitelyTyped",
repo: "DefinitelyTyped",
number: num,
reviewers,
});
}).then(() => {
console.log(`Reviewers requested, done.`);
}).catch(e => {
console.error(e);
process.exit(1);
});
/** @param {[string, string[]][]} tasks */
function runSequence(tasks) {
for (const task of tasks) {
console.log(`${task[0]} ${task[1].join(" ")}`);
const result = cp.spawnSync(task[0], task[1], { timeout: 100000, shell: true, stdio: "inherit" });
if (result.status !== 0) throw new Error(`${task[0]} ${task[1].join(" ")} failed: ${result.stderr && result.stderr.toString()}`);
}
}
/** @param {number} number */
function padNum(number) {
const str = "" + number;
return str.length >= 2 ? str : "0" + str;
}
const header =
`# This file is generated.
# Add yourself to the "Definitions by:" list instead.
# See https://github.com/DefinitelyTyped/DefinitelyTyped#edit-an-existing-package`;
/**
* @param { { contributors: ReadonlyArray<{githubUsername?: string }>, subDirectoryPath: string} } pkg
* @param {number} maxPathLen
* @return {string | undefined}
*/
function getEntry(pkg, maxPathLen) {
const users = mapDefined(pkg.contributors, c => c.githubUsername);
if (!users.length) {
return undefined;
}
const path = `${pkg.subDirectoryPath}/`.padEnd(maxPathLen);
return `/types/${path} ${users.map(u => `@${u}`).join(" ")}`;
}
/**
* @template T,U
* @param {ReadonlyArray<T>} arr
* @param {(t: T) => U | undefined} mapper
* @return U[]
*/
function mapDefined(arr, mapper) {
const out = [];
for (const a of arr) {
const res = mapper(a);
if (res !== undefined) {
out.push(res);
}
}
return out;
}

View File

@@ -2,7 +2,7 @@
// Project: https://github.com/ciferox/adone
// Definitions by: am <https://github.com/s0m3on3>, Maximus <https://github.com/maxveres>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.6
// TypeScript Version: 2.8
/// <reference path="./adone.d.ts" />
/// <reference path="./glosses/app.d.ts" />

View File

@@ -223,7 +223,7 @@ namespace adoneTests.system.process {
});
ret.on("message", () => {});
ret.stdout.pipe(adone.fs.createWriteStream(__filename));
ret.stdout!.pipe(adone.fs.createWriteStream(__filename));
}
}
@@ -811,7 +811,7 @@ namespace adoneTests.system.process {
});
ret.on("message", () => {});
ret.stdout.pipe(adone.fs.createWriteStream(__filename));
ret.stdout!.pipe(adone.fs.createWriteStream(__filename));
}
}

View File

@@ -13,6 +13,7 @@
"no-unnecessary-qualifier": false,
"unified-signatures": false,
"space-before-function-paren": false,
"await-promise": false
"await-promise": false,
"no-restricted-globals": false
}
}
}

View File

@@ -98,6 +98,7 @@ let _algoliaIndexSettings: IndexSettings = {
placeholders: { '': [''] },
camelCaseAttributes: [''],
sortFacetValuesBy: 'count',
queryLanguages: ['fr', 'es'],
};
let _algoliaQueryParameters: QueryParameters = {

View File

@@ -6,6 +6,7 @@
// Samuel Vaillant <https://github.com/samouss>
// Kai Eichinger <https://github.com/keichinger>
// Nery Ortez <https://github.com/neryortez>
// Antoine Rousseau <https://github.com/antoinerousseau>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
@@ -1778,12 +1779,20 @@ declare namespace algoliasearch {
};
/**
* List of attributes on which to do a decomposition of camel case words.
*
https://www.algolia.com/doc/api-reference/api-parameters/camelCaseAttributes/
* https://www.algolia.com/doc/api-reference/api-parameters/camelCaseAttributes/
*/
camelCaseAttributes?: string[];
/**
* Controls how facet values are sorted.
* https://www.algolia.com/doc/api-reference/api-parameters/sortFacetValuesBy/
*/
sortFacetValuesBy?: 'count' | 'alpha';
/**
* Sets the languages to be used by language-specific settings and functionalities
* such as ignorePlurals, removeStopWords, and CJK word-detection.
* https://www.algolia.com/doc/api-reference/api-parameters/queryLanguages/
*/
queryLanguages?: Array<'af' | 'ar' | 'az' | 'bg' | 'bn' | 'ca' | 'cs' | 'cy' | 'da' | 'de' | 'el' | 'en' | 'eo' | 'es' | 'et' | 'eu' | 'fa' | 'fi' | 'fo' | 'fr' | 'ga' | 'gl' | 'he' | 'hi' | 'hu' | 'hy' | 'id' | 'is' | 'it' | 'ja' | 'ka' | 'kk' | 'ko' | 'ku' | 'ky' | 'lt' | 'lv' | 'mi' | 'mn' | 'mr' | 'ms' | 'mt' | 'nb' | 'nl' | 'no' | 'ns' | 'pl' | 'ps' | 'pt' | 'pt-br' | 'qu' | 'ro' | 'ru' | 'sk' | 'sq' | 'sv' | 'sw' | 'ta' | 'te' | 'th' | 'tl' | 'tn' | 'tr' | 'tt' | 'uk' | 'ur' | 'uz' | 'zh'>;
}
interface Response<T=any> {

View File

@@ -7,6 +7,7 @@
// Claas Brüggemann <https://github.com/ClaasBrueggemann>
// Kai Eichinger <https://github.com/keichinger>
// Nery Ortez <https://github.com/neryortez>
// Antoine Rousseau <https://github.com/antoinerousseau>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
@@ -534,9 +535,16 @@ declare namespace algoliasearch {
userData?: string | object;
/**
* Controls how facet values are sorted.
* https://www.algolia.com/doc/api-reference/api-parameters/sortFacetValuesBy/
*/
sortFacetValuesBy?: 'count' | 'alpha';
/**
* Sets the languages to be used by language-specific settings and functionalities
* such as ignorePlurals, removeStopWords, and CJK word-detection.
* https://www.algolia.com/doc/api-reference/api-parameters/queryLanguages/
*/
queryLanguages?: Array<'af' | 'ar' | 'az' | 'bg' | 'bn' | 'ca' | 'cs' | 'cy' | 'da' | 'de' | 'el' | 'en' | 'eo' | 'es' | 'et' | 'eu' | 'fa' | 'fi' | 'fo' | 'fr' | 'ga' | 'gl' | 'he' | 'hi' | 'hu' | 'hy' | 'id' | 'is' | 'it' | 'ja' | 'ka' | 'kk' | 'ko' | 'ku' | 'ky' | 'lt' | 'lv' | 'mi' | 'mn' | 'mr' | 'ms' | 'mt' | 'nb' | 'nl' | 'no' | 'ns' | 'pl' | 'ps' | 'pt' | 'pt-br' | 'qu' | 'ro' | 'ru' | 'sk' | 'sq' | 'sv' | 'sw' | 'ta' | 'te' | 'th' | 'tl' | 'tn' | 'tr' | 'tt' | 'uk' | 'ur' | 'uz' | 'zh'>;
}
namespace SearchForFacetValues {

View File

@@ -14,6 +14,14 @@ amqp.connect('amqp://localhost')
amqp.connect('amqp://localhost')
.then(connection => {
connection.serverProperties.copyright; // $ExpectType string | undefined
connection.serverProperties.platform; // $ExpectType string
connection.serverProperties.information; // $ExpectType string
connection.serverProperties.host; // $ExpectType string
connection.serverProperties.product; // $ExpectType string
connection.serverProperties.version; // $ExpectType string
connection.serverProperties.customField; // $ExpectType string | undefined
return connection.createChannel()
.tap(channel => channel.checkQueue('myQueue'))
.then(channel => {
@@ -37,6 +45,14 @@ import amqpcb = require('amqplib/callback_api');
amqpcb.connect('amqp://localhost', (err, connection) => {
if (!err) {
connection.serverProperties.copyright; // $ExpectType string | undefined
connection.serverProperties.platform; // $ExpectType string
connection.serverProperties.information; // $ExpectType string
connection.serverProperties.host; // $ExpectType string
connection.serverProperties.product; // $ExpectType string
connection.serverProperties.version; // $ExpectType string
connection.serverProperties.customField; // $ExpectType string | undefined
connection.createChannel((err, channel) => {
if (!err) {
channel.assertQueue('myQueue', {}, (err, ok) => {

View File

@@ -1,11 +1,12 @@
import events = require('events');
import { Replies, Options, Message } from './properties';
import { Replies, Options, Message, ServerProperties } from './properties';
export * from './properties';
export interface Connection extends events.EventEmitter {
close(callback?: (err: any) => void): void;
createChannel(callback: (err: any, channel: Channel) => void): void;
createConfirmChannel(callback: (err: any, confirmChannel: ConfirmChannel) => void): void;
serverProperties: ServerProperties;
}
export interface Channel extends events.EventEmitter {

View File

@@ -8,13 +8,14 @@
import * as Promise from 'bluebird';
import * as events from 'events';
import { Replies, Options, Message, GetMessage, ConsumeMessage } from './properties';
import { Replies, Options, Message, GetMessage, ConsumeMessage, ServerProperties } from './properties';
export * from './properties';
export interface Connection extends events.EventEmitter {
close(): Promise<void>;
createChannel(): Promise<Channel>;
createConfirmChannel(): Promise<ConfirmChannel>;
serverProperties: ServerProperties;
}
export interface Channel extends events.EventEmitter {

View File

@@ -210,3 +210,13 @@ export interface XDeath {
"original-expiration"?: any;
"routing-keys": string[];
}
export interface ServerProperties {
host: string;
product: string;
version: string;
platform: string;
copyright?: string;
information: string;
[key: string]: string | undefined;
}

View File

@@ -512,5 +512,10 @@ declare module 'angular' {
}
type IStickyService = (scope: IScope, element: JQuery, elementClone?: JQuery) => void;
interface IInteractionService {
getLastInteractionType(): string|null;
isUserInvoked(checkDelay?: number): boolean;
}
}
}

View File

@@ -33,7 +33,7 @@ myApp.config((
$urlMatcherFactory.type("fullType", {
decode: (val) => parseInt(val, 10),
encode: (val) => val && val.toString(),
equals: (a, b) => this.is(a) && a === b,
equals: function (a, b) { return this.is(a) && a === b },
is: (val) => angular.isNumber(val) && isFinite(val) && val % 1 === 0,
pattern: /\d+/
});

View File

@@ -1,4 +1,4 @@
import * as anime from 'animejs';
import anime from 'animejs';
const test1 = anime({
targets: 'div',
@@ -17,9 +17,9 @@ const test2 = anime({
},
translateY: '40px',
color: [
{value: '#FF0000', duration: 2000},
{value: '#00FF00', duration: 2000},
{value: '#0000FF', duration: 2000},
{ value: '#FF0000', duration: 2000 },
{ value: '#00FF00', duration: 2000 },
{ value: '#0000FF', duration: 2000 },
],
duration: () => {
return 1000000000000;
@@ -69,3 +69,9 @@ const bezier = anime.bezier(0, 0, 100, 100);
anime.easings['hello'] = anime.bezier(0, 0, 1900, 3020);
const runningAnims = anime.running;
anime.remove(".tiny-divvy-div");
anime.timeline().add({
targets: [],
duration: 1000,
easing: "linear",
}, 0);

View File

@@ -1,6 +1,7 @@
// Type definitions for animejs 2.0
// Project: http://animejs.com
// Definitions by: Andrew Babin <https://github.com/A-Babin>
// Definitions by: Andrew Babin <https://github.com/A-Babin>
// supaiku0 <https://github.com/supaiku0>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.4
@@ -110,7 +111,7 @@ declare namespace anime {
}
interface AnimeTimelineInstance extends AnimeInstance {
add(params: AnimeAnimParams): AnimeTimelineInstance;
add(params: AnimeAnimParams, timelineOffset?: string | number): AnimeTimelineInstance;
}
// Helpers

View File

@@ -14,6 +14,7 @@
"../"
],
"types": [],
"allowSyntheticDefaultImports": true,
"noEmit": true,
"forceConsistentCasingInFileNames": true
},

View File

@@ -19,10 +19,10 @@ declare namespace Ansi {
interface AnsiEscapes {
cursorTo(x: number, y?: number): string;
cursorMove(x: number, y?: number): string;
cursorUp(count: number): string;
cursorDown(count: number): string;
cursorForward(count: number): string;
cursorBackward(count: number): string;
cursorUp(count?: number): string;
cursorDown(count?: number): string;
cursorForward(count?: number): string;
cursorBackward(count?: number): string;
cursorLeft: string;
cursorSavePosition: string;

View File

@@ -8,15 +8,21 @@ const config: webpack.Configuration = {
filename: 'assets.json'
}),
new AssetsPlugin({
entrypoints: true,
filename: 'assets.json',
fullPath: false,
fileTypes: ['css'],
includeManifest: true,
includeAllFileTypes: false,
keepInMemory: true,
manifestFirst: true,
path: '/foo/bar',
prettyPrint: true,
processOutput: (assets) => (
'window.assets = ' + JSON.stringify(assets)
),
update: true,
useCompilerPath: true,
metadata: {
meta: 'data'
},

View File

@@ -1,4 +1,4 @@
// Type definitions for assets-webpack-plugin 3.5
// Type definitions for assets-webpack-plugin 3.9
// Project: https://github.com/ztoben/assets-webpack-plugin
// Definitions by: Michael Strobel <https://github.com/kryops>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -16,18 +16,36 @@ declare namespace AssetsWebpackPlugin {
type ProcessOutputFn = (assets: Assets) => string;
interface Options {
/**
* If the "entrypoints" option is given, the output will be limited to the entrypoints and the chunks associated with them.
* false by default
*/
entrypoints?: boolean;
/**
* Name for the created json file.
* "webpack-assets.json" by default
*/
filename?: string;
/**
* When set and "includeAllFileTypes" is set false, only assets matching these types will be included in the assets file.
* ['js', 'css'] by default
*/
fileTypes?: string[];
/**
* If false the output will not include the full path of the generated file.
* true by default
*/
fullPath?: boolean;
/**
* When set false, falls back to the "fileTypes" option array to decide which file types to include in the assets file.
* true by default
*/
includeAllFileTypes?: boolean;
/**
* Inserts the manifest javascript as a text property in your assets.
* Accepts the name of your manifest chunk.
@@ -38,6 +56,19 @@ declare namespace AssetsWebpackPlugin {
*/
includeManifest?: boolean;
/**
* When set the assets file will only be generated in memory while running webpack-dev-server and not written to disk.
* false by default
*/
keepInMemory?: boolean;
/**
* Orders the assets output so that manifest is the first entry.
* This is useful for cases where script tags are generated from the assets json output, and order of import is important.
* false by default
*/
manifestFirst?: boolean;
/**
* Inject metadata into the output file. All values will be injected into the key "metadata"
*/
@@ -66,6 +97,12 @@ declare namespace AssetsWebpackPlugin {
* false by default
*/
update?: boolean;
/**
* Will override the path to use the compiler output path set in your webpack config.
* false by default
*/
useCompilerPath?: boolean;
}
}

View File

@@ -1,4 +1,4 @@
// Type definitions for autoprefixer 9.1
// Type definitions for autoprefixer 9.4
// Project: https://github.com/postcss/autoprefixer
// Definitions by: Armando Meziat <https://github.com/odnamrataizem>, murt <https://github.com/murt>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -15,7 +15,7 @@ declare namespace autoprefixer {
remove?: boolean;
supports?: boolean;
flexbox?: boolean | 'no-2009';
grid?: boolean;
grid?: boolean | 'autoplace' | 'no-autoplace';
stats?: any;
ignoreUnknownVersions?: boolean;
}

View File

@@ -46,7 +46,7 @@ new Awesomplete('input[data-multiple]', {
return Awesomplete.FILTER_CONTAINS(text, input.match(/[^,]*$/)[0]);
},
replace: (text: string) => {
replace(text: string) {
const before = this.input.value.match(/^.+,\s*|/)[0];
this.input.value = `${before}${text}, `;
}

View File

@@ -101,3 +101,50 @@ const thingShadows = new awsIot.thingShadow({
thingShadows.on("timeout", function(thingName: string, clientToken: string) {
});
const jobs = new awsIot.jobs({
keyPath: "",
certPath: "",
caPath: "",
clientId: "",
region: "",
baseReconnectTimeMs: 1000,
protocol: "wss",
port: 443,
host: "",
debug: false
});
jobs.subscribeToJobs("thingname", "operationname", (err, job) => {
console.error("Error", err);
if (err || !job) {
return;
}
console.log("job id", job.id);
console.log("job info", job.document);
console.log("job op", job.operation);
console.log("job status", job.status);
console.log("job status details", job.status.statusDetails);
console.log(
"job status details progress",
job.status.statusDetails.progress
);
job.inProgress({ progress: "1" }, err =>
console.error("Job progress error", err)
);
job.failed({ progress: "2" }, err =>
console.error("Job failed error", err)
);
job.succeeded({ progress: "3" }, err =>
console.error("Job failed error", err)
);
});
jobs.startJobNotifications("thingname", err =>
console.error("Start job notification error", err)
);
jobs.unsubscribeFromJobs("thingname", "operationame", err =>
console.error("Unsubscribe from jobs error", err)
);

View File

@@ -1,4 +1,4 @@
// Type definitions for aws-iot-device-sdk 2.1.0
// Type definitions for aws-iot-device-sdk 2.2.0
// Project: https://github.com/aws/aws-iot-device-sdk-js
// Definitions by: Markus Olsson <https://github.com/niik>
// Margus Lamp <https://github.com/mlamp>
@@ -391,3 +391,115 @@ export class thingShadow extends NodeJS.EventEmitter {
/** Emitted when a different client"s update or delete operation is accepted on the shadow. */
on(event: "foreignStateChange", listener: (thingName: string, operation: "update" | "delete", stateObject: any) => void): this;
}
export interface statusDetails {
progress: string;
}
export interface jobStatus {
status: string;
statusDetails: statusDetails;
}
export interface jobDocument {
[key: string]: any
}
export interface job {
/** Object that contains job execution information and functions for updating job execution status. */
/** Returns the job id. */
id: string;
/**
* The JSON document describing details of the job to be executed eg.
* {
* "operation": "install",
* "otherProperty": "value",
* ...
* }
*/
document: jobDocument;
/**
* Returns the job operation from the job document. Eg. 'install', 'reboot', etc.
*/
operation: string;
/**
* Returns the current job status according to AWS Orchestra.
*/
status: jobStatus;
/**
* Update the status of the job execution to be IN_PROGRESS for the thing associated with the job.
*
* @param statusDetails - optional document describing the status details of the in progress job
* @param callback - function(err) optional callback for when the operation completes, err is null if no error occurred
*/
inProgress(statusDetails?: statusDetails, callback?: (err: Error) => void): void;
/**
* Update the status of the job execution to be FAILED for the thing associated with the job.
*
* @param statusDetails - optional document describing the status details of the in progress job e.g.
* @param callback - function(err) optional callback for when the operation completes, err is null if no error occurred
*/
failed(statusDetails?: statusDetails, callback?: (err: Error) => void): void;
/**
* Update the status of the job execution to be SUCCESS for the thing associated with the job.
*
* @param statusDetails - optional document describing the status details of the in progress job e.g.
* @param callback - function(err) optional callback for when the operation completes, err is null if no error occurred
*/
succeeded(statusDetails?: statusDetails, callback?: (err: Error) => void): void;
}
export class jobs extends device {
/**
* The `jobs` class wraps an instance of the `device` class with additional functionality to
* handle job execution management through the AWS IoT Jobs platform. Arguments in `deviceOptions`
* are the same as those in the device class and the `jobs` class supports all of the
* same events and functions as the `device` class.
*/
constructor(options?: DeviceOptions);
/**
* Subscribes to job execution notifications for the thing named `thingName`. If
* `operationName` is specified then the callback will only be called when a job
* ready for execution contains a property called `operation` in its job document with
* a value matching `operationName`. If `operationName` is omitted then the callback
* will be called for every job ready for execution that does not match another
* `subscribeToJobs` subscription.
*
* @param thingName - name of the Thing to receive job execution notifications
* @param operationName - optionally filter job execution notifications to jobs with a value
* for the `operation` property that matches `operationName
* @param callback - function (err, job) callback for when a job execution is ready for processing or an error occurs
* - `err` a subscription error or an error that occurs when client is disconnecting
* - `job` an object that contains job execution information and functions for updating job execution status.
*/
subscribeToJobs(thingName: string, operationName: string, callback?: (err: Error, job: job) => void): void;
/**
* Causes any existing queued job executions for the given thing to be published
* to the appropriate subscribeToJobs handler. Only needs to be called once per thing.
*
* @param thingName - name of the Thing to cancel job execution notifications for
* @param callback - function (err) callback for when the startJobNotifications operation completes
*/
startJobNotifications(thingName: string, callback: (error: Error) => void): mqtt.Client;
/**
* Unsubscribes from job execution notifications for the thing named `thingName` having
* operations with a value of the given `operationName`. If `operationName` is omitted then
* the default handler for the thing with the given name is unsubscribed.
*
* @param thingName - name of the Thing to cancel job execution notifications for
* @param operationName - optional name of previously subscribed operation names
* @param callback - function (err) callback for when the unsubscribe operation completes
*/
unsubscribeFromJobs(thingName: string, operationName: string, callback: (err: Error) => void): void;
}

View File

@@ -26,6 +26,8 @@
// James Gregory <https://github.com/jagregory>
// Erik Dalén <https://github.com/dalen>
// Loïk Gaonac'h <https://github.com/loikg>
// Roberto Zen <https://github.com/skyzenr>
// Richard Cornelissen <https://github.com/richardcornelissen>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
@@ -34,7 +36,7 @@ export interface APIGatewayEventRequestContext {
accountId: string;
apiId: string;
authorizer?: AuthResponseContext | null;
connectedAt: number;
connectedAt?: number;
connectionId?: string;
domainName?: string;
eventType?: string;
@@ -535,10 +537,10 @@ export type StatementResource = MaybeStatementPrincipal & ({ Resource: string |
export type StatementPrincipal = MaybeStatementResource & ({ Principal: PrincipalValue } | { NotPrincipal: PrincipalValue });
/**
* API Gateway CustomAuthorizer AuthResponse.PolicyDocument.Statement.
* http://docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.html#api-gateway-custom-authorizer-output
* https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-lambda-authorizer-output.html
*/
export interface AuthResponseContext {
[name: string]: any;
[name: string]: boolean | number | string;
}
/**

View File

@@ -53,6 +53,12 @@ traverse(ast, {
}
});
// Node type checks
t.isIdentifier(t.identifier("id"));
t.isIdentifier(exp);
t.isIdentifier(null);
t.isIdentifier(undefined);
// TypeScript Types
// TODO: Test all variants of these functions' signatures

View File

@@ -1514,246 +1514,246 @@ export function TSUndefinedKeyword(): TSUndefinedKeyword;
export function TSUnionType(types: TSType[]): TSUnionType;
export function TSVoidKeyword(): TSVoidKeyword;
export function isArrayExpression(node: object, opts?: object): node is ArrayExpression;
export function isAssignmentExpression(node: object, opts?: object): node is AssignmentExpression;
export function isBinaryExpression(node: object, opts?: object): node is BinaryExpression;
export function isDirective(node: object, opts?: object): node is Directive;
export function isDirectiveLiteral(node: object, opts?: object): node is DirectiveLiteral;
export function isBlockStatement(node: object, opts?: object): node is BlockStatement;
export function isBreakStatement(node: object, opts?: object): node is BreakStatement;
export function isCallExpression(node: object, opts?: object): node is CallExpression;
export function isCatchClause(node: object, opts?: object): node is CatchClause;
export function isConditionalExpression(node: object, opts?: object): node is ConditionalExpression;
export function isContinueStatement(node: object, opts?: object): node is ContinueStatement;
export function isDebuggerStatement(node: object, opts?: object): node is DebuggerStatement;
export function isDoWhileStatement(node: object, opts?: object): node is DoWhileStatement;
export function isEmptyStatement(node: object, opts?: object): node is EmptyStatement;
export function isExpressionStatement(node: object, opts?: object): node is ExpressionStatement;
export function isFile(node: object, opts?: object): node is File;
export function isForInStatement(node: object, opts?: object): node is ForInStatement;
export function isForStatement(node: object, opts?: object): node is ForStatement;
export function isFunctionDeclaration(node: object, opts?: object): node is FunctionDeclaration;
export function isFunctionExpression(node: object, opts?: object): node is FunctionExpression;
export function isIdentifier(node: object, opts?: object): node is Identifier;
export function isIfStatement(node: object, opts?: object): node is IfStatement;
export function isLabeledStatement(node: object, opts?: object): node is LabeledStatement;
export function isStringLiteral(node: object, opts?: object): node is StringLiteral;
export function isNumericLiteral(node: object, opts?: object): node is NumericLiteral;
export function isNullLiteral(node: object, opts?: object): node is NullLiteral;
export function isBooleanLiteral(node: object, opts?: object): node is BooleanLiteral;
export function isRegExpLiteral(node: object, opts?: object): node is RegExpLiteral;
export function isLogicalExpression(node: object, opts?: object): node is LogicalExpression;
export function isMemberExpression(node: object, opts?: object): node is MemberExpression;
export function isNewExpression(node: object, opts?: object): node is NewExpression;
export function isProgram(node: object, opts?: object): node is Program;
export function isObjectExpression(node: object, opts?: object): node is ObjectExpression;
export function isObjectMethod(node: object, opts?: object): node is ObjectMethod;
export function isObjectProperty(node: object, opts?: object): node is ObjectProperty;
export function isRestElement(node: object, opts?: object): node is RestElement;
export function isReturnStatement(node: object, opts?: object): node is ReturnStatement;
export function isSequenceExpression(node: object, opts?: object): node is SequenceExpression;
export function isSwitchCase(node: object, opts?: object): node is SwitchCase;
export function isSwitchStatement(node: object, opts?: object): node is SwitchStatement;
export function isThisExpression(node: object, opts?: object): node is ThisExpression;
export function isThrowStatement(node: object, opts?: object): node is ThrowStatement;
export function isTryStatement(node: object, opts?: object): node is TryStatement;
export function isUnaryExpression(node: object, opts?: object): node is UnaryExpression;
export function isUpdateExpression(node: object, opts?: object): node is UpdateExpression;
export function isVariableDeclaration(node: object, opts?: object): node is VariableDeclaration;
export function isVariableDeclarator(node: object, opts?: object): node is VariableDeclarator;
export function isWhileStatement(node: object, opts?: object): node is WhileStatement;
export function isWithStatement(node: object, opts?: object): node is WithStatement;
export function isAssignmentPattern(node: object, opts?: object): node is AssignmentPattern;
export function isArrayPattern(node: object, opts?: object): node is ArrayPattern;
export function isArrowFunctionExpression(node: object, opts?: object): node is ArrowFunctionExpression;
export function isClassBody(node: object, opts?: object): node is ClassBody;
export function isClassDeclaration(node: object, opts?: object): node is ClassDeclaration;
export function isClassExpression(node: object, opts?: object): node is ClassExpression;
export function isExportAllDeclaration(node: object, opts?: object): node is ExportAllDeclaration;
export function isExportDefaultDeclaration(node: object, opts?: object): node is ExportDefaultDeclaration;
export function isExportNamedDeclaration(node: object, opts?: object): node is ExportNamedDeclaration;
export function isExportSpecifier(node: object, opts?: object): node is ExportSpecifier;
export function isForOfStatement(node: object, opts?: object): node is ForOfStatement;
export function isImportDeclaration(node: object, opts?: object): node is ImportDeclaration;
export function isImportDefaultSpecifier(node: object, opts?: object): node is ImportDefaultSpecifier;
export function isImportNamespaceSpecifier(node: object, opts?: object): node is ImportNamespaceSpecifier;
export function isImportSpecifier(node: object, opts?: object): node is ImportSpecifier;
export function isMetaProperty(node: object, opts?: object): node is MetaProperty;
export function isClassMethod(node: object, opts?: object): node is ClassMethod;
export function isObjectPattern(node: object, opts?: object): node is ObjectPattern;
export function isSpreadElement(node: object, opts?: object): node is SpreadElement;
export function isSuper(node: object, opts?: object): node is Super;
export function isTaggedTemplateExpression(node: object, opts?: object): node is TaggedTemplateExpression;
export function isTemplateElement(node: object, opts?: object): node is TemplateElement;
export function isTemplateLiteral(node: object, opts?: object): node is TemplateLiteral;
export function isYieldExpression(node: object, opts?: object): node is YieldExpression;
export function isAnyTypeAnnotation(node: object, opts?: object): node is AnyTypeAnnotation;
export function isArrayTypeAnnotation(node: object, opts?: object): node is ArrayTypeAnnotation;
export function isBooleanTypeAnnotation(node: object, opts?: object): node is BooleanTypeAnnotation;
export function isBooleanLiteralTypeAnnotation(node: object, opts?: object): node is BooleanLiteralTypeAnnotation;
export function isNullLiteralTypeAnnotation(node: object, opts?: object): node is NullLiteralTypeAnnotation;
export function isClassImplements(node: object, opts?: object): node is ClassImplements;
export function isClassProperty(node: object, opts?: object): node is ClassProperty;
export function isDeclareClass(node: object, opts?: object): node is DeclareClass;
export function isDeclareFunction(node: object, opts?: object): node is DeclareFunction;
export function isDeclareInterface(node: object, opts?: object): node is DeclareInterface;
export function isDeclareModule(node: object, opts?: object): node is DeclareModule;
export function isDeclareTypeAlias(node: object, opts?: object): node is DeclareTypeAlias;
export function isDeclareVariable(node: object, opts?: object): node is DeclareVariable;
export function isExistentialTypeParam(node: object, opts?: object): node is ExistentialTypeParam;
export function isFunctionTypeAnnotation(node: object, opts?: object): node is FunctionTypeAnnotation;
export function isFunctionTypeParam(node: object, opts?: object): node is FunctionTypeParam;
export function isGenericTypeAnnotation(node: object, opts?: object): node is GenericTypeAnnotation;
export function isInterfaceExtends(node: object, opts?: object): node is InterfaceExtends;
export function isInterfaceDeclaration(node: object, opts?: object): node is InterfaceDeclaration;
export function isIntersectionTypeAnnotation(node: object, opts?: object): node is IntersectionTypeAnnotation;
export function isMixedTypeAnnotation(node: object, opts?: object): node is MixedTypeAnnotation;
export function isNullableTypeAnnotation(node: object, opts?: object): node is NullableTypeAnnotation;
export function isNumericLiteralTypeAnnotation(node: object, opts?: object): node is NumericLiteralTypeAnnotation;
export function isNumberTypeAnnotation(node: object, opts?: object): node is NumberTypeAnnotation;
export function isStringLiteralTypeAnnotation(node: object, opts?: object): node is StringLiteralTypeAnnotation;
export function isStringTypeAnnotation(node: object, opts?: object): node is StringTypeAnnotation;
export function isThisTypeAnnotation(node: object, opts?: object): node is ThisTypeAnnotation;
export function isTupleTypeAnnotation(node: object, opts?: object): node is TupleTypeAnnotation;
export function isTypeofTypeAnnotation(node: object, opts?: object): node is TypeofTypeAnnotation;
export function isTypeAlias(node: object, opts?: object): node is TypeAlias;
export function isTypeAnnotation(node: object, opts?: object): node is TypeAnnotation;
export function isTypeCastExpression(node: object, opts?: object): node is TypeCastExpression;
export function isTypeParameter(node: object, opts?: object): node is TypeParameter;
export function isTypeParameterDeclaration(node: object, opts?: object): node is TypeParameterDeclaration;
export function isTypeParameterInstantiation(node: object, opts?: object): node is TypeParameterInstantiation;
export function isObjectTypeAnnotation(node: object, opts?: object): node is ObjectTypeAnnotation;
export function isObjectTypeCallProperty(node: object, opts?: object): node is ObjectTypeCallProperty;
export function isObjectTypeIndexer(node: object, opts?: object): node is ObjectTypeIndexer;
export function isObjectTypeProperty(node: object, opts?: object): node is ObjectTypeProperty;
export function isQualifiedTypeIdentifier(node: object, opts?: object): node is QualifiedTypeIdentifier;
export function isUnionTypeAnnotation(node: object, opts?: object): node is UnionTypeAnnotation;
export function isVoidTypeAnnotation(node: object, opts?: object): node is VoidTypeAnnotation;
export function isJSXAttribute(node: object, opts?: object): node is JSXAttribute;
export function isJSXClosingElement(node: object, opts?: object): node is JSXClosingElement;
export function isJSXElement(node: object, opts?: object): node is JSXElement;
export function isJSXEmptyExpression(node: object, opts?: object): node is JSXEmptyExpression;
export function isJSXExpressionContainer(node: object, opts?: object): node is JSXExpressionContainer;
export function isJSXIdentifier(node: object, opts?: object): node is JSXIdentifier;
export function isJSXMemberExpression(node: object, opts?: object): node is JSXMemberExpression;
export function isJSXNamespacedName(node: object, opts?: object): node is JSXNamespacedName;
export function isJSXOpeningElement(node: object, opts?: object): node is JSXOpeningElement;
export function isJSXSpreadAttribute(node: object, opts?: object): node is JSXSpreadAttribute;
export function isJSXText(node: object, opts?: object): node is JSXText;
export function isNoop(node: object, opts?: object): node is Noop;
export function isParenthesizedExpression(node: object, opts?: object): node is ParenthesizedExpression;
export function isAwaitExpression(node: object, opts?: object): node is AwaitExpression;
export function isBindExpression(node: object, opts?: object): node is BindExpression;
export function isDecorator(node: object, opts?: object): node is Decorator;
export function isDoExpression(node: object, opts?: object): node is DoExpression;
export function isExportDefaultSpecifier(node: object, opts?: object): node is ExportDefaultSpecifier;
export function isExportNamespaceSpecifier(node: object, opts?: object): node is ExportNamespaceSpecifier;
export function isRestProperty(node: object, opts?: object): node is RestProperty;
export function isSpreadProperty(node: object, opts?: object): node is SpreadProperty;
export function isExpression(node: object, opts?: object): node is Expression;
export function isBinary(node: object, opts?: object): node is Binary;
export function isScopable(node: object, opts?: object): node is Scopable;
export function isBlockParent(node: object, opts?: object): node is BlockParent;
export function isBlock(node: object, opts?: object): node is Block;
export function isStatement(node: object, opts?: object): node is Statement;
export function isTerminatorless(node: object, opts?: object): node is Terminatorless;
export function isCompletionStatement(node: object, opts?: object): node is CompletionStatement;
export function isConditional(node: object, opts?: object): node is Conditional;
export function isLoop(node: object, opts?: object): node is Loop;
export function isWhile(node: object, opts?: object): node is While;
export function isExpressionWrapper(node: object, opts?: object): node is ExpressionWrapper;
export function isFor(node: object, opts?: object): node is For;
export function isForXStatement(node: object, opts?: object): node is ForXStatement;
export function isArrayExpression(node: object | null | undefined, opts?: object): node is ArrayExpression;
export function isAssignmentExpression(node: object | null | undefined, opts?: object): node is AssignmentExpression;
export function isBinaryExpression(node: object | null | undefined, opts?: object): node is BinaryExpression;
export function isDirective(node: object | null | undefined, opts?: object): node is Directive;
export function isDirectiveLiteral(node: object | null | undefined, opts?: object): node is DirectiveLiteral;
export function isBlockStatement(node: object | null | undefined, opts?: object): node is BlockStatement;
export function isBreakStatement(node: object | null | undefined, opts?: object): node is BreakStatement;
export function isCallExpression(node: object | null | undefined, opts?: object): node is CallExpression;
export function isCatchClause(node: object | null | undefined, opts?: object): node is CatchClause;
export function isConditionalExpression(node: object | null | undefined, opts?: object): node is ConditionalExpression;
export function isContinueStatement(node: object | null | undefined, opts?: object): node is ContinueStatement;
export function isDebuggerStatement(node: object | null | undefined, opts?: object): node is DebuggerStatement;
export function isDoWhileStatement(node: object | null | undefined, opts?: object): node is DoWhileStatement;
export function isEmptyStatement(node: object | null | undefined, opts?: object): node is EmptyStatement;
export function isExpressionStatement(node: object | null | undefined, opts?: object): node is ExpressionStatement;
export function isFile(node: object | null | undefined, opts?: object): node is File;
export function isForInStatement(node: object | null | undefined, opts?: object): node is ForInStatement;
export function isForStatement(node: object | null | undefined, opts?: object): node is ForStatement;
export function isFunctionDeclaration(node: object | null | undefined, opts?: object): node is FunctionDeclaration;
export function isFunctionExpression(node: object | null | undefined, opts?: object): node is FunctionExpression;
export function isIdentifier(node: object | null | undefined, opts?: object): node is Identifier;
export function isIfStatement(node: object | null | undefined, opts?: object): node is IfStatement;
export function isLabeledStatement(node: object | null | undefined, opts?: object): node is LabeledStatement;
export function isStringLiteral(node: object | null | undefined, opts?: object): node is StringLiteral;
export function isNumericLiteral(node: object | null | undefined, opts?: object): node is NumericLiteral;
export function isNullLiteral(node: object | null | undefined, opts?: object): node is NullLiteral;
export function isBooleanLiteral(node: object | null | undefined, opts?: object): node is BooleanLiteral;
export function isRegExpLiteral(node: object | null | undefined, opts?: object): node is RegExpLiteral;
export function isLogicalExpression(node: object | null | undefined, opts?: object): node is LogicalExpression;
export function isMemberExpression(node: object | null | undefined, opts?: object): node is MemberExpression;
export function isNewExpression(node: object | null | undefined, opts?: object): node is NewExpression;
export function isProgram(node: object | null | undefined, opts?: object): node is Program;
export function isObjectExpression(node: object | null | undefined, opts?: object): node is ObjectExpression;
export function isObjectMethod(node: object | null | undefined, opts?: object): node is ObjectMethod;
export function isObjectProperty(node: object | null | undefined, opts?: object): node is ObjectProperty;
export function isRestElement(node: object | null | undefined, opts?: object): node is RestElement;
export function isReturnStatement(node: object | null | undefined, opts?: object): node is ReturnStatement;
export function isSequenceExpression(node: object | null | undefined, opts?: object): node is SequenceExpression;
export function isSwitchCase(node: object | null | undefined, opts?: object): node is SwitchCase;
export function isSwitchStatement(node: object | null | undefined, opts?: object): node is SwitchStatement;
export function isThisExpression(node: object | null | undefined, opts?: object): node is ThisExpression;
export function isThrowStatement(node: object | null | undefined, opts?: object): node is ThrowStatement;
export function isTryStatement(node: object | null | undefined, opts?: object): node is TryStatement;
export function isUnaryExpression(node: object | null | undefined, opts?: object): node is UnaryExpression;
export function isUpdateExpression(node: object | null | undefined, opts?: object): node is UpdateExpression;
export function isVariableDeclaration(node: object | null | undefined, opts?: object): node is VariableDeclaration;
export function isVariableDeclarator(node: object | null | undefined, opts?: object): node is VariableDeclarator;
export function isWhileStatement(node: object | null | undefined, opts?: object): node is WhileStatement;
export function isWithStatement(node: object | null | undefined, opts?: object): node is WithStatement;
export function isAssignmentPattern(node: object | null | undefined, opts?: object): node is AssignmentPattern;
export function isArrayPattern(node: object | null | undefined, opts?: object): node is ArrayPattern;
export function isArrowFunctionExpression(node: object | null | undefined, opts?: object): node is ArrowFunctionExpression;
export function isClassBody(node: object | null | undefined, opts?: object): node is ClassBody;
export function isClassDeclaration(node: object | null | undefined, opts?: object): node is ClassDeclaration;
export function isClassExpression(node: object | null | undefined, opts?: object): node is ClassExpression;
export function isExportAllDeclaration(node: object | null | undefined, opts?: object): node is ExportAllDeclaration;
export function isExportDefaultDeclaration(node: object | null | undefined, opts?: object): node is ExportDefaultDeclaration;
export function isExportNamedDeclaration(node: object | null | undefined, opts?: object): node is ExportNamedDeclaration;
export function isExportSpecifier(node: object | null | undefined, opts?: object): node is ExportSpecifier;
export function isForOfStatement(node: object | null | undefined, opts?: object): node is ForOfStatement;
export function isImportDeclaration(node: object | null | undefined, opts?: object): node is ImportDeclaration;
export function isImportDefaultSpecifier(node: object | null | undefined, opts?: object): node is ImportDefaultSpecifier;
export function isImportNamespaceSpecifier(node: object | null | undefined, opts?: object): node is ImportNamespaceSpecifier;
export function isImportSpecifier(node: object | null | undefined, opts?: object): node is ImportSpecifier;
export function isMetaProperty(node: object | null | undefined, opts?: object): node is MetaProperty;
export function isClassMethod(node: object | null | undefined, opts?: object): node is ClassMethod;
export function isObjectPattern(node: object | null | undefined, opts?: object): node is ObjectPattern;
export function isSpreadElement(node: object | null | undefined, opts?: object): node is SpreadElement;
export function isSuper(node: object | null | undefined, opts?: object): node is Super;
export function isTaggedTemplateExpression(node: object | null | undefined, opts?: object): node is TaggedTemplateExpression;
export function isTemplateElement(node: object | null | undefined, opts?: object): node is TemplateElement;
export function isTemplateLiteral(node: object | null | undefined, opts?: object): node is TemplateLiteral;
export function isYieldExpression(node: object | null | undefined, opts?: object): node is YieldExpression;
export function isAnyTypeAnnotation(node: object | null | undefined, opts?: object): node is AnyTypeAnnotation;
export function isArrayTypeAnnotation(node: object | null | undefined, opts?: object): node is ArrayTypeAnnotation;
export function isBooleanTypeAnnotation(node: object | null | undefined, opts?: object): node is BooleanTypeAnnotation;
export function isBooleanLiteralTypeAnnotation(node: object | null | undefined, opts?: object): node is BooleanLiteralTypeAnnotation;
export function isNullLiteralTypeAnnotation(node: object | null | undefined, opts?: object): node is NullLiteralTypeAnnotation;
export function isClassImplements(node: object | null | undefined, opts?: object): node is ClassImplements;
export function isClassProperty(node: object | null | undefined, opts?: object): node is ClassProperty;
export function isDeclareClass(node: object | null | undefined, opts?: object): node is DeclareClass;
export function isDeclareFunction(node: object | null | undefined, opts?: object): node is DeclareFunction;
export function isDeclareInterface(node: object | null | undefined, opts?: object): node is DeclareInterface;
export function isDeclareModule(node: object | null | undefined, opts?: object): node is DeclareModule;
export function isDeclareTypeAlias(node: object | null | undefined, opts?: object): node is DeclareTypeAlias;
export function isDeclareVariable(node: object | null | undefined, opts?: object): node is DeclareVariable;
export function isExistentialTypeParam(node: object | null | undefined, opts?: object): node is ExistentialTypeParam;
export function isFunctionTypeAnnotation(node: object | null | undefined, opts?: object): node is FunctionTypeAnnotation;
export function isFunctionTypeParam(node: object | null | undefined, opts?: object): node is FunctionTypeParam;
export function isGenericTypeAnnotation(node: object | null | undefined, opts?: object): node is GenericTypeAnnotation;
export function isInterfaceExtends(node: object | null | undefined, opts?: object): node is InterfaceExtends;
export function isInterfaceDeclaration(node: object | null | undefined, opts?: object): node is InterfaceDeclaration;
export function isIntersectionTypeAnnotation(node: object | null | undefined, opts?: object): node is IntersectionTypeAnnotation;
export function isMixedTypeAnnotation(node: object | null | undefined, opts?: object): node is MixedTypeAnnotation;
export function isNullableTypeAnnotation(node: object | null | undefined, opts?: object): node is NullableTypeAnnotation;
export function isNumericLiteralTypeAnnotation(node: object | null | undefined, opts?: object): node is NumericLiteralTypeAnnotation;
export function isNumberTypeAnnotation(node: object | null | undefined, opts?: object): node is NumberTypeAnnotation;
export function isStringLiteralTypeAnnotation(node: object | null | undefined, opts?: object): node is StringLiteralTypeAnnotation;
export function isStringTypeAnnotation(node: object | null | undefined, opts?: object): node is StringTypeAnnotation;
export function isThisTypeAnnotation(node: object | null | undefined, opts?: object): node is ThisTypeAnnotation;
export function isTupleTypeAnnotation(node: object | null | undefined, opts?: object): node is TupleTypeAnnotation;
export function isTypeofTypeAnnotation(node: object | null | undefined, opts?: object): node is TypeofTypeAnnotation;
export function isTypeAlias(node: object | null | undefined, opts?: object): node is TypeAlias;
export function isTypeAnnotation(node: object | null | undefined, opts?: object): node is TypeAnnotation;
export function isTypeCastExpression(node: object | null | undefined, opts?: object): node is TypeCastExpression;
export function isTypeParameter(node: object | null | undefined, opts?: object): node is TypeParameter;
export function isTypeParameterDeclaration(node: object | null | undefined, opts?: object): node is TypeParameterDeclaration;
export function isTypeParameterInstantiation(node: object | null | undefined, opts?: object): node is TypeParameterInstantiation;
export function isObjectTypeAnnotation(node: object | null | undefined, opts?: object): node is ObjectTypeAnnotation;
export function isObjectTypeCallProperty(node: object | null | undefined, opts?: object): node is ObjectTypeCallProperty;
export function isObjectTypeIndexer(node: object | null | undefined, opts?: object): node is ObjectTypeIndexer;
export function isObjectTypeProperty(node: object | null | undefined, opts?: object): node is ObjectTypeProperty;
export function isQualifiedTypeIdentifier(node: object | null | undefined, opts?: object): node is QualifiedTypeIdentifier;
export function isUnionTypeAnnotation(node: object | null | undefined, opts?: object): node is UnionTypeAnnotation;
export function isVoidTypeAnnotation(node: object | null | undefined, opts?: object): node is VoidTypeAnnotation;
export function isJSXAttribute(node: object | null | undefined, opts?: object): node is JSXAttribute;
export function isJSXClosingElement(node: object | null | undefined, opts?: object): node is JSXClosingElement;
export function isJSXElement(node: object | null | undefined, opts?: object): node is JSXElement;
export function isJSXEmptyExpression(node: object | null | undefined, opts?: object): node is JSXEmptyExpression;
export function isJSXExpressionContainer(node: object | null | undefined, opts?: object): node is JSXExpressionContainer;
export function isJSXIdentifier(node: object | null | undefined, opts?: object): node is JSXIdentifier;
export function isJSXMemberExpression(node: object | null | undefined, opts?: object): node is JSXMemberExpression;
export function isJSXNamespacedName(node: object | null | undefined, opts?: object): node is JSXNamespacedName;
export function isJSXOpeningElement(node: object | null | undefined, opts?: object): node is JSXOpeningElement;
export function isJSXSpreadAttribute(node: object | null | undefined, opts?: object): node is JSXSpreadAttribute;
export function isJSXText(node: object | null | undefined, opts?: object): node is JSXText;
export function isNoop(node: object | null | undefined, opts?: object): node is Noop;
export function isParenthesizedExpression(node: object | null | undefined, opts?: object): node is ParenthesizedExpression;
export function isAwaitExpression(node: object | null | undefined, opts?: object): node is AwaitExpression;
export function isBindExpression(node: object | null | undefined, opts?: object): node is BindExpression;
export function isDecorator(node: object | null | undefined, opts?: object): node is Decorator;
export function isDoExpression(node: object | null | undefined, opts?: object): node is DoExpression;
export function isExportDefaultSpecifier(node: object | null | undefined, opts?: object): node is ExportDefaultSpecifier;
export function isExportNamespaceSpecifier(node: object | null | undefined, opts?: object): node is ExportNamespaceSpecifier;
export function isRestProperty(node: object | null | undefined, opts?: object): node is RestProperty;
export function isSpreadProperty(node: object | null | undefined, opts?: object): node is SpreadProperty;
export function isExpression(node: object | null | undefined, opts?: object): node is Expression;
export function isBinary(node: object | null | undefined, opts?: object): node is Binary;
export function isScopable(node: object | null | undefined, opts?: object): node is Scopable;
export function isBlockParent(node: object | null | undefined, opts?: object): node is BlockParent;
export function isBlock(node: object | null | undefined, opts?: object): node is Block;
export function isStatement(node: object | null | undefined, opts?: object): node is Statement;
export function isTerminatorless(node: object | null | undefined, opts?: object): node is Terminatorless;
export function isCompletionStatement(node: object | null | undefined, opts?: object): node is CompletionStatement;
export function isConditional(node: object | null | undefined, opts?: object): node is Conditional;
export function isLoop(node: object | null | undefined, opts?: object): node is Loop;
export function isWhile(node: object | null | undefined, opts?: object): node is While;
export function isExpressionWrapper(node: object | null | undefined, opts?: object): node is ExpressionWrapper;
export function isFor(node: object | null | undefined, opts?: object): node is For;
export function isForXStatement(node: object | null | undefined, opts?: object): node is ForXStatement;
// tslint:disable-next-line ban-types
export function isFunction(node: object, opts?: object): node is Function;
export function isFunctionParent(node: object, opts?: object): node is FunctionParent;
export function isPureish(node: object, opts?: object): node is Pureish;
export function isDeclaration(node: object, opts?: object): node is Declaration;
export function isLVal(node: object, opts?: object): node is LVal;
export function isLiteral(node: object, opts?: object): node is Literal;
export function isImmutable(node: object, opts?: object): node is Immutable;
export function isUserWhitespacable(node: object, opts?: object): node is UserWhitespacable;
export function isMethod(node: object, opts?: object): node is Method;
export function isObjectMember(node: object, opts?: object): node is ObjectMember;
export function isProperty(node: object, opts?: object): node is Property;
export function isUnaryLike(node: object, opts?: object): node is UnaryLike;
export function isPattern(node: object, opts?: object): node is Pattern;
export function isClass(node: object, opts?: object): node is Class;
export function isModuleDeclaration(node: object, opts?: object): node is ModuleDeclaration;
export function isExportDeclaration(node: object, opts?: object): node is ExportDeclaration;
export function isModuleSpecifier(node: object, opts?: object): node is ModuleSpecifier;
export function isFlow(node: object, opts?: object): node is Flow;
export function isFlowBaseAnnotation(node: object, opts?: object): node is FlowBaseAnnotation;
export function isFlowDeclaration(node: object, opts?: object): node is FlowDeclaration;
export function isJSX(node: object, opts?: object): node is JSX;
export function isNumberLiteral(node: object, opts?: object): node is NumericLiteral;
export function isRegexLiteral(node: object, opts?: object): node is RegExpLiteral;
export function isFunction(node: object | null | undefined, opts?: object): node is Function;
export function isFunctionParent(node: object | null | undefined, opts?: object): node is FunctionParent;
export function isPureish(node: object | null | undefined, opts?: object): node is Pureish;
export function isDeclaration(node: object | null | undefined, opts?: object): node is Declaration;
export function isLVal(node: object | null | undefined, opts?: object): node is LVal;
export function isLiteral(node: object | null | undefined, opts?: object): node is Literal;
export function isImmutable(node: object | null | undefined, opts?: object): node is Immutable;
export function isUserWhitespacable(node: object | null | undefined, opts?: object): node is UserWhitespacable;
export function isMethod(node: object | null | undefined, opts?: object): node is Method;
export function isObjectMember(node: object | null | undefined, opts?: object): node is ObjectMember;
export function isProperty(node: object | null | undefined, opts?: object): node is Property;
export function isUnaryLike(node: object | null | undefined, opts?: object): node is UnaryLike;
export function isPattern(node: object | null | undefined, opts?: object): node is Pattern;
export function isClass(node: object | null | undefined, opts?: object): node is Class;
export function isModuleDeclaration(node: object | null | undefined, opts?: object): node is ModuleDeclaration;
export function isExportDeclaration(node: object | null | undefined, opts?: object): node is ExportDeclaration;
export function isModuleSpecifier(node: object | null | undefined, opts?: object): node is ModuleSpecifier;
export function isFlow(node: object | null | undefined, opts?: object): node is Flow;
export function isFlowBaseAnnotation(node: object | null | undefined, opts?: object): node is FlowBaseAnnotation;
export function isFlowDeclaration(node: object | null | undefined, opts?: object): node is FlowDeclaration;
export function isJSX(node: object | null | undefined, opts?: object): node is JSX;
export function isNumberLiteral(node: object | null | undefined, opts?: object): node is NumericLiteral;
export function isRegexLiteral(node: object | null | undefined, opts?: object): node is RegExpLiteral;
export function isReferencedIdentifier(node: object, opts?: object): node is Identifier | JSXIdentifier;
export function isReferencedMemberExpression(node: object, opts?: object): node is MemberExpression;
export function isBindingIdentifier(node: object, opts?: object): node is Identifier;
export function isScope(node: object, opts?: object): node is Scopable;
export function isReferenced(node: object, opts?: object): boolean;
export function isBlockScoped(node: object, opts?: object): node is FunctionDeclaration | ClassDeclaration | VariableDeclaration;
export function isVar(node: object, opts?: object): node is VariableDeclaration;
export function isUser(node: object, opts?: object): boolean;
export function isGenerated(node: object, opts?: object): boolean;
export function isPure(node: object, opts?: object): boolean;
export function isReferencedIdentifier(node: object | null | undefined, opts?: object): node is Identifier | JSXIdentifier;
export function isReferencedMemberExpression(node: object | null | undefined, opts?: object): node is MemberExpression;
export function isBindingIdentifier(node: object | null | undefined, opts?: object): node is Identifier;
export function isScope(node: object | null | undefined, opts?: object): node is Scopable;
export function isReferenced(node: object | null | undefined, opts?: object): boolean;
export function isBlockScoped(node: object | null | undefined, opts?: object): node is FunctionDeclaration | ClassDeclaration | VariableDeclaration;
export function isVar(node: object | null | undefined, opts?: object): node is VariableDeclaration;
export function isUser(node: object | null | undefined, opts?: object): boolean;
export function isGenerated(node: object | null | undefined, opts?: object): boolean;
export function isPure(node: object | null | undefined, opts?: object): boolean;
export function isTSAnyKeyword(node: object, opts?: object): node is TSAnyKeyword;
export function isTSArrayType(node: object, opts?: object): node is TSArrayType;
export function isTSAsExpression(node: object, opts?: object): node is TSAsExpression;
export function isTSBooleanKeyword(node: object, opts?: object): node is TSBooleanKeyword;
export function isTSCallSignatureDeclaration(node: object, opts?: object): node is TSCallSignatureDeclaration;
export function isTSConstructSignatureDeclaration(node: object, opts?: object): node is TSTypeElement;
export function isTSConstructorType(node: object, opts?: object): node is TSConstructorType;
export function isTSDeclareFunction(node: object, opts?: object): node is TSDeclareFunction;
export function isTSDeclareMethod(node: object, opts?: object): node is TSDeclareMethod;
export function isTSEnumDeclaration(node: object, opts?: object): node is TSEnumDeclaration;
export function isTSEnumMember(node: object, opts?: object): node is TSEnumMember;
export function isTSExportAssignment(node: object, opts?: object): node is TSExportAssignment;
export function isTSExpressionWithTypeArguments(node: object, opts?: object): node is TSExpressionWithTypeArguments;
export function isTSExternalModuleReference(node: object, opts?: object): node is TSExternalModuleReference;
export function isTSFunctionType(node: object, opts?: object): node is TSFunctionType;
export function isTSImportEqualsDeclaration(node: object, opts?: object): node is TSImportEqualsDeclaration;
export function isTSIndexSignature(node: object, opts?: object): node is TSIndexSignature;
export function isTSIndexedAccessType(node: object, opts?: object): node is TSIndexedAccessType;
export function isTSInterfaceBody(node: object, opts?: object): node is TSInterfaceBody;
export function isTSInterfaceDeclaration(node: object, opts?: object): node is TSInterfaceDeclaration;
export function isTSIntersectionType(node: object, opts?: object): node is TSIntersectionType;
export function isTSLiteralType(node: object, opts?: object): node is TSLiteralType;
export function isTSMappedType(node: object, opts?: object): node is TSMappedType;
export function isTSMethodSignature(node: object, opts?: object): node is TSMethodSignature;
export function isTSModuleBlock(node: object, opts?: object): node is TSModuleBlock;
export function isTSModuleDeclaration(node: object, opts?: object): node is TSModuleDeclaration;
export function isTSNamespaceExportDeclaration(node: object, opts?: object): node is TSNamespaceExportDeclaration;
export function isTSNeverKeyword(node: object, opts?: object): node is TSNeverKeyword;
export function isTSNonNullExpression(node: object, opts?: object): node is TSNonNullExpression;
export function isTSNullKeyword(node: object, opts?: object): node is TSNullKeyword;
export function isTSNumberKeyword(node: object, opts?: object): node is TSNumberKeyword;
export function isTSObjectKeyword(node: object, opts?: object): node is TSObjectKeyword;
export function isTSParameterProperty(node: object, opts?: object): node is TSParameterProperty;
export function isTSParenthesizedType(node: object, opts?: object): node is TSParenthesizedType;
export function isTSPropertySignature(node: object, opts?: object): node is TSPropertySignature;
export function isTSQualifiedName(node: object, opts?: object): node is TSQualifiedName;
export function isTSStringKeyword(node: object, opts?: object): node is TSStringKeyword;
export function isTSSymbolKeyword(node: object, opts?: object): node is TSSymbolKeyword;
export function isTSThisType(node: object, opts?: object): node is TSThisType;
export function isTSTupleType(node: object, opts?: object): node is TSTupleType;
export function isTSTypeAliasDeclaration(node: object, opts?: object): node is TSTypeAliasDeclaration;
export function isTSTypeAnnotation(node: object, opts?: object): node is TSTypeAnnotation;
export function isTSTypeAssertion(node: object, opts?: object): node is TSTypeAssertion;
export function isTSTypeLiteral(node: object, opts?: object): node is TSTypeLiteral;
export function isTSTypeOperator(node: object, opts?: object): node is TSTypeOperator;
export function isTSTypeParameter(node: object, opts?: object): node is TSTypeParameter;
export function isTSTypeParameterDeclaration(node: object, opts?: object): node is TSTypeParameterDeclaration;
export function isTSTypeParameterInstantiation(node: object, opts?: object): node is TSTypeParameterInstantiation;
export function isTSTypePredicate(node: object, opts?: object): node is TSTypePredicate;
export function isTSTypeQuery(node: object, opts?: object): node is TSTypeQuery;
export function isTSTypeReference(node: object, opts?: object): node is TSTypeReference;
export function isTSUndefinedKeyword(node: object, opts?: object): node is TSUndefinedKeyword;
export function isTSUnionType(node: object, opts?: object): node is TSUnionType;
export function isTSVoidKeyword(node: object, opts?: object): node is TSVoidKeyword;
export function isTSAnyKeyword(node: object | null | undefined, opts?: object): node is TSAnyKeyword;
export function isTSArrayType(node: object | null | undefined, opts?: object): node is TSArrayType;
export function isTSAsExpression(node: object | null | undefined, opts?: object): node is TSAsExpression;
export function isTSBooleanKeyword(node: object | null | undefined, opts?: object): node is TSBooleanKeyword;
export function isTSCallSignatureDeclaration(node: object | null | undefined, opts?: object): node is TSCallSignatureDeclaration;
export function isTSConstructSignatureDeclaration(node: object | null | undefined, opts?: object): node is TSTypeElement;
export function isTSConstructorType(node: object | null | undefined, opts?: object): node is TSConstructorType;
export function isTSDeclareFunction(node: object | null | undefined, opts?: object): node is TSDeclareFunction;
export function isTSDeclareMethod(node: object | null | undefined, opts?: object): node is TSDeclareMethod;
export function isTSEnumDeclaration(node: object | null | undefined, opts?: object): node is TSEnumDeclaration;
export function isTSEnumMember(node: object | null | undefined, opts?: object): node is TSEnumMember;
export function isTSExportAssignment(node: object | null | undefined, opts?: object): node is TSExportAssignment;
export function isTSExpressionWithTypeArguments(node: object | null | undefined, opts?: object): node is TSExpressionWithTypeArguments;
export function isTSExternalModuleReference(node: object | null | undefined, opts?: object): node is TSExternalModuleReference;
export function isTSFunctionType(node: object | null | undefined, opts?: object): node is TSFunctionType;
export function isTSImportEqualsDeclaration(node: object | null | undefined, opts?: object): node is TSImportEqualsDeclaration;
export function isTSIndexSignature(node: object | null | undefined, opts?: object): node is TSIndexSignature;
export function isTSIndexedAccessType(node: object | null | undefined, opts?: object): node is TSIndexedAccessType;
export function isTSInterfaceBody(node: object | null | undefined, opts?: object): node is TSInterfaceBody;
export function isTSInterfaceDeclaration(node: object | null | undefined, opts?: object): node is TSInterfaceDeclaration;
export function isTSIntersectionType(node: object | null | undefined, opts?: object): node is TSIntersectionType;
export function isTSLiteralType(node: object | null | undefined, opts?: object): node is TSLiteralType;
export function isTSMappedType(node: object | null | undefined, opts?: object): node is TSMappedType;
export function isTSMethodSignature(node: object | null | undefined, opts?: object): node is TSMethodSignature;
export function isTSModuleBlock(node: object | null | undefined, opts?: object): node is TSModuleBlock;
export function isTSModuleDeclaration(node: object | null | undefined, opts?: object): node is TSModuleDeclaration;
export function isTSNamespaceExportDeclaration(node: object | null | undefined, opts?: object): node is TSNamespaceExportDeclaration;
export function isTSNeverKeyword(node: object | null | undefined, opts?: object): node is TSNeverKeyword;
export function isTSNonNullExpression(node: object | null | undefined, opts?: object): node is TSNonNullExpression;
export function isTSNullKeyword(node: object | null | undefined, opts?: object): node is TSNullKeyword;
export function isTSNumberKeyword(node: object | null | undefined, opts?: object): node is TSNumberKeyword;
export function isTSObjectKeyword(node: object | null | undefined, opts?: object): node is TSObjectKeyword;
export function isTSParameterProperty(node: object | null | undefined, opts?: object): node is TSParameterProperty;
export function isTSParenthesizedType(node: object | null | undefined, opts?: object): node is TSParenthesizedType;
export function isTSPropertySignature(node: object | null | undefined, opts?: object): node is TSPropertySignature;
export function isTSQualifiedName(node: object | null | undefined, opts?: object): node is TSQualifiedName;
export function isTSStringKeyword(node: object | null | undefined, opts?: object): node is TSStringKeyword;
export function isTSSymbolKeyword(node: object | null | undefined, opts?: object): node is TSSymbolKeyword;
export function isTSThisType(node: object | null | undefined, opts?: object): node is TSThisType;
export function isTSTupleType(node: object | null | undefined, opts?: object): node is TSTupleType;
export function isTSTypeAliasDeclaration(node: object | null | undefined, opts?: object): node is TSTypeAliasDeclaration;
export function isTSTypeAnnotation(node: object | null | undefined, opts?: object): node is TSTypeAnnotation;
export function isTSTypeAssertion(node: object | null | undefined, opts?: object): node is TSTypeAssertion;
export function isTSTypeLiteral(node: object | null | undefined, opts?: object): node is TSTypeLiteral;
export function isTSTypeOperator(node: object | null | undefined, opts?: object): node is TSTypeOperator;
export function isTSTypeParameter(node: object | null | undefined, opts?: object): node is TSTypeParameter;
export function isTSTypeParameterDeclaration(node: object | null | undefined, opts?: object): node is TSTypeParameterDeclaration;
export function isTSTypeParameterInstantiation(node: object | null | undefined, opts?: object): node is TSTypeParameterInstantiation;
export function isTSTypePredicate(node: object | null | undefined, opts?: object): node is TSTypePredicate;
export function isTSTypeQuery(node: object | null | undefined, opts?: object): node is TSTypeQuery;
export function isTSTypeReference(node: object | null | undefined, opts?: object): node is TSTypeReference;
export function isTSUndefinedKeyword(node: object | null | undefined, opts?: object): node is TSUndefinedKeyword;
export function isTSUnionType(node: object | null | undefined, opts?: object): node is TSUnionType;
export function isTSVoidKeyword(node: object | null | undefined, opts?: object): node is TSVoidKeyword;
// React specific
export interface ReactHelpers {
@@ -1762,231 +1762,231 @@ export interface ReactHelpers {
}
export const react: ReactHelpers;
export function assertArrayExpression(node: object, opts?: object): void;
export function assertAssignmentExpression(node: object, opts?: object): void;
export function assertBinaryExpression(node: object, opts?: object): void;
export function assertDirective(node: object, opts?: object): void;
export function assertDirectiveLiteral(node: object, opts?: object): void;
export function assertBlockStatement(node: object, opts?: object): void;
export function assertBreakStatement(node: object, opts?: object): void;
export function assertCallExpression(node: object, opts?: object): void;
export function assertCatchClause(node: object, opts?: object): void;
export function assertConditionalExpression(node: object, opts?: object): void;
export function assertContinueStatement(node: object, opts?: object): void;
export function assertDebuggerStatement(node: object, opts?: object): void;
export function assertDoWhileStatement(node: object, opts?: object): void;
export function assertEmptyStatement(node: object, opts?: object): void;
export function assertExpressionStatement(node: object, opts?: object): void;
export function assertFile(node: object, opts?: object): void;
export function assertForInStatement(node: object, opts?: object): void;
export function assertForStatement(node: object, opts?: object): void;
export function assertFunctionDeclaration(node: object, opts?: object): void;
export function assertFunctionExpression(node: object, opts?: object): void;
export function assertIdentifier(node: object, opts?: object): void;
export function assertIfStatement(node: object, opts?: object): void;
export function assertLabeledStatement(node: object, opts?: object): void;
export function assertStringLiteral(node: object, opts?: object): void;
export function assertNumericLiteral(node: object, opts?: object): void;
export function assertNullLiteral(node: object, opts?: object): void;
export function assertBooleanLiteral(node: object, opts?: object): void;
export function assertRegExpLiteral(node: object, opts?: object): void;
export function assertLogicalExpression(node: object, opts?: object): void;
export function assertMemberExpression(node: object, opts?: object): void;
export function assertNewExpression(node: object, opts?: object): void;
export function assertProgram(node: object, opts?: object): void;
export function assertObjectExpression(node: object, opts?: object): void;
export function assertObjectMethod(node: object, opts?: object): void;
export function assertObjectProperty(node: object, opts?: object): void;
export function assertRestElement(node: object, opts?: object): void;
export function assertReturnStatement(node: object, opts?: object): void;
export function assertSequenceExpression(node: object, opts?: object): void;
export function assertSwitchCase(node: object, opts?: object): void;
export function assertSwitchStatement(node: object, opts?: object): void;
export function assertThisExpression(node: object, opts?: object): void;
export function assertThrowStatement(node: object, opts?: object): void;
export function assertTryStatement(node: object, opts?: object): void;
export function assertUnaryExpression(node: object, opts?: object): void;
export function assertUpdateExpression(node: object, opts?: object): void;
export function assertVariableDeclaration(node: object, opts?: object): void;
export function assertVariableDeclarator(node: object, opts?: object): void;
export function assertWhileStatement(node: object, opts?: object): void;
export function assertWithStatement(node: object, opts?: object): void;
export function assertAssignmentPattern(node: object, opts?: object): void;
export function assertArrayPattern(node: object, opts?: object): void;
export function assertArrowFunctionExpression(node: object, opts?: object): void;
export function assertClassBody(node: object, opts?: object): void;
export function assertClassDeclaration(node: object, opts?: object): void;
export function assertClassExpression(node: object, opts?: object): void;
export function assertExportAllDeclaration(node: object, opts?: object): void;
export function assertExportDefaultDeclaration(node: object, opts?: object): void;
export function assertExportNamedDeclaration(node: object, opts?: object): void;
export function assertExportSpecifier(node: object, opts?: object): void;
export function assertForOfStatement(node: object, opts?: object): void;
export function assertImportDeclaration(node: object, opts?: object): void;
export function assertImportDefaultSpecifier(node: object, opts?: object): void;
export function assertImportNamespaceSpecifier(node: object, opts?: object): void;
export function assertImportSpecifier(node: object, opts?: object): void;
export function assertMetaProperty(node: object, opts?: object): void;
export function assertClassMethod(node: object, opts?: object): void;
export function assertObjectPattern(node: object, opts?: object): void;
export function assertSpreadElement(node: object, opts?: object): void;
export function assertSuper(node: object, opts?: object): void;
export function assertTaggedTemplateExpression(node: object, opts?: object): void;
export function assertTemplateElement(node: object, opts?: object): void;
export function assertTemplateLiteral(node: object, opts?: object): void;
export function assertYieldExpression(node: object, opts?: object): void;
export function assertAnyTypeAnnotation(node: object, opts?: object): void;
export function assertArrayTypeAnnotation(node: object, opts?: object): void;
export function assertBooleanTypeAnnotation(node: object, opts?: object): void;
export function assertBooleanLiteralTypeAnnotation(node: object, opts?: object): void;
export function assertNullLiteralTypeAnnotation(node: object, opts?: object): void;
export function assertClassImplements(node: object, opts?: object): void;
export function assertClassProperty(node: object, opts?: object): void;
export function assertDeclareClass(node: object, opts?: object): void;
export function assertDeclareFunction(node: object, opts?: object): void;
export function assertDeclareInterface(node: object, opts?: object): void;
export function assertDeclareModule(node: object, opts?: object): void;
export function assertDeclareTypeAlias(node: object, opts?: object): void;
export function assertDeclareVariable(node: object, opts?: object): void;
export function assertExistentialTypeParam(node: object, opts?: object): void;
export function assertFunctionTypeAnnotation(node: object, opts?: object): void;
export function assertFunctionTypeParam(node: object, opts?: object): void;
export function assertGenericTypeAnnotation(node: object, opts?: object): void;
export function assertInterfaceExtends(node: object, opts?: object): void;
export function assertInterfaceDeclaration(node: object, opts?: object): void;
export function assertIntersectionTypeAnnotation(node: object, opts?: object): void;
export function assertMixedTypeAnnotation(node: object, opts?: object): void;
export function assertNullableTypeAnnotation(node: object, opts?: object): void;
export function assertNumericLiteralTypeAnnotation(node: object, opts?: object): void;
export function assertNumberTypeAnnotation(node: object, opts?: object): void;
export function assertStringLiteralTypeAnnotation(node: object, opts?: object): void;
export function assertStringTypeAnnotation(node: object, opts?: object): void;
export function assertThisTypeAnnotation(node: object, opts?: object): void;
export function assertTupleTypeAnnotation(node: object, opts?: object): void;
export function assertTypeofTypeAnnotation(node: object, opts?: object): void;
export function assertTypeAlias(node: object, opts?: object): void;
export function assertTypeAnnotation(node: object, opts?: object): void;
export function assertTypeCastExpression(node: object, opts?: object): void;
export function assertTypeParameter(node: object, opts?: object): void;
export function assertTypeParameterDeclaration(node: object, opts?: object): void;
export function assertTypeParameterInstantiation(node: object, opts?: object): void;
export function assertObjectTypeAnnotation(node: object, opts?: object): void;
export function assertObjectTypeCallProperty(node: object, opts?: object): void;
export function assertObjectTypeIndexer(node: object, opts?: object): void;
export function assertObjectTypeProperty(node: object, opts?: object): void;
export function assertQualifiedTypeIdentifier(node: object, opts?: object): void;
export function assertUnionTypeAnnotation(node: object, opts?: object): void;
export function assertVoidTypeAnnotation(node: object, opts?: object): void;
export function assertJSXAttribute(node: object, opts?: object): void;
export function assertJSXClosingElement(node: object, opts?: object): void;
export function assertJSXElement(node: object, opts?: object): void;
export function assertJSXEmptyExpression(node: object, opts?: object): void;
export function assertJSXExpressionContainer(node: object, opts?: object): void;
export function assertJSXIdentifier(node: object, opts?: object): void;
export function assertJSXMemberExpression(node: object, opts?: object): void;
export function assertJSXNamespacedName(node: object, opts?: object): void;
export function assertJSXOpeningElement(node: object, opts?: object): void;
export function assertJSXSpreadAttribute(node: object, opts?: object): void;
export function assertJSXText(node: object, opts?: object): void;
export function assertNoop(node: object, opts?: object): void;
export function assertParenthesizedExpression(node: object, opts?: object): void;
export function assertAwaitExpression(node: object, opts?: object): void;
export function assertBindExpression(node: object, opts?: object): void;
export function assertDecorator(node: object, opts?: object): void;
export function assertDoExpression(node: object, opts?: object): void;
export function assertExportDefaultSpecifier(node: object, opts?: object): void;
export function assertExportNamespaceSpecifier(node: object, opts?: object): void;
export function assertRestProperty(node: object, opts?: object): void;
export function assertSpreadProperty(node: object, opts?: object): void;
export function assertExpression(node: object, opts?: object): void;
export function assertBinary(node: object, opts?: object): void;
export function assertScopable(node: object, opts?: object): void;
export function assertBlockParent(node: object, opts?: object): void;
export function assertBlock(node: object, opts?: object): void;
export function assertStatement(node: object, opts?: object): void;
export function assertTerminatorless(node: object, opts?: object): void;
export function assertCompletionStatement(node: object, opts?: object): void;
export function assertConditional(node: object, opts?: object): void;
export function assertLoop(node: object, opts?: object): void;
export function assertWhile(node: object, opts?: object): void;
export function assertExpressionWrapper(node: object, opts?: object): void;
export function assertFor(node: object, opts?: object): void;
export function assertForXStatement(node: object, opts?: object): void;
export function assertFunction(node: object, opts?: object): void;
export function assertFunctionParent(node: object, opts?: object): void;
export function assertPureish(node: object, opts?: object): void;
export function assertDeclaration(node: object, opts?: object): void;
export function assertLVal(node: object, opts?: object): void;
export function assertLiteral(node: object, opts?: object): void;
export function assertImmutable(node: object, opts?: object): void;
export function assertUserWhitespacable(node: object, opts?: object): void;
export function assertMethod(node: object, opts?: object): void;
export function assertObjectMember(node: object, opts?: object): void;
export function assertProperty(node: object, opts?: object): void;
export function assertUnaryLike(node: object, opts?: object): void;
export function assertPattern(node: object, opts?: object): void;
export function assertClass(node: object, opts?: object): void;
export function assertModuleDeclaration(node: object, opts?: object): void;
export function assertExportDeclaration(node: object, opts?: object): void;
export function assertModuleSpecifier(node: object, opts?: object): void;
export function assertFlow(node: object, opts?: object): void;
export function assertFlowBaseAnnotation(node: object, opts?: object): void;
export function assertFlowDeclaration(node: object, opts?: object): void;
export function assertJSX(node: object, opts?: object): void;
export function assertNumberLiteral(node: object, opts?: object): void;
export function assertRegexLiteral(node: object, opts?: object): void;
export function assertArrayExpression(node: object | null | undefined, opts?: object): void;
export function assertAssignmentExpression(node: object | null | undefined, opts?: object): void;
export function assertBinaryExpression(node: object | null | undefined, opts?: object): void;
export function assertDirective(node: object | null | undefined, opts?: object): void;
export function assertDirectiveLiteral(node: object | null | undefined, opts?: object): void;
export function assertBlockStatement(node: object | null | undefined, opts?: object): void;
export function assertBreakStatement(node: object | null | undefined, opts?: object): void;
export function assertCallExpression(node: object | null | undefined, opts?: object): void;
export function assertCatchClause(node: object | null | undefined, opts?: object): void;
export function assertConditionalExpression(node: object | null | undefined, opts?: object): void;
export function assertContinueStatement(node: object | null | undefined, opts?: object): void;
export function assertDebuggerStatement(node: object | null | undefined, opts?: object): void;
export function assertDoWhileStatement(node: object | null | undefined, opts?: object): void;
export function assertEmptyStatement(node: object | null | undefined, opts?: object): void;
export function assertExpressionStatement(node: object | null | undefined, opts?: object): void;
export function assertFile(node: object | null | undefined, opts?: object): void;
export function assertForInStatement(node: object | null | undefined, opts?: object): void;
export function assertForStatement(node: object | null | undefined, opts?: object): void;
export function assertFunctionDeclaration(node: object | null | undefined, opts?: object): void;
export function assertFunctionExpression(node: object | null | undefined, opts?: object): void;
export function assertIdentifier(node: object | null | undefined, opts?: object): void;
export function assertIfStatement(node: object | null | undefined, opts?: object): void;
export function assertLabeledStatement(node: object | null | undefined, opts?: object): void;
export function assertStringLiteral(node: object | null | undefined, opts?: object): void;
export function assertNumericLiteral(node: object | null | undefined, opts?: object): void;
export function assertNullLiteral(node: object | null | undefined, opts?: object): void;
export function assertBooleanLiteral(node: object | null | undefined, opts?: object): void;
export function assertRegExpLiteral(node: object | null | undefined, opts?: object): void;
export function assertLogicalExpression(node: object | null | undefined, opts?: object): void;
export function assertMemberExpression(node: object | null | undefined, opts?: object): void;
export function assertNewExpression(node: object | null | undefined, opts?: object): void;
export function assertProgram(node: object | null | undefined, opts?: object): void;
export function assertObjectExpression(node: object | null | undefined, opts?: object): void;
export function assertObjectMethod(node: object | null | undefined, opts?: object): void;
export function assertObjectProperty(node: object | null | undefined, opts?: object): void;
export function assertRestElement(node: object | null | undefined, opts?: object): void;
export function assertReturnStatement(node: object | null | undefined, opts?: object): void;
export function assertSequenceExpression(node: object | null | undefined, opts?: object): void;
export function assertSwitchCase(node: object | null | undefined, opts?: object): void;
export function assertSwitchStatement(node: object | null | undefined, opts?: object): void;
export function assertThisExpression(node: object | null | undefined, opts?: object): void;
export function assertThrowStatement(node: object | null | undefined, opts?: object): void;
export function assertTryStatement(node: object | null | undefined, opts?: object): void;
export function assertUnaryExpression(node: object | null | undefined, opts?: object): void;
export function assertUpdateExpression(node: object | null | undefined, opts?: object): void;
export function assertVariableDeclaration(node: object | null | undefined, opts?: object): void;
export function assertVariableDeclarator(node: object | null | undefined, opts?: object): void;
export function assertWhileStatement(node: object | null | undefined, opts?: object): void;
export function assertWithStatement(node: object | null | undefined, opts?: object): void;
export function assertAssignmentPattern(node: object | null | undefined, opts?: object): void;
export function assertArrayPattern(node: object | null | undefined, opts?: object): void;
export function assertArrowFunctionExpression(node: object | null | undefined, opts?: object): void;
export function assertClassBody(node: object | null | undefined, opts?: object): void;
export function assertClassDeclaration(node: object | null | undefined, opts?: object): void;
export function assertClassExpression(node: object | null | undefined, opts?: object): void;
export function assertExportAllDeclaration(node: object | null | undefined, opts?: object): void;
export function assertExportDefaultDeclaration(node: object | null | undefined, opts?: object): void;
export function assertExportNamedDeclaration(node: object | null | undefined, opts?: object): void;
export function assertExportSpecifier(node: object | null | undefined, opts?: object): void;
export function assertForOfStatement(node: object | null | undefined, opts?: object): void;
export function assertImportDeclaration(node: object | null | undefined, opts?: object): void;
export function assertImportDefaultSpecifier(node: object | null | undefined, opts?: object): void;
export function assertImportNamespaceSpecifier(node: object | null | undefined, opts?: object): void;
export function assertImportSpecifier(node: object | null | undefined, opts?: object): void;
export function assertMetaProperty(node: object | null | undefined, opts?: object): void;
export function assertClassMethod(node: object | null | undefined, opts?: object): void;
export function assertObjectPattern(node: object | null | undefined, opts?: object): void;
export function assertSpreadElement(node: object | null | undefined, opts?: object): void;
export function assertSuper(node: object | null | undefined, opts?: object): void;
export function assertTaggedTemplateExpression(node: object | null | undefined, opts?: object): void;
export function assertTemplateElement(node: object | null | undefined, opts?: object): void;
export function assertTemplateLiteral(node: object | null | undefined, opts?: object): void;
export function assertYieldExpression(node: object | null | undefined, opts?: object): void;
export function assertAnyTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertArrayTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertBooleanTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertBooleanLiteralTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertNullLiteralTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertClassImplements(node: object | null | undefined, opts?: object): void;
export function assertClassProperty(node: object | null | undefined, opts?: object): void;
export function assertDeclareClass(node: object | null | undefined, opts?: object): void;
export function assertDeclareFunction(node: object | null | undefined, opts?: object): void;
export function assertDeclareInterface(node: object | null | undefined, opts?: object): void;
export function assertDeclareModule(node: object | null | undefined, opts?: object): void;
export function assertDeclareTypeAlias(node: object | null | undefined, opts?: object): void;
export function assertDeclareVariable(node: object | null | undefined, opts?: object): void;
export function assertExistentialTypeParam(node: object | null | undefined, opts?: object): void;
export function assertFunctionTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertFunctionTypeParam(node: object | null | undefined, opts?: object): void;
export function assertGenericTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertInterfaceExtends(node: object | null | undefined, opts?: object): void;
export function assertInterfaceDeclaration(node: object | null | undefined, opts?: object): void;
export function assertIntersectionTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertMixedTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertNullableTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertNumericLiteralTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertNumberTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertStringLiteralTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertStringTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertThisTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertTupleTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertTypeofTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertTypeAlias(node: object | null | undefined, opts?: object): void;
export function assertTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertTypeCastExpression(node: object | null | undefined, opts?: object): void;
export function assertTypeParameter(node: object | null | undefined, opts?: object): void;
export function assertTypeParameterDeclaration(node: object | null | undefined, opts?: object): void;
export function assertTypeParameterInstantiation(node: object | null | undefined, opts?: object): void;
export function assertObjectTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertObjectTypeCallProperty(node: object | null | undefined, opts?: object): void;
export function assertObjectTypeIndexer(node: object | null | undefined, opts?: object): void;
export function assertObjectTypeProperty(node: object | null | undefined, opts?: object): void;
export function assertQualifiedTypeIdentifier(node: object | null | undefined, opts?: object): void;
export function assertUnionTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertVoidTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertJSXAttribute(node: object | null | undefined, opts?: object): void;
export function assertJSXClosingElement(node: object | null | undefined, opts?: object): void;
export function assertJSXElement(node: object | null | undefined, opts?: object): void;
export function assertJSXEmptyExpression(node: object | null | undefined, opts?: object): void;
export function assertJSXExpressionContainer(node: object | null | undefined, opts?: object): void;
export function assertJSXIdentifier(node: object | null | undefined, opts?: object): void;
export function assertJSXMemberExpression(node: object | null | undefined, opts?: object): void;
export function assertJSXNamespacedName(node: object | null | undefined, opts?: object): void;
export function assertJSXOpeningElement(node: object | null | undefined, opts?: object): void;
export function assertJSXSpreadAttribute(node: object | null | undefined, opts?: object): void;
export function assertJSXText(node: object | null | undefined, opts?: object): void;
export function assertNoop(node: object | null | undefined, opts?: object): void;
export function assertParenthesizedExpression(node: object | null | undefined, opts?: object): void;
export function assertAwaitExpression(node: object | null | undefined, opts?: object): void;
export function assertBindExpression(node: object | null | undefined, opts?: object): void;
export function assertDecorator(node: object | null | undefined, opts?: object): void;
export function assertDoExpression(node: object | null | undefined, opts?: object): void;
export function assertExportDefaultSpecifier(node: object | null | undefined, opts?: object): void;
export function assertExportNamespaceSpecifier(node: object | null | undefined, opts?: object): void;
export function assertRestProperty(node: object | null | undefined, opts?: object): void;
export function assertSpreadProperty(node: object | null | undefined, opts?: object): void;
export function assertExpression(node: object | null | undefined, opts?: object): void;
export function assertBinary(node: object | null | undefined, opts?: object): void;
export function assertScopable(node: object | null | undefined, opts?: object): void;
export function assertBlockParent(node: object | null | undefined, opts?: object): void;
export function assertBlock(node: object | null | undefined, opts?: object): void;
export function assertStatement(node: object | null | undefined, opts?: object): void;
export function assertTerminatorless(node: object | null | undefined, opts?: object): void;
export function assertCompletionStatement(node: object | null | undefined, opts?: object): void;
export function assertConditional(node: object | null | undefined, opts?: object): void;
export function assertLoop(node: object | null | undefined, opts?: object): void;
export function assertWhile(node: object | null | undefined, opts?: object): void;
export function assertExpressionWrapper(node: object | null | undefined, opts?: object): void;
export function assertFor(node: object | null | undefined, opts?: object): void;
export function assertForXStatement(node: object | null | undefined, opts?: object): void;
export function assertFunction(node: object | null | undefined, opts?: object): void;
export function assertFunctionParent(node: object | null | undefined, opts?: object): void;
export function assertPureish(node: object | null | undefined, opts?: object): void;
export function assertDeclaration(node: object | null | undefined, opts?: object): void;
export function assertLVal(node: object | null | undefined, opts?: object): void;
export function assertLiteral(node: object | null | undefined, opts?: object): void;
export function assertImmutable(node: object | null | undefined, opts?: object): void;
export function assertUserWhitespacable(node: object | null | undefined, opts?: object): void;
export function assertMethod(node: object | null | undefined, opts?: object): void;
export function assertObjectMember(node: object | null | undefined, opts?: object): void;
export function assertProperty(node: object | null | undefined, opts?: object): void;
export function assertUnaryLike(node: object | null | undefined, opts?: object): void;
export function assertPattern(node: object | null | undefined, opts?: object): void;
export function assertClass(node: object | null | undefined, opts?: object): void;
export function assertModuleDeclaration(node: object | null | undefined, opts?: object): void;
export function assertExportDeclaration(node: object | null | undefined, opts?: object): void;
export function assertModuleSpecifier(node: object | null | undefined, opts?: object): void;
export function assertFlow(node: object | null | undefined, opts?: object): void;
export function assertFlowBaseAnnotation(node: object | null | undefined, opts?: object): void;
export function assertFlowDeclaration(node: object | null | undefined, opts?: object): void;
export function assertJSX(node: object | null | undefined, opts?: object): void;
export function assertNumberLiteral(node: object | null | undefined, opts?: object): void;
export function assertRegexLiteral(node: object | null | undefined, opts?: object): void;
export function assertTSAnyKeyword(node: object, opts?: object): void;
export function assertTSArrayType(node: object, opts?: object): void;
export function assertTSAsExpression(node: object, opts?: object): void;
export function assertTSBooleanKeyword(node: object, opts?: object): void;
export function assertTSCallSignatureDeclaration(node: object, opts?: object): void;
export function assertTSConstructSignatureDeclaration(node: object, opts?: object): void;
export function assertTSConstructorType(node: object, opts?: object): void;
export function assertTSDeclareFunction(node: object, opts?: object): void;
export function assertTSDeclareMethod(node: object, opts?: object): void;
export function assertTSEnumDeclaration(node: object, opts?: object): void;
export function assertTSEnumMember(node: object, opts?: object): void;
export function assertTSExportAssignment(node: object, opts?: object): void;
export function assertTSExpressionWithTypeArguments(node: object, opts?: object): void;
export function assertTSExternalModuleReference(node: object, opts?: object): void;
export function assertTSFunctionType(node: object, opts?: object): void;
export function assertTSImportEqualsDeclaration(node: object, opts?: object): void;
export function assertTSIndexSignature(node: object, opts?: object): void;
export function assertTSIndexedAccessType(node: object, opts?: object): void;
export function assertTSInterfaceBody(node: object, opts?: object): void;
export function assertTSInterfaceDeclaration(node: object, opts?: object): void;
export function assertTSIntersectionType(node: object, opts?: object): void;
export function assertTSLiteralType(node: object, opts?: object): void;
export function assertTSMappedType(node: object, opts?: object): void;
export function assertTSMethodSignature(node: object, opts?: object): void;
export function assertTSModuleBlock(node: object, opts?: object): void;
export function assertTSModuleDeclaration(node: object, opts?: object): void;
export function assertTSNamespaceExportDeclaration(node: object, opts?: object): void;
export function assertTSNeverKeyword(node: object, opts?: object): void;
export function assertTSNonNullExpression(node: object, opts?: object): void;
export function assertTSNullKeyword(node: object, opts?: object): void;
export function assertTSNumberKeyword(node: object, opts?: object): void;
export function assertTSObjectKeyword(node: object, opts?: object): void;
export function assertTSParameterProperty(node: object, opts?: object): void;
export function assertTSParenthesizedType(node: object, opts?: object): void;
export function assertTSPropertySignature(node: object, opts?: object): void;
export function assertTSQualifiedName(node: object, opts?: object): void;
export function assertTSStringKeyword(node: object, opts?: object): void;
export function assertTSSymbolKeyword(node: object, opts?: object): void;
export function assertTSThisType(node: object, opts?: object): void;
export function assertTSTupleType(node: object, opts?: object): void;
export function assertTSTypeAliasDeclaration(node: object, opts?: object): void;
export function assertTSTypeAnnotation(node: object, opts?: object): void;
export function assertTSTypeAssertion(node: object, opts?: object): void;
export function assertTSTypeLiteral(node: object, opts?: object): void;
export function assertTSTypeOperator(node: object, opts?: object): void;
export function assertTSTypeParameter(node: object, opts?: object): void;
export function assertTSTypeParameterDeclaration(node: object, opts?: object): void;
export function assertTSTypeParameterInstantiation(node: object, opts?: object): void;
export function assertTSTypePredicate(node: object, opts?: object): void;
export function assertTSTypeQuery(node: object, opts?: object): void;
export function assertTSTypeReference(node: object, opts?: object): void;
export function assertTSUndefinedKeyword(node: object, opts?: object): void;
export function assertTSUnionType(node: object, opts?: object): void;
export function assertTSVoidKeyword(node: object, opts?: object): void;
export function assertTSAnyKeyword(node: object | null | undefined, opts?: object): void;
export function assertTSArrayType(node: object | null | undefined, opts?: object): void;
export function assertTSAsExpression(node: object | null | undefined, opts?: object): void;
export function assertTSBooleanKeyword(node: object | null | undefined, opts?: object): void;
export function assertTSCallSignatureDeclaration(node: object | null | undefined, opts?: object): void;
export function assertTSConstructSignatureDeclaration(node: object | null | undefined, opts?: object): void;
export function assertTSConstructorType(node: object | null | undefined, opts?: object): void;
export function assertTSDeclareFunction(node: object | null | undefined, opts?: object): void;
export function assertTSDeclareMethod(node: object | null | undefined, opts?: object): void;
export function assertTSEnumDeclaration(node: object | null | undefined, opts?: object): void;
export function assertTSEnumMember(node: object | null | undefined, opts?: object): void;
export function assertTSExportAssignment(node: object | null | undefined, opts?: object): void;
export function assertTSExpressionWithTypeArguments(node: object | null | undefined, opts?: object): void;
export function assertTSExternalModuleReference(node: object | null | undefined, opts?: object): void;
export function assertTSFunctionType(node: object | null | undefined, opts?: object): void;
export function assertTSImportEqualsDeclaration(node: object | null | undefined, opts?: object): void;
export function assertTSIndexSignature(node: object | null | undefined, opts?: object): void;
export function assertTSIndexedAccessType(node: object | null | undefined, opts?: object): void;
export function assertTSInterfaceBody(node: object | null | undefined, opts?: object): void;
export function assertTSInterfaceDeclaration(node: object | null | undefined, opts?: object): void;
export function assertTSIntersectionType(node: object | null | undefined, opts?: object): void;
export function assertTSLiteralType(node: object | null | undefined, opts?: object): void;
export function assertTSMappedType(node: object | null | undefined, opts?: object): void;
export function assertTSMethodSignature(node: object | null | undefined, opts?: object): void;
export function assertTSModuleBlock(node: object | null | undefined, opts?: object): void;
export function assertTSModuleDeclaration(node: object | null | undefined, opts?: object): void;
export function assertTSNamespaceExportDeclaration(node: object | null | undefined, opts?: object): void;
export function assertTSNeverKeyword(node: object | null | undefined, opts?: object): void;
export function assertTSNonNullExpression(node: object | null | undefined, opts?: object): void;
export function assertTSNullKeyword(node: object | null | undefined, opts?: object): void;
export function assertTSNumberKeyword(node: object | null | undefined, opts?: object): void;
export function assertTSObjectKeyword(node: object | null | undefined, opts?: object): void;
export function assertTSParameterProperty(node: object | null | undefined, opts?: object): void;
export function assertTSParenthesizedType(node: object | null | undefined, opts?: object): void;
export function assertTSPropertySignature(node: object | null | undefined, opts?: object): void;
export function assertTSQualifiedName(node: object | null | undefined, opts?: object): void;
export function assertTSStringKeyword(node: object | null | undefined, opts?: object): void;
export function assertTSSymbolKeyword(node: object | null | undefined, opts?: object): void;
export function assertTSThisType(node: object | null | undefined, opts?: object): void;
export function assertTSTupleType(node: object | null | undefined, opts?: object): void;
export function assertTSTypeAliasDeclaration(node: object | null | undefined, opts?: object): void;
export function assertTSTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertTSTypeAssertion(node: object | null | undefined, opts?: object): void;
export function assertTSTypeLiteral(node: object | null | undefined, opts?: object): void;
export function assertTSTypeOperator(node: object | null | undefined, opts?: object): void;
export function assertTSTypeParameter(node: object | null | undefined, opts?: object): void;
export function assertTSTypeParameterDeclaration(node: object | null | undefined, opts?: object): void;
export function assertTSTypeParameterInstantiation(node: object | null | undefined, opts?: object): void;
export function assertTSTypePredicate(node: object | null | undefined, opts?: object): void;
export function assertTSTypeQuery(node: object | null | undefined, opts?: object): void;
export function assertTSTypeReference(node: object | null | undefined, opts?: object): void;
export function assertTSUndefinedKeyword(node: object | null | undefined, opts?: object): void;
export function assertTSUnionType(node: object | null | undefined, opts?: object): void;
export function assertTSVoidKeyword(node: object | null | undefined, opts?: object): void;

View File

@@ -6,7 +6,7 @@
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [

View File

@@ -113,12 +113,15 @@
import Bluebird = require("bluebird");
declare global {
type IterateFunction<T, R> = (item: T, index: number, arrayLength: number) => (R | PromiseLike<R>);
/*
* Patch all instance method
*/
interface Promise<T> {
all: Bluebird<T>["all"];
any: Bluebird<T>["any"];
all(this: Promise<Iterable<{}>>): Bluebird<T>;
all(): Bluebird<never>;
any<Q>(this: Promise<T & Iterable<Q>>): Bluebird<Q>;
any(): Bluebird<never>;
asCallback: Bluebird<T>["asCallback"];
bind: Bluebird<T>["bind"];
call: Bluebird<T>["call"];
@@ -128,9 +131,9 @@ declare global {
delay: Bluebird<T>["delay"];
disposer: Bluebird<T>["disposer"];
done: Bluebird<T>["done"];
each: Bluebird<T>["each"];
each<Q>(this: Promise<T & Iterable<Q>>, iterator: IterateFunction<Q, any>): Bluebird<T>;
error: Bluebird<T>["error"];
filter: Bluebird<T>["filter"];
filter<Q>(this: Promise<T & Iterable<Q>>, filterer: IterateFunction<Q, boolean>, options?: Bluebird.ConcurrencyOption): Bluebird<T>;
// finally: Bluebird<T>["finally"]; // Provided by lib.es2018.promise.d.ts
get: Bluebird<T>["get"];
isCancelled: Bluebird<T>["isCancelled"];
@@ -139,17 +142,18 @@ declare global {
isRejected: Bluebird<T>["isRejected"];
isResolved: Bluebird<T>["isResolved"];
lastly: Bluebird<T>["lastly"];
map: Bluebird<T>["map"];
mapSeries: Bluebird<T>["mapSeries"];
map<U, Q>(this: Promise<T & Iterable<Q>>, mapper: IterateFunction<Q, U>, options?: Bluebird.ConcurrencyOption): Bluebird<U[]>;
mapSeries<U, Q>(this: Promise<T & Iterable<Q>>, iterator: IterateFunction<Q, U>): Bluebird<U[]>;
nodeify: Bluebird<T>["nodeify"];
props: Bluebird<T>["props"];
race: Bluebird<T>["race"];
race<Q>(this: Promise<T & Iterable<Q>>): Bluebird<Q>;
race(): Bluebird<never>;
reason: Bluebird<T>["reason"];
reduce: Bluebird<T>["reduce"];
reduce<U, Q>(this: Promise<T & Iterable<Q>>, reducer: (memo: U, item: Q, index: number, arrayLength: number) => (U | PromiseLike<U>), initialValue?: U): Bluebird<U>;
reflect: Bluebird<T>["reflect"];
return: Bluebird<T>["return"];
some: Bluebird<T>["some"];
spread: Bluebird<T>["spread"];
some(this: Promise<Iterable<{}>>, count: number): Bluebird<T>;
spread<U, Q>(this: Bluebird<T & Iterable<Q>>, fulfilledHandler: (...values: Q[]) => (U | PromiseLike<U>)): Bluebird<U>;
suppressUnhandledRejections: Bluebird<T>["suppressUnhandledRejections"];
tap: Bluebird<T>["tap"];
tapCatch: Bluebird<T>["tapCatch"];

View File

@@ -37,8 +37,6 @@
type Constructor<E> = new (...args: any[]) => E;
type CatchFilter<E> = ((error: E) => boolean) | (object & E);
type IterableItem<R> = R extends Iterable<infer U> ? U : never;
type IterableOrNever<R> = Extract<R, Iterable<any>>;
type Resolvable<R> = R | PromiseLike<R>;
type IterateFunction<T, R> = (item: T, index: number, arrayLength: number) => Resolvable<R>;
@@ -352,7 +350,7 @@ declare class Bluebird<R> implements PromiseLike<R>, Bluebird.Inspection<R> {
* });
* </code>
*/
call<U extends keyof R>(propertyName: U, ...args: any[]): Bluebird<R[U] extends (...args: any[]) => any ? ReturnType<R[U]> : never>;
call<U extends keyof Q, Q>(this: Bluebird<Q>, propertyName: U, ...args: any[]): Bluebird<Q[U] extends (...args: any[]) => any ? ReturnType<Q[U]> : never>;
/**
* This is a convenience method for doing:
@@ -562,12 +560,17 @@ declare class Bluebird<R> implements PromiseLike<R>, Bluebird.Inspection<R> {
/**
* Like calling `.then`, but the fulfillment value or rejection reason is assumed to be an array, which is flattened to the formal parameters of the handlers.
*/
spread<U>(fulfilledHandler: (...values: Array<IterableItem<R>>) => Resolvable<U>): Bluebird<U>;
spread<U, Q>(this: Bluebird<R & Iterable<Q>>, fulfilledHandler: (...values: Q[]) => Resolvable<U>): Bluebird<U>;
/**
* Same as calling `Promise.all(thisPromise)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too.
*/
all(): Bluebird<IterableOrNever<R>>;
all(this: Bluebird<Iterable<{}>>): Bluebird<R>;
/**
* Same as calling `Promise.all(thisPromise)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too.
*/
all(): Bluebird<never>;
/**
* Same as calling `Promise.props(thisPromise)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too.
@@ -578,42 +581,59 @@ declare class Bluebird<R> implements PromiseLike<R>, Bluebird.Inspection<R> {
/**
* Same as calling `Promise.any(thisPromise)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too.
*/
any(): Bluebird<IterableItem<R>>;
any<Q>(this: Bluebird<R & Iterable<Q>>): Bluebird<Q>;
/**
* Same as calling `Promise.any(thisPromise)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too.
*/
any(): Bluebird<never>;
/**
* Same as calling `Promise.some(thisPromise)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too.
* Same as calling `Promise.some(thisPromise)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too.
*/
some(count: number): Bluebird<IterableOrNever<R>>;
some(this: Bluebird<Iterable<{}>>, count: number): Bluebird<R>;
/**
* Same as calling `Promise.some(thisPromise)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too.
* Same as calling `Promise.some(thisPromise)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too.
*/
some(count: number): Bluebird<never>;
/**
* Same as calling `Promise.race(thisPromise, count)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too.
*/
race(): Bluebird<IterableItem<R>>;
race<Q>(this: Bluebird<R & Iterable<Q>>): Bluebird<Q>;
/**
* Same as calling `Promise.race(thisPromise, count)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too.
*/
race(): Bluebird<never>;
/**
* Same as calling `Bluebird.map(thisPromise, mapper)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too.
*/
map<U>(mapper: IterateFunction<IterableItem<R>, U>, options?: Bluebird.ConcurrencyOption): Bluebird<R extends Iterable<any> ? U[] : never>;
map<U, Q>(this: Bluebird<R & Iterable<Q>>, mapper: IterateFunction<Q, U>, options?: Bluebird.ConcurrencyOption): Bluebird<U[]>;
/**
* Same as calling `Promise.reduce(thisPromise, Function reducer, initialValue)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too.
*/
reduce<U>(reducer: (memo: U, item: IterableItem<R>, index: number, arrayLength: number) => Resolvable<U>, initialValue?: U): Bluebird<R extends Iterable<any> ? U : never>;
reduce<U, Q>(this: Bluebird<R & Iterable<Q>>, reducer: (memo: U, item: Q, index: number, arrayLength: number) => Resolvable<U>, initialValue?: U): Bluebird<U>;
/**
* Same as calling ``Promise.filter(thisPromise, filterer)``. With the exception that if this promise is bound to a value, the returned promise is bound to that value too.
*/
filter(filterer: IterateFunction<IterableItem<R>, boolean>, options?: Bluebird.ConcurrencyOption): Bluebird<IterableOrNever<R>>;
filter<Q>(this: Bluebird<R & Iterable<Q>>, filterer: IterateFunction<Q, boolean>, options?: Bluebird.ConcurrencyOption): Bluebird<R>;
/**
* Same as calling ``Bluebird.each(thisPromise, iterator)``. With the exception that if this promise is bound to a value, the returned promise is bound to that value too.
*/
each(iterator: IterateFunction<IterableItem<R>, any>): Bluebird<IterableOrNever<R>>;
each<Q>(this: Bluebird<R & Iterable<Q>>, iterator: IterateFunction<Q, any>): Bluebird<R>;
/**
* Same as calling ``Bluebird.mapSeries(thisPromise, iterator)``. With the exception that if this promise is bound to a value, the returned promise is bound to that value too.
*/
mapSeries<U>(iterator: IterateFunction<IterableItem<R>, U>): Bluebird<R extends Iterable<any> ? U[] : never>;
mapSeries<U, Q>(this: Bluebird<R & Iterable<Q>>, iterator: IterateFunction<Q, U>): Bluebird<U[]>;
/**
* Cancel this `promise`. Will not do anything if this promise is already settled or if the cancellation feature has not been enabled

View File

@@ -46,4 +46,21 @@ $.notify({
'</div>' +
'<a href="{3}" target="{4}" data-notify="url"></a>' +
'</div>'
});
});
const notifyResult = $.notify({
message: 'Callbacks have the popup element as an argument',
},{
onShow: function($ele) {
notifyResult.$ele === $ele;
},
onShown: function($ele) {
notifyResult.$ele === $ele;
},
onClose: function($ele) {
notifyResult.$ele === $ele;
},
onClosed: function($ele) {
notifyResult.$ele === $ele;
},
});

View File

@@ -48,16 +48,16 @@ interface NotifySettings {
enter?: string;
exit?: string;
};
onShow?: () => void;
onShown?: () => void;
onClose?: () => void;
onClosed?: () => void;
onShow?: ($ele: JQuery) => void;
onShown?: ($ele: JQuery) => void;
onClose?: ($ele: JQuery) => void;
onClosed?: ($ele: JQuery) => void;
icon_type?: string;
template?: string;
}
interface NotifyReturn {
$ele: JQueryStatic;
$ele: JQuery;
close: () => void;
update: (command: string, update: any) => void;
}

View File

@@ -196,6 +196,12 @@ $("#popover").popover({
offset: 10,
fallbackPlacement: ["flip", "clockwise"],
boundary: "scrollParent",
sanitize: false,
whiteList: {
h1: [],
img: ['src', 'alt', 'title', 'width', 'height'],
},
sanitizeFn: (x: string) => x.replace("<", ""),
});
$("#popover").popover({
@@ -207,6 +213,10 @@ $("#popover").popover({
},
});
$("#popover").popover({
sanitizeFn: null,
});
// --------------------------------------------------------------------------------------
// Scrollspy
// --------------------------------------------------------------------------------------
@@ -280,10 +290,23 @@ $("#tooltip").on("hide.bs.tooltip", () => {});
$("#tooltip").tooltip({
animation: false,
});
$("#tooltip").tooltip({
container: "#container",
delay: {show: 500, hide: 100},
html: true,
placement: "auto",
selector: "[rel=\"tooltip\"]",
template: '<div class="tooltip empty" role="tooltip"></div>',
title: "Hello world",
trigger: "hover focus",
offset: 10,
fallbackPlacement: ["flip", "clockwise"],
boundary: "scrollParent",
sanitize: false,
whiteList: {
h1: [],
img: ['src', 'alt', 'title', 'width', 'height'],
},
sanitizeFn: (x: string) => x.replace("<", ""),
});
$("#tooltip").tooltip({
@@ -298,18 +321,6 @@ $("#tooltip").tooltip({
delay: 250,
});
$("#tooltip").tooltip({
delay: {show: 500, hide: 100},
});
$("#tooltip").tooltip({
html: true,
});
$("#tooltip").tooltip({
placement: "auto",
});
$("#tooltip").tooltip({
placement(this, tooltip, trigger) {
console.log(this.tip === tooltip);
@@ -327,22 +338,10 @@ $("#tooltip").tooltip({
},
});
$("#tooltip").tooltip({
selector: "[rel=\"tooltip\"]",
});
$("#tooltip").tooltip({
selector: false,
});
$("#tooltip").tooltip({
template: '<div class="tooltip empty" role="tooltip"></div>',
});
$("#tooltip").tooltip({
title: "Hello world",
});
$("#tooltip").tooltip({
title: document.getElementById("title-element") as HTMLElement,
});
@@ -353,14 +352,6 @@ $("#tooltip").tooltip({
},
});
$("#tooltip").tooltip({
trigger: "hover focus",
});
$("#tooltip").tooltip({
offset: 10,
});
$("#tooltip").tooltip({
offset: "10px",
});
@@ -369,14 +360,10 @@ $("#tooltip").tooltip({
fallbackPlacement: "clockwise",
});
$("#tooltip").tooltip({
fallbackPlacement: ["flip", "clockwise"],
});
$("#tooltip").tooltip({
boundary: "scrollParent",
});
$("#tooltip").tooltip({
boundary: aHtmlElement,
});
$("#popover").popover({
sanitizeFn: null,
});

View File

@@ -1,4 +1,4 @@
// Type definitions for Bootstrap 4.2
// Type definitions for Bootstrap 4.3
// Project: https://github.com/twbs/bootstrap/, https://getbootstrap.com
// Definitions by: denisname <https://github.com/denisname>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -352,6 +352,25 @@ export interface TooltipOption {
* @default "scrollParent"
*/
boundary?: Popper.Boundary | HTMLElement;
/**
* Enable or disable the sanitization. If activated 'template', 'content' and 'title' options will be sanitized.
*
* @default true
*/
sanitize?: boolean;
/**
* Object which contains allowed attributes and tags.
*/
whiteList?: {[key: string]: string[]};
/**
* Here you can supply your own sanitize function. This can be useful if you prefer to use a dedicated library to perform sanitization.
*
* @default null
*/
sanitizeFn?: null | ((input: string) => string);
}
// --------------------------------------------------------------------------------------

View File

@@ -25,6 +25,7 @@ declare namespace BPMNModdle {
interface TypeDerived {
$type: ElementType;
$parent: TypeDerived;
}
interface BaseElement extends TypeDerived {
/**

View File

@@ -7,7 +7,6 @@
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
/// <reference types="chokidar"/>
/// <reference types="node" />
/// <reference types="serve-static" />

View File

@@ -0,0 +1,6 @@
{
"private": true,
"dependencies": {
"chokidar": "^2.1.2"
}
}

View File

@@ -43,3 +43,12 @@ confetti({
y: 0.6
}
});
const canvas = document.createElement('canvas');
const myConfetti = confetti.create(canvas);
myConfetti();
myConfetti({
particleCount: 150
});

View File

@@ -1,4 +1,4 @@
// Type definitions for canvas-confetti 0.0
// Type definitions for canvas-confetti 0.1
// Project: https://github.com/catdad/canvas-confetti#readme
// Definitions by: Martin Tracey <https://github.com/matracey>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -81,6 +81,14 @@ declare namespace confetti {
*/
y?: number;
}
interface GlobalOptions {
resize: boolean;
}
function create(
canvas: HTMLCanvasElement,
options?: GlobalOptions
): (options?: Options) => Promise<null> | null;
}
export = confetti;

View File

@@ -2,7 +2,8 @@
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,

View File

@@ -87,7 +87,8 @@ export namespace policies {
interface DecisionInfo {
decision: number;
consistency: number;
consistency?: number;
useCurrentHost?: boolean;
}
interface RequestInfo {
@@ -115,8 +116,8 @@ export namespace policies {
onReadTimeout(requestInfo: RequestInfo, consistency: types.consistencies, received: number, blockFor: number, isDataPresent: boolean): DecisionInfo;
onUnavailable(requestInfo: RequestInfo, consistency: types.consistencies, required: number, alive: number): DecisionInfo;
onWriteTimeout(requestInfo: RequestInfo, consistency: types.consistencies, received: number, blockFor: number, writeType: string): DecisionInfo;
rethrowResult(): { decision: retryDecision };
retryResult(consistency?: types.consistencies, useCurrentHost?: boolean): { decision: retryDecision, consistency: types.consistencies, useCurrentHost: boolean };
rethrowResult(): DecisionInfo;
retryResult(consistency?: types.consistencies, useCurrentHost?: boolean): DecisionInfo;
}
}

40
types/cavy/cavy-tests.tsx Normal file
View File

@@ -0,0 +1,40 @@
import * as React from 'react';
import { TextInput, View, Text } from 'react-native';
import { hook, TestScope, WithTestHook, Tester } from 'cavy';
type Props = WithTestHook<{
foo: string;
}>;
class SampleComponent extends React.Component<Props> {
render() {
return (
<View ref={this.props.generateTestHook('View.Sample')}>
<Text>{this.props.foo}</Text>
<TextInput ref={this.props.generateTestHook("Input.Sample")} />
</View>
);
}
}
const HookedSampleComponent = hook(SampleComponent); // $ExpectType ComponentClass<{ foo: string; }, any>
function sampleSpec(spec: TestScope) {
spec.describe('it has a name and callback', () => {
spec.it('it has a name and callback', async () => {
spec.component.reRender(); // $ExpectType void
spec.component.clearAsync(); // $ExpectType Promise<void>
spec.findComponent('View.Sample'); // $ExpectType Promise<Component<{}, {}, any>>
spec.press('View.Sample'); // $ExpectType Promise<void>
spec.fillIn('Input.Sample', "hello world"); // $ExpectType Promise<void>
spec.pause(1000); // $ExpectType Promise<void>
spec.exists('View.Sample'); // $ExpectType Promise<true>
spec.notExists('View.MissingSample'); // $ExpectType Promise<true>
});
});
}
<Tester specs={[sampleSpec]} waitTime={42}>
<HookedSampleComponent foo="test" />
</Tester>;

40
types/cavy/index.d.ts vendored Normal file
View File

@@ -0,0 +1,40 @@
// Type definitions for cavy 0.6
// Project: https://github.com/pixielabs/cavy
// Definitions by: Tyler Hoffman <https://github.com/tyler-hoffman>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.0
import * as React from 'react';
export {};
type RefCallback = (element: React.ReactNode | null) => void;
export type TestHookGenerator = (label: string, callback?: RefCallback) => RefCallback;
export type WithTestHook<T extends {}> = T & { generateTestHook: TestHookGenerator };
export function hook<T extends {}>(component: React.ComponentClass<WithTestHook<T>>): React.ComponentClass<T>;
export interface TesterProps {
specs: Array<(spec: TestScope) => void>;
waitTime: number;
sendReport?: boolean;
}
export class Tester extends React.Component<TesterProps> {
reRender(): void;
clearAsync(): Promise<void>;
}
export class TestScope {
component: Tester;
findComponent(identifier: string): Promise<React.Component>;
describe(label: string, fn: () => void): void;
it(label: string, fn: () => void): void;
press(identifier: string): Promise<void>;
fillIn(identifier: string, str: string): Promise<void>;
pause(time: number): Promise<void>;
exists(identifier: string): Promise<true>;
notExists(identifier: string): Promise<true>;
}

View File

@@ -13,11 +13,12 @@
"../"
],
"types": [],
"jsx": "react",
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"tabris-plugin-firebase-tests.ts"
"cavy-tests.tsx"
]
}

View File

@@ -1,5 +1,5 @@
// Type definitions for Chart.js 2.7
// Project: https://github.com/nnnick/Chart.js, http://www.chartjs.org
// Project: https://github.com/nnnick/Chart.js, https://www.chartjs.org
// Definitions by: Alberto Nuti <https://github.com/anuti>
// Fabien Lavocat <https://github.com/FabienLavocat>
// KentarouTakeda <https://github.com/KentarouTakeda>
@@ -357,7 +357,7 @@ declare namespace Chart {
cornerRadius?: number;
multiKeyBackground?: string;
callbacks?: ChartTooltipCallback;
filter?(item: ChartTooltipItem): boolean;
filter?(item: ChartTooltipItem, data: ChartData): boolean;
itemSort?(itemA: ChartTooltipItem, itemB: ChartTooltipItem): number;
position?: string;
caretPadding?: number;

View File

@@ -24,6 +24,8 @@ if ($fromElement("ul > li").length !== 3) {
throw new Error("Expecting 3 elements when passing `CheerioElement` to `load()`");
}
$ = cheerio.load(Buffer.from(html));
$ = cheerio.load(html, {
normalizeWhitespace: true,
xmlMode: true

View File

@@ -1,8 +1,10 @@
// Type definitions for Cheerio v0.22.0
// Project: https://github.com/cheeriojs/cheerio
// Definitions by: Bret Little <https://github.com/blittle>, VILIC VANE <http://vilic.info>, Wayne Maurer <https://github.com/wmaurer>, Umar Nizamani <https://github.com/umarniz>, LiJinyao <https://github.com/LiJinyao>, Chennakrishna <https://github.com/chennakrishna8>, AzSiAz <https://github.com/AzSiAz>
// Definitions by: Bret Little <https://github.com/blittle>, VILIC VANE <http://vilic.info>, Wayne Maurer <https://github.com/wmaurer>, Umar Nizamani <https://github.com/umarniz>, LiJinyao <https://github.com/LiJinyao>, Chennakrishna <https://github.com/chennakrishna8>, AzSiAz <https://github.com/AzSiAz>, Ryo Ota <https://github.com/nwtgck>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
interface Cheerio {
// Document References
// Cheerio https://github.com/cheeriojs/cheerio
@@ -266,7 +268,7 @@ interface CheerioElement {
}
interface CheerioAPI extends CheerioSelector, CheerioStatic {
load(html: string, options?: CheerioOptionsInterface): CheerioStatic;
load(html: string | Buffer, options?: CheerioOptionsInterface): CheerioStatic;
load(element: CheerioElement, options?: CheerioOptionsInterface): CheerioStatic;
}

View File

@@ -213,7 +213,7 @@ $('ul').undelegate('click', 'li', () => {
$('li').on('click', () => {
$.noop;
});
$('ul').on('click', 'li', () => {
$('ul').on('click', 'li', function() {
console.log($(this).text());
});
$('li').off('click');

View File

@@ -1,57 +0,0 @@
import * as fs from 'fs';
import chokidar = require('chokidar');
const watcher = chokidar.watch('file, dir, or glob', {
ignored: /[\/\\]\./, persistent: true
});
const log = console.log.bind(console);
watcher
.on('add', (path: string) => {
log('File', path, 'has been added');
})
.on('addDir', (path: string) => {
log('Directory', path, 'has been added');
})
.on('change', (path: string) => {
log('File', path, 'has been changed');
})
.on('unlink', (path: string) => {
log('File', path, 'has been removed');
})
.on('unlinkDir', (path: string) => {
log('Directory', path, 'has been removed');
})
.on('error', (error: any) => {
log('Error happened', error);
})
.on('ready', () => {
log('Initial scan complete. Ready for changes.');
})
.on('raw', (event: string, path: string, details: any) => {
log('Raw event info:', event, path, details);
});
// 'add', 'addDir' and 'change' events also receive stat() results as second
// argument when available: http://nodejs.org/api/fs.html#fs_class_fs_stats
watcher.on('change', (path: string, stats: fs.Stats) => {
if (stats) {
console.log('File', path, 'changed size to', stats.size);
}
});
// Watch new files.
watcher.add('new-file');
watcher.add(['new-file-2', 'new-file-3', '**/other-file*']);
// Un-watch some files.
watcher.unwatch('new-file*');
// Only needed if watching is `persistent: true`.
watcher.close();
// One-liner
chokidar.watch('.', { ignored: /[\/\\]\./ }).on('all', (event: string, path: string) => {
console.log(event, path);
});

View File

@@ -1,170 +0,0 @@
// Type definitions for chokidar 1.7
// Project: https://github.com/paulmillr/chokidar
// Definitions by: Stefan Steinhart <https://github.com/reppners>
// Felix Becker <https://github.com/felixfbecker>
// Zach Cardoza <https://github.com/bayssmekanique>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
import * as fs from 'fs';
import { EventEmitter } from 'events';
/**
* The object's keys are all the directories (using absolute paths unless the `cwd` option was
* used), and the values are arrays of the names of the items contained in each directory.
*/
export interface WatchedPaths {
[directory: string]: string[];
}
export class FSWatcher extends EventEmitter implements fs.FSWatcher {
/**
* Constructs a new FSWatcher instance with optional WatchOptions parameter.
*/
constructor(options?: WatchOptions);
/**
* Add files, directories, or glob patterns for tracking. Takes an array of strings or just one
* string.
*/
add(paths: string | string[]): void;
/**
* Stop watching files, directories, or glob patterns. Takes an array of strings or just one
* string.
*/
unwatch(paths: string | string[]): void;
/**
* Returns an object representing all the paths on the file system being watched by this
* `FSWatcher` instance. The object's keys are all the directories (using absolute paths unless
* the `cwd` option was used), and the values are arrays of the names of the items contained in
* each directory.
*/
getWatched(): WatchedPaths;
/**
* Removes all listeners from watched files.
*/
close(): void;
}
export interface WatchOptions {
/**
* Indicates whether the process should continue to run as long as files are being watched. If
* set to `false` when using `fsevents` to watch, no more events will be emitted after `ready`,
* even if the process continues to run.
*/
persistent?: boolean;
/**
* ([anymatch](https://github.com/es128/anymatch)-compatible definition) Defines files/paths to
* be ignored. The whole relative or absolute path is tested, not just filename. If a function
* with two arguments is provided, it gets called twice per path - once with a single argument
* (the path), second time with two arguments (the path and the
* [`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats) object of that path).
*/
ignored?: any;
/**
* If set to `false` then `add`/`addDir` events are also emitted for matching paths while
* instantiating the watching as chokidar discovers these file paths (before the `ready` event).
*/
ignoreInitial?: boolean;
/**
* When `false`, only the symlinks themselves will be watched for changes instead of following
* the link references and bubbling events through the link's path.
*/
followSymlinks?: boolean;
/**
* The base directory from which watch `paths` are to be derived. Paths emitted with events will
* be relative to this.
*/
cwd?: string;
/**
* If set to true then the strings passed to .watch() and .add() are treated as literal path
* names, even if they look like globs. Default: false.
*/
disableGlobbing?: boolean;
/**
* Whether to use fs.watchFile (backed by polling), or fs.watch. If polling leads to high CPU
* utilization, consider setting this to `false`. It is typically necessary to **set this to
* `true` to successfully watch files over a network**, and it may be necessary to successfully
* watch files in other non-standard situations. Setting to `true` explicitly on OS X overrides
* the `useFsEvents` default.
*/
usePolling?: boolean;
/**
* Whether to use the `fsevents` watching interface if available. When set to `true` explicitly
* and `fsevents` is available this supercedes the `usePolling` setting. When set to `false` on
* OS X, `usePolling: true` becomes the default.
*/
useFsEvents?: boolean;
/**
* If relying upon the [`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats) object that
* may get passed with `add`, `addDir`, and `change` events, set this to `true` to ensure it is
* provided even in cases where it wasn't already available from the underlying watch events.
*/
alwaysStat?: boolean;
/**
* If set, limits how many levels of subdirectories will be traversed.
*/
depth?: number;
/**
* Interval of file system polling.
*/
interval?: number;
/**
* Interval of file system polling for binary files. ([see list of binary extensions](https://gi
* thub.com/sindresorhus/binary-extensions/blob/master/binary-extensions.json))
*/
binaryInterval?: number;
/**
* Indicates whether to watch files that don't have read permissions if possible. If watching
* fails due to `EPERM` or `EACCES` with this set to `true`, the errors will be suppressed
* silently.
*/
ignorePermissionErrors?: boolean;
/**
* `true` if `useFsEvents` and `usePolling` are `false`). Automatically filters out artifacts
* that occur when using editors that use "atomic writes" instead of writing directly to the
* source file. If a file is re-added within 100 ms of being deleted, Chokidar emits a `change`
* event rather than `unlink` then `add`. If the default of 100 ms does not work well for you,
* you can override it by setting `atomic` to a custom value, in milliseconds.
*/
atomic?: boolean | number;
/**
* can be set to an object in order to adjust timing params:
*/
awaitWriteFinish?: AwaitWriteFinishOptions | boolean;
}
export interface AwaitWriteFinishOptions {
/**
* Amount of time in milliseconds for a file size to remain constant before emitting its event.
*/
stabilityThreshold?: number;
/**
* File size polling interval.
*/
pollInterval?: number;
}
/**
* produces an instance of `FSWatcher`.
*/
export function watch(paths: string | string[], options?: WatchOptions): FSWatcher;

View File

@@ -1441,6 +1441,12 @@ export interface MediaInformation {
* The media tracks.
*/
tracks?: Track[];
/**
* VMAP ad request configuration. Used if breaks and breakClips are not
* provided.
*/
vmapAdsRequest?: VastAdsRequest;
}
/**

View File

@@ -0,0 +1,17 @@
import CipherBase = require("cipher-base");
const buf = new Buffer(1);
class CipherTest extends CipherBase {
constructor() {
super();
}
final() {
return buf;
}
update(testBuffer: Buffer) {
return testBuffer;
}
}

14
types/cipher-base/index.d.ts vendored Normal file
View File

@@ -0,0 +1,14 @@
// Type definitions for cipher-base 1.0
// Project: https://github.com/crypto-browserify/cipher-base
// Definitions by: Adam Zerella <https://github.com/adamzerella>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
declare abstract class CipherBase {
constructor(hashMode?: string);
abstract final(): Buffer;
abstract update(value: Buffer, inputEnc?: string, outputEnc?: string): Buffer;
}
export = CipherBase;

View File

@@ -0,0 +1,25 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [
],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"cipher-base-tests.ts"
]
}

View File

@@ -0,0 +1,3 @@
{
"extends": "dtslint/dt.json"
}

View File

@@ -1,5 +1,5 @@
// Type definitions for @ckeditor/ckeditor5-core 11.0
// Project: https://github.com/ckeditor/ckeditor5-core, https://ckeditor.com
// Project: https://github.com/ckeditor/ckeditor5-core, https://ckeditor.com/ckeditor-5
// Definitions by: denisname <https://github.com/denisname>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

View File

@@ -1,5 +1,5 @@
// Type definitions for @ckeditor/ckeditor5-engine 11.0
// Project: https://github.com/ckeditor/ckeditor5-engine, https://ckeditor.com
// Project: https://github.com/ckeditor/ckeditor5-engine, https://ckeditor.com/ckeditor-5
// Definitions by: denisname <https://github.com/denisname>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

View File

@@ -1,5 +1,5 @@
// Type definitions for @ckeditor/ckeditor5-utils 10.2
// Project: https://github.com/ckeditor/ckeditor5-utils, https://ckeditor.com
// Project: https://github.com/ckeditor/ckeditor5-utils, https://ckeditor.com/ckeditor-5
// Definitions by: denisname <https://github.com/denisname>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

View File

@@ -878,7 +878,7 @@ export class Buy implements Resource {
/**
* Associated transaction (e.g. a bank, fiat account)
*/
transaction: ResourceRef;
transaction: ResourceRef | null;
/**
* Amount in bitcoin, litecoin or ethereum
@@ -896,7 +896,7 @@ export class Buy implements Resource {
subtotal: MoneyHash;
/**
* Fee associated to this buy
* Fees associated to this buy
*/
fees: Fee[];
@@ -935,6 +935,26 @@ export class Buy implements Resource {
*/
requires_completion_step: boolean;
/**
* Transfer identifier
*/
id: string;
/**
* Reference code shown in user's dashboard.
*/
user_reference: string;
/**
* ISO timestamp
*/
created_at: string;
/**
* ISO timestamp
*/
updated_at: string;
/**
* Completes a buy that is created in commit: false state.
* If the exchange rate has changed since the buy was created, this call will fail with the error “The exchange rate updated while you
@@ -995,7 +1015,7 @@ export class Sell implements Resource {
/**
* Associated transaction (e.g. a bank, fiat account)
*/
transaction: ResourceRef;
transaction: ResourceRef | null;
/**
* Amount in bitcoin, litecoin or ethereum
@@ -1013,9 +1033,9 @@ export class Sell implements Resource {
subtotal: MoneyHash;
/**
* Fee associated to this sell
* Fees associated to this sell
*/
fee: MoneyHash;
fees: MoneyHash[];
/**
* Has this sell been committed?
@@ -1032,6 +1052,26 @@ export class Sell implements Resource {
*/
payout_at?: string;
/**
* Transfer identifier
*/
id: string;
/**
* Reference code shown in user's dashboard.
*/
user_reference: string;
/**
* ISO timestamp
*/
created_at: string;
/**
* ISO timestamp
*/
updated_at: string;
/**
* Completes a sell that is created in commit: false state.
* If the exchange rate has changed since the sell was created, this call will fail with the error “The exchange rate updated while you

View File

@@ -0,0 +1,61 @@
import Complex from "complex.js";
Complex.ZERO;
Complex.PI;
Complex.E;
Complex.I;
Complex.INFINITY;
Complex.EPSILON;
Complex.ONE;
Complex.NAN;
new Complex(1, 0);
new Complex(1, 0).abs();
new Complex(1, 0).acos();
new Complex(1, 0).acot();
new Complex(1, 0).acoth();
new Complex(1, 0).acsc();
new Complex(1, 0).acsch();
new Complex(1, 0).add(1, 2);
new Complex(1, 0).arg();
new Complex(1, 0).asec();
new Complex(1, 0).asech();
new Complex(1, 0).asin();
new Complex(1, 0).asinh();
new Complex(1, 0).atan();
new Complex(1, 0).atanh();
new Complex(1, 0).ceil(5);
new Complex(1, 0).clone();
new Complex(1, 0).conjugate();
new Complex(1, 0).cos();
new Complex(1, 0).cosh();
new Complex(1, 0).cot();
new Complex(1, 0).coth();
new Complex(1, 0).csc();
new Complex(1, 0).csch();
new Complex(1, 0).div(3, 1);
new Complex(1, 0).equals(5, 3);
new Complex(1, 0).exp();
new Complex(1, 0).floor(6);
new Complex(1, 0).inverse();
new Complex(1, 0).isFinite();
new Complex(1, 0).isInfinite();
new Complex(1, 0).isNaN();
new Complex(1, 0).isZero();
new Complex(1, 0).log();
new Complex(1, 0).mul(3, 1);
new Complex(1, 0).neg();
new Complex(1, 0).pow(1, 2);
new Complex(1, 0).round(3);
new Complex(1, 0).sec();
new Complex(1, 0).sech();
new Complex(1, 0).sign();
new Complex(1, 0).sin();
new Complex(1, 0).sinh();
new Complex(1, 0).sqrt();
new Complex(1, 0).sub(5, 1);
new Complex(1, 0).tan();
new Complex(1, 0).tanh();
new Complex(1, 0).toString();
new Complex(1, 0).toVector();
new Complex(1, 0).valueOf();

304
types/complex.js/index.d.ts vendored Normal file
View File

@@ -0,0 +1,304 @@
// Type definitions for complex.js 2.0
// Project: https://github.com/infusion/Complex.js
// Definitions by: Adam Zerella <https://github.com/adamzerella>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare class Complex {
/**
* A complex zero value (south pole on the Riemann Sphere).
*/
static ZERO: Complex;
/**
* A complex one instance.
*/
static ONE: Complex;
/**
* A complex infinity value (north pole on the Riemann Sphere).
*/
static INFINITY: Complex;
/**
* A complex NaN value (not on the Riemann Sphere).
*/
static NAN: Complex;
/**
* An imaginary number i instance.
*/
static I: Complex;
/**
* A complex PI instance.
*/
static PI: Complex;
/**
* A complex euler number instance.
*/
static E: Complex;
/**
* A small epsilon value used for equals() comparison in order to circumvent double inprecision.
*/
static EPSILON: number;
constructor(x: number, y: number);
/**
* Returns the complex sign, defined as the complex number
* normalized by it's absolute value.
*/
sign(): Complex;
/**
* Adds another complex number.
*/
add(a: number, b: number): Complex;
/**
* Subtracts another complex number.
*/
sub(a: number, b: number): Complex;
/**
* Multiplies the number with another complex number.
*/
mul(a: number, b: number): Complex;
/**
* Divides the number by another complex number.
*/
div(a: number, b: number): Complex;
/**
* Returns the number raised to the complex exponent.
*/
pow(a: number, b: number): Complex;
/**
* Returns the complex square root of the number.
*/
sqrt(): Complex;
/**
* Returns e^n with complex exponent n
*/
exp(): Complex;
/**
* Returns the natural logarithm (base E) of the actual complex number.
*/
log(): Complex;
/**
* Calculates the magnitude of the complex number.
*/
abs(): number;
/**
* Calculate the angle of the complex number.
*/
arg(): number;
/**
* Calculates the multiplicative inverse of the complex number (1 / z).
*/
inverse(): Complex;
/**
* Calculates the conjugate of the complex number (multiplies the imaginary part with -1).
*/
conjugate(): Complex;
/**
* Negates the number (multiplies both the real and imaginary part with -1) in order to get the additive inverse.
*/
neg(): Complex;
/**
* Floors the complex number parts towards zero.
*/
floor(places: number): Complex;
/**
* Ceils the complex number parts off zero.
*/
ceil(places: number): Complex;
/**
* Rounds the complex number parts.
*/
round(places: number): Complex;
/**
* Checks if both numbers are exactly the same,
* if both numbers are infinite they are considered not equal.
*/
equals(a: number, b: number): boolean;
/**
* Checks if the given number is not a number.
*/
isNaN(): boolean;
/**
* Determines whether or not a complex number is at the zero pole of the
* Riemann sphere.
*/
isZero(): boolean;
/**
* Checks if the given number is finite.
*/
isFinite(): boolean;
/**
* Determines whether or not a complex number is at the infinity pole of the
* Riemann sphere.
*/
isInfinite(): boolean;
/**
* Returns a new Complex instance with the same real and imaginary properties.
*/
clone(): Complex;
/**
* Returns a Vector of the actual complex number with two components.
*/
toVector(): number[];
/**
* Returns a string representation of the actual number. As of v1.9.0 the output is a bit more human readable.
*/
toString(): string;
/**
* Returns the real part of the number if imaginary part is zero. Otherwise null.
*/
valueOf(): number|undefined;
/**
* Calculate the sine of the complex number.
*/
sin(): Complex;
/**
* Calculate the complex arcus sinus.
*/
asin(): Complex;
/**
* Calculate the complex sinh.
*/
sinh(): Complex;
/**
* Calculate the complex asinh.
*/
asinh(): Complex;
/**
* Calculate the cosine.
*/
cos(): Complex;
/**
* Calculate the complex arcus cosinus.
*/
acos(): Complex;
/**
* Calculate the complex cosh.
*/
cosh(): Complex;
/**
* Calculate the complex asinh.
*/
acosh(): Complex;
/**
* Calculate the tangent.
*/
tan(): Complex;
/**
* Calculate the complex arcus tangent.
*/
atan(): Complex;
/**
* Calculate the complex tanh.
*/
tanh(): Complex;
/**
* Calculate the complex atanh.
*/
atanh(): Complex;
/**
* Calculate the cotangent.
*/
cot(): Complex;
/**
* Calculate the complex arcus cotangent.
*/
acot(): Complex;
/**
* Calculate the complex coth.
*/
coth(): Complex;
/**
* Calculate the complex acoth.
*/
acoth(): Complex;
/**
* Calculate the secant.
*/
sec(): Complex;
/**
* Calculate the complex arcus secant.
*/
asec(): Complex;
/**
* Calculate the complex sech.
*/
sech(): Complex;
/**
* Calculate the complex asech.
*/
asech(): Complex;
/**
* Calculate the cosecans.
*/
csc(): Complex;
/**
* Calculate the complex arcus cosecans.
*/
acsc(): Complex;
/**
* Calculate the complex csch.
*/
csch(): Complex;
/**
* Calculate the complex acsch.
*/
acsch(): Complex;
}
export default Complex;

View File

@@ -0,0 +1,25 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [
],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"complex.js-tests.ts"
]
}

View File

@@ -0,0 +1,3 @@
{
"extends": "dtslint/dt.json"
}

View File

@@ -1,6 +1,7 @@
// Type definitions for connect-datadog 0.0
// Project: https://github.com/AppPress/node-connect-datadog
// Project: https://github.com/datadog/node-connect-datadog
// Definitions by: Moshe Good <https://github.com/moshegood>
// Michael Mifsud <https://github.com/xzyfer>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
@@ -19,6 +20,6 @@ declare namespace Factory {
method?: boolean;
protocol?: boolean;
response_code?: boolean;
dogstatsd?: dogstatsd.StatsD;
dogstatsd?: dogstatsd.StatsDClient;
}
}

View File

@@ -45,8 +45,8 @@ app.use(session({
// NativeMongoPromiseOptions
var Client = mongodb.MongoClient;
var mongoDbPromise = Client.connect('mongodb://localhost/test');
var mongoDbPromise = Client.connect('mongodb://localhost/test').then(client => client.db())
app.use(session({
secret: 'secret',
store: new MongoStore({ dbPromise: mongoDbPromise})
store: new MongoStore({ dbPromise: mongoDbPromise })
}));

View File

@@ -4,14 +4,6 @@
"lib": [
"es6"
],
"paths": {
"mongodb": [
"mongodb/v2"
],
"mongoose": [
"mongoose/v4"
]
},
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,

View File

@@ -511,6 +511,7 @@ consul = new Consul();
// Consul.Health
{
let health: Consul.Health = consul.health;
let name: string;
health = new HealthStatic(consul);
consul = health.consul;

View File

@@ -35,6 +35,7 @@ class Readme {
});
const req = {
__subset: 'subset',
type: 'randomRequest',
payload: {
val: Math.floor(Math.random() * 10)
@@ -52,7 +53,8 @@ class Readme {
name: 'Random Responder',
namespace: 'rnd',
key: 'a certain key',
respondsTo: ['randomRequest']
respondsTo: ['randomRequest'],
subset: 'subset'
});
interface RandomRequest {

View File

@@ -1,4 +1,4 @@
// Type definitions for cote 0.17
// Type definitions for cote 0.19
// Project: https://github.com/dashersw/cote#readme
// Definitions by: makepost <https://github.com/makepost>
// Labat Robin <https://github.com/roblabat>
@@ -115,6 +115,11 @@ export interface ResponderAdvertisement extends Advertisement {
* Request types that a Responder can listen to.
*/
respondsTo?: string[];
/**
* Advertisement attribute that lets you target a subgroup of responders using the __subset property of a request.
*/
subset?: string;
}
export class Publisher extends Component {

View File

@@ -1,5 +1,7 @@
import cron = require('cron');
import moment = require('moment');
var CronJob = cron.CronJob;
var CronTime = cron.CronTime;
@@ -34,6 +36,16 @@ var job = new CronJob(new Date(), () => {
timeZone /* Time zone of this job. */
);
// Another example with Moment
var job = new CronJob(moment(), () => {
/* runs once at the specified moment. */
}, () => {
/* This function is executed when the job stops */
},
true, /* Start the job right now */
timeZone /* Time zone of this job. */
);
// For good measure
var job = new CronJob({
cronTime: '00 30 11 * * 1-5',
@@ -48,7 +60,8 @@ var job = new CronJob({
timeZone: 'America/Los_Angeles'
});
console.log(job.lastDate());
console.log(job.nextDates(1));
console.log(job.nextDates());// Should be a Moment object
console.log(job.nextDates(1));// Should be an array of Moment object
console.log(job.running);
job.setTime(new CronTime('00 30 11 * * 1-2'));
job.start();
@@ -67,4 +80,5 @@ try {
// Check cronTime fomat
new CronTime('* * * * * *');
new CronTime(new Date());
new CronTime(moment());

22
types/cron/index.d.ts vendored
View File

@@ -4,6 +4,8 @@
// Lundarl Gholoi <https://github.com/winup>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import { Moment } from 'moment';
export declare class CronTime {
/**
* Create a new ```CronTime```.
@@ -11,13 +13,14 @@ export declare class CronTime {
* @param zone Timezone name. You can check all timezones available at [Moment Timezone Website](http://momentjs.com/timezone/).
* @param utcOffset UTC offset. Don't use both ```zone``` and ```utcOffset``` together or weird things may happen.
*/
constructor(source: string | Date, zone?: string, utcOffset?: string | number);
constructor(source: string | Date | Moment, zone?: string, utcOffset?: string | number);
/**
* Tells you when ```CronTime``` will be run.
* @param i Indicate which turn of run after now. If not given return next run time.
*/
public sendAt(i?: number): Date;
public sendAt(): Moment;
public sendAt(i?: number): Moment[];
/**
* Get the number of milliseconds in the future at which to fire our callbacks.
*/
@@ -28,7 +31,7 @@ export declare interface CronJobParameters {
/**
* The time to fire off your job. This can be in the form of cron syntax or a JS ```Date``` object.
*/
cronTime: string | Date;
cronTime: string | Date | Moment;
/**
* The function to fire at the specified time. If an ```onComplete``` callback was provided, ```onTick``` will receive it as an argument. ```onTick``` may call ```onComplete``` when it has finished its work.
*/
@@ -85,7 +88,7 @@ export declare class CronJob {
* @param utcOffset This allows you to specify the offset of your timezone rather than using the ```timeZone``` param. Probably don't use both ```timeZone``` and ```utcOffset``` together or weird things may happen.
* @param unrefTimeout If you have code that keeps the event loop running and want to stop the node process when that finishes regardless of the state of your cronjob, you can do so making use of this parameter. This is off by default and cron will run as if it needs to control the event loop. For more information take a look at [timers#timers_timeout_unref](https://nodejs.org/api/timers.html#timers_timeout_unref) from the NodeJS docs.
*/
constructor(cronTime: string | Date, onTick: () => void, onComplete?: () => void, start?: boolean, timeZone?: string, context?: any, runOnInit?: boolean, utcOffset?: string | number, unrefTimeout?: boolean);
constructor(cronTime: string | Date | Moment, onTick: () => void, onComplete?: () => void, start?: boolean, timeZone?: string, context?: any, runOnInit?: boolean, utcOffset?: string | number, unrefTimeout?: boolean);
/**
* Create a new ```CronJob```.
* @param options Job parameters.
@@ -113,7 +116,8 @@ export declare class CronJob {
* Tells you when a ```CronTime``` will be run.
* @param i Indicate which turn of run after now. If not given return next run time.
*/
public nextDates(i?: number): Date;
public nextDates(): Moment;
public nextDates(i?: number): Moment[];
/**
* Add another ```onTick``` function.
* @param callback Target function.
@@ -122,8 +126,8 @@ export declare class CronJob {
}
export declare var job:
((cronTime: string | Date, onTick: () => void, onComplete?: () => void, start?: boolean, timeZone?: string, context?: any, runOnInit?: boolean, utcOffset?: string | number, unrefTimeout?: boolean) => CronJob)
((cronTime: string | Date | Moment, onTick: () => void, onComplete?: () => void, start?: boolean, timeZone?: string, context?: any, runOnInit?: boolean, utcOffset?: string | number, unrefTimeout?: boolean) => CronJob)
| ((options: CronJobParameters) => CronJob);
export declare var time: (source: string | Date, zone?: string) => CronTime;
export declare var sendAt: (cronTime: CronTime) => Date;
export declare var timeout: (cronTime: CronTime) => number;
export declare var time: (source: string | Date | Moment, zone?: string) => CronTime;
export declare var sendAt: (cronTime: string | Date | Moment) => Moment;
export declare var timeout: (cronTime: string | Date | Moment) => number;

6
types/cron/package.json Normal file
View File

@@ -0,0 +1,6 @@
{
"private": true,
"dependencies": {
"moment": ">=2.14.0"
}
}

View File

@@ -8,7 +8,7 @@ pw.on('error', (err: Error) => {
console.log(err);
});
const r1: Error = spawn.sync('foo').error;
const r1: Error | undefined = spawn.sync('foo').error;
const r2: string[] = spawn.sync('foo').output;
const r3: Buffer = spawn.sync('foo').stdout;
const r4: Buffer = spawn.sync('foo').stderr;

View File

@@ -1,12 +1,21 @@
// Type definitions for cypress-axe 0.3
// Type definitions for cypress-axe 0.4
// Project: https://github.com/avanslaars/cypress-axe#readme
// Definitions by: Justin Hall <https://github.com/wKovacs64>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
declare namespace Cypress {
interface Chainable<Subject = any> {
injectAxe(): void;
checkA11y(): void;
import { ElementContext, RunOptions } from 'axe-core';
declare module 'axe-core' {
interface Node {}
}
declare global {
namespace Cypress {
interface Chainable<Subject = any> {
injectAxe(): void;
checkA11y(context?: ElementContext, options?: RunOptions): void;
configureAxe(options?: RunOptions): void;
}
}
}

View File

@@ -0,0 +1,6 @@
{
"private": true,
"dependencies": {
"axe-core": "^3.1.2"
}
}

View File

@@ -1 +1,6 @@
{ "extends": "dtslint/dt.json" }
{
"extends": "dtslint/dt.json",
"rules": {
"no-empty-interface": false
}
}

View File

@@ -27,8 +27,11 @@ d3.layout.cloud().size([300, 300])
.font("Impact")
.fontSize(function(d:ICompTextSize) { return d.size; })
.on("end", draw)
.random()
.canvas()
.start();
function draw(words:ICompTextSize[]) {
d3.select("body").append("svg")
.attr("width", 300)

View File

@@ -1,6 +1,6 @@
// Type definitions for d3JS cloud layout plugin by Jason Davies v1.2.2
// Type definitions for d3JS cloud layout plugin by Jason Davies v1.2.5
// Project: https://github.com/jasondavies/d3-cloud
// Definitions by: hans windhoff <https://github.com/hansrwindhoff>
// Definitions by: hans windhoff <https://github.com/hansrwindhoff>, locknono <https://github.com/locknono>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import * as d3 from 'd3';
@@ -71,6 +71,24 @@ declare module 'd3' {
padding(padding: number): Cloud<T>;
padding(padding: (datum: T, index: number) => number): Cloud<T>;
/**
* If specified, sets the internal random number generator,used for selecting the initial position of each word,
* and the clockwise/counterclockwise direction of the spiral for each word.
*
* @param randomFunction should return a number in the range [0, 1).The default is Math.random.
*/
random(): Cloud<T>;
random(randomFunction: () => number): Cloud<T>;
/**
* If specified, sets the canvas generator function, which is used internally to draw text.
* When using Node.js, you will almost definitely override the default, e.g. using the canvas module.
* @param canvasGenerator should return a HTMLCanvasElement.The default is: ()=>{document.createElement("canvas");}
*
*/
canvas():Cloud<T>;
canvas(canvasGenerator: () => HTMLCanvasElement): Cloud<T>;
on(type: "word", listener: (word: T) => void): Cloud<T>;
on(type: "end", listener: (tags: T[], bounds: { x: number; y: number }[]) => void): Cloud<T>;
on(type: string, listener: (...args: any[]) => void): Cloud<T>;

View File

@@ -0,0 +1,43 @@
import datadog = require('node-dogstatsd');
import Collector = require('datadog-statsd-metrics-collector');
const client = new datadog.StatsD('localhost');
// constructors
let collector = new Collector(client);
collector = new Collector(client, 1000);
// interface
const key = 'key';
const timeValue = 99;
const sampleRate = 0.85;
const incrementBy = 7;
const decrementBy = 5;
const gaugeValue = 199;
const tags: string[] = ['tag1', 'tag2'];
collector.timing(key, timeValue);
collector.timing(key, timeValue, sampleRate);
collector.timing(key, timeValue, sampleRate, tags);
collector.increment(key);
collector.increment(key, sampleRate);
collector.increment(key, sampleRate, tags);
collector.incrementBy(key, incrementBy);
collector.incrementBy(key, incrementBy, tags);
collector.decrement(key);
collector.decrement(key, sampleRate);
collector.decrement(key, sampleRate, tags);
collector.decrementBy(key, decrementBy);
collector.decrementBy(key, decrementBy, tags);
collector.gauge(key, gaugeValue);
collector.gauge(key, gaugeValue, sampleRate);
collector.gauge(key, gaugeValue, sampleRate, tags);
collector.histogram(key, timeValue);
collector.histogram(key, timeValue, sampleRate);
collector.histogram(key, timeValue, sampleRate, tags);

View File

@@ -0,0 +1,24 @@
// Type definitions for datadog-statsd-metrics-collector 1.1
// Project: https://github.com/xzyfer/datadog-statsd-metrics-collector#readme
// Definitions by: Michael Mifsud <https://github.com/xzyfer>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import dogstatsd = require('node-dogstatsd');
declare class Collector implements dogstatsd.StatsDClient {
constructor(client: dogstatsd.StatsDClient, delayMilliseconds?: number);
timing(stat: string, time: number, sample_rate?: number, tags?: string[]): void;
increment(stat: string, sample_rate?: number, tags?: string[]): void;
incrementBy(stat: string, value: number, tags?: string[]): void;
decrement(stat: string, sample_rate?: number, tags?: string[]): void;
decrementBy(stat: string, value: number, tags?: string[]): void;
gauge(stat: string, value: number, sample_rate?: number, tags?: string[]): void;
histogram(stat: string, time: number, sample_rate?: number, tags?: string[]): void;
}
export = Collector;

View File

@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"datadog-statsd-metrics-collector-tests.ts"
]
}

View File

@@ -578,7 +578,7 @@ $('#example tbody').on('click', 'td', () => {
const cell_invalidate_1 = cell.invalidate();
const cell_invalidate_2 = cell.invalidate("data");
$('#example tbody').on('click', 'td', () => {
$('#example tbody').on('click', 'td', function() {
this.innerHTML = (parseInt(this.innerHTML, 10) + 1).toString();
dt.cell(this).invalidate().draw();
});
@@ -773,7 +773,7 @@ let column_search_set = column.search("string");
column_search_set = column.search("string", true);
column_search_set = column.search("string", true, false);
column_search_set = column.search("string", true, false, true);
$('#column3_search').on('keyup', () => {
$('#column3_search').on('keyup', function() {
dt
.columns(3)
.search((this as HTMLInputElement).value)

View File

@@ -0,0 +1,86 @@
import * as date from "date-and-time";
const now = new Date();
// $ExpectType string
date.format(now, "YYYY/MM/DD HH:mm:ss"); // => '2015/01/02 23:14:05'
// $ExpectType string
date.format(now, "ddd MMM DD YYYY"); // => 'Fri Jan 02 2015'
// $ExpectType string
date.format(now, "hh:mm A [GMT]Z"); // => '11:14 p.m. GMT-0800'
// $ExpectType string
date.format(now, "hh:mm A [GMT]Z", true); // => '07:14 a.m. GMT+0000'
// $ExpectType number | Date
date.parse("2015/01/02 23:14:05", "YYYY/MM/DD HH:mm:ss"); // => date object
// $ExpectType number | Date
date.parse("02-01-2015", "DD-MM-YYYY"); // => date object
// $ExpectType number | Date
date.parse("Jam 1 2017", "MMM D YYYY"); // => NaN
// $ExpectType boolean
date.isValid("2015/01/02 23:14:05", "YYYY/MM/DD HH:mm:ss"); // => true
// $ExpectType boolean
date.isValid("29-02-2015", "DD-MM-YYYY"); // => false
// $ExpectType Date
date.addYears(now, 1); // => Date object
// $ExpectType Date
date.addMonths(now, 1); // => Date object
// $ExpectType Date
date.addDays(now, -1); // => Date object
// $ExpectType Date
date.addHours(now, -1); // => Date object
// $ExpectType Date
date.addMinutes(now, 2); // => Date object
// $ExpectType Date
date.addSeconds(now, -3); // => Date object
// $ExpectType Date
date.addMilliseconds(now, 1); // => Date object
const today = new Date(2015, 0, 2);
const yesterday = new Date(2015, 0, 1);
// $ExpectType Subtract
date.subtract(today, yesterday);
// $ExpectType number
date.subtract(today, yesterday).toDays(); // => 1 = today - yesterday
// $ExpectType number
date.subtract(today, yesterday).toHours(); // => 24
// $ExpectType number
date.subtract(today, yesterday).toMinutes(); // => 1440
// $ExpectType number
date.subtract(today, yesterday).toSeconds(); // => 86400
// $ExpectType number
date.subtract(today, yesterday).toMilliseconds(); // => 86400000
const date1 = new Date(2015, 0, 2);
const date2 = new Date(2012, 0, 2);
// $ExpectType boolean
date.isLeapYear(date1); // => false
// $ExpectType boolean
date.isLeapYear(date2); // => true
const date1_ = new Date(2017, 0, 2, 0); // Jan 2 2017 00:00:00
const date2_ = new Date(2017, 0, 2, 23, 59); // Jan 2 2017 23:59:00
const date3 = new Date(2017, 0, 1, 23, 59); // Jan 1 2017 23:59:00
// $ExpectType boolean
date.isSameDay(date1_, date2_); // => true
// $ExpectType boolean
date.isSameDay(date1_, date3); // => false
// $ExpectType string
date.locale();
// $ExpectType any
date.getLocales();
// $ExpectType void
date.setLocales("en", {
A: ["AM", "PM"]
});

150
types/date-and-time/index.d.ts vendored Normal file
View File

@@ -0,0 +1,150 @@
// Type definitions for date-and-time 0.6
// Project: https://github.com/knowledgecode/date-and-time
// Definitions by: Daniel Plisetsky <https://github.com/danplisetsky>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export type getDelta = () => number;
export interface Subtract {
toMilliseconds: getDelta;
toSeconds: getDelta;
toMinutes: getDelta;
toHours: getDelta;
toDays: getDelta;
}
/**
* Formatting a date
* @param dateObj - Date object
* @param formatString - Format string
* @param [utc] - Output as UTC
* @returns The formatted string
*
*/
export function format(
dateObj: Date,
formatString: string,
utc?: boolean
): string;
/**
* Parsing a date string
* @param dateString - date string
* @param formatString - format string
* @param [utc] - input as UTC
* @returns the constructed date or NaN
*/
export function parse(
dateString: string,
formatString: string,
utc?: boolean
): Date | number;
/**
* Validation
* @param dateString - Date string
* @param formatString - Format string
* @returns Whether the date string is a valid date
*/
export function isValid(dateString: string, formatString: string): boolean;
/**
* Adding years
* @param dateObj - Date object
* @param years - Adding year
* @returns The date after adding the value
*/
export function addYears(dateObj: Date, years: number): Date;
/**
* Adding months
* @param dateObj - Date object
* @param months - Adding month
* @returns The date after adding the value
*/
export function addMonths(dateObj: Date, months: number): Date;
/**
* Adding days
* @param dateObj - Date object
* @param days - Adding day
* @returns The date after adding the value
*/
export function addDays(dateObj: Date, days: number): Date;
/**
* Adding hours
* @param dateObj - Date object
* @param hours - Adding hour
* @returns The date after adding the value
*/
export function addHours(dateObj: Date, hours: number): Date;
/**
* Adding minutes
* @param dateObj - Date object
* @param minutes - Adding minute
* @returns The date after adding the value
*/
export function addMinutes(dateObj: Date, minutes: number): Date;
/**
* Adding seconds
* @param dateObj - date object
* @param seconds - adding second
* @returns The date after adding the value
*/
export function addSeconds(dateObj: Date, seconds: number): Date;
/**
* Adding milliseconds
* @param dateObj - Date object
* @param milliseconds - Adding millisecond
* @returns The date after adding the value
*/
export function addMilliseconds(dateObj: Date, milliseconds: number): Date;
/**
* Subtracting
* @param date1 - Date object
* @param date2 - Date object
* @returns The result object after subtracting the date
*/
export function subtract(date1: Date, date2: Date): Subtract;
/**
* Leap year
* @param dateObj - Date object
* @returns Whether the year is a leap year
*/
export function isLeapYear(dateObj: Date): boolean;
/**
* Comparison of dates
* @param date1 - Target for comparison
* @param date2 - Target for comparison
* @returns Whether the dates are the same day (times are ignored)
*/
export function isSameDay(date1: Date, date2: Date): boolean;
/**
* Setting a locale
* @param [code] - Language code
* @returns Current language code
*/
export function locale(code?: string): string;
/**
* Getting a definition of locale
* @param [code] - Language code
* @returns Definition of locale
*/
export function getLocales(code?: string): any;
/**
* Adding a new definition of locale
* @param code - Language code
* @param options - Definition of locale
* @returns
*/
export function setLocales(code: string, options: any): void;

View File

@@ -0,0 +1,16 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": ["es6"],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": ["../"],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": ["index.d.ts", "date-and-time-tests.ts"]
}

View File

@@ -1,47 +0,0 @@
import del = require('del');
let paths = ['build', 'dist/**/*.js'];
del(['tmp/*.js', '!tmp/unicorn.js']);
del(['tmp/*.js', '!tmp/unicorn.js'], { force: true });
del(['tmp/*.js', '!tmp/unicorn.js'], { dryRun: true });
del(['tmp/*.js', '!tmp/unicorn.js'], { concurrency: 20 });
del(['tmp/*.js', '!tmp/unicorn.js'], { cwd: '' });
del(['tmp/*.js', '!tmp/unicorn.js']).then((paths: string[]) => {
console.log('Deleted files/folders:\n', paths.join('\n'));
});
del(['tmp/*.js', '!tmp/unicorn.js'], { force: true }).then(
(paths: string[]) => {
console.log('Deleted files/folders:\n', paths.join('\n'));
}
);
del('tmp/*.js');
del('tmp/*.js', { force: true });
del('tmp/*.js', { dryRun: true });
del('tmp/*.js', { concurrency: 20 });
del('tmp/*.js', { cwd: '' });
del('tmp/*.js').then((paths: string[]) => {
console.log('Deleted files/folders:\n', paths.join('\n'));
});
del('tmp/*.js', { force: true }).then((paths: string[]) => {
console.log('Deleted files/folders:\n', paths.join('\n'));
});
paths = del.sync(['tmp/*.js', '!tmp/unicorn.js']);
paths = del.sync(['tmp/*.js', '!tmp/unicorn.js'], { force: true });
paths = del.sync('tmp/*.js');
paths = del.sync('tmp/*.js', { force: true });
paths = del.sync('tmp/*.js', { dryRun: true });
paths = del.sync('tmp/*.js', { concurrency: 20 });
paths = del.sync('tmp/*.js', { cwd: '' });
const immutable: ReadonlyArray<string> = ['tmp/*.js', '!tmp/unicorn.js'];
const mutable = del(immutable);
const mutablePaths = del.sync(immutable);
mutable.then(paths => paths.push('test'));
mutablePaths.push('test');

29
types/del/index.d.ts vendored
View File

@@ -1,29 +0,0 @@
// Type definitions for del 3.0
// Project: https://github.com/sindresorhus/del
// Definitions by: Asana <https://asana.com>
// Aya Morisawa <https://github.com/AyaMorisawa>
// BendingBender <https://github.com/BendingBender>
// Jason Dreyzehner <https://github.com/bitjson>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import glob = require('glob');
declare function del(
patterns: string | ReadonlyArray<string>,
options?: del.Options
): Promise<string[]>;
declare namespace del {
function sync(
patterns: string | ReadonlyArray<string>,
options?: Options
): string[];
interface Options extends glob.IOptions {
force?: boolean;
dryRun?: boolean;
concurrency?: number;
}
}
export = del;

View File

@@ -1,37 +0,0 @@
import del = require("del");
let paths = ["build", "dist/**/*.js"];
del(["tmp/*.js", "!tmp/unicorn.js"]);
del(["tmp/*.js", "!tmp/unicorn.js"], {force: true});
del(["tmp/*.js", "!tmp/unicorn.js"]).then((paths: string[]) => {
console.log('Deleted files/folders:\n', paths.join('\n'));
});
del(["tmp/*.js", "!tmp/unicorn.js"], {force: true}).then((paths: string[]) => {
console.log('Deleted files/folders:\n', paths.join('\n'));
});
del("tmp/*.js");
del("tmp/*.js", {force: true});
del("tmp/*.js").then((paths: string[]) => {
console.log('Deleted files/folders:\n', paths.join('\n'));
});
del("tmp/*.js", {force: true}).then((paths: string[]) => {
console.log('Deleted files/folders:\n', paths.join('\n'));
});
paths = del.sync(["tmp/*.js", "!tmp/unicorn.js"]);
paths = del.sync(["tmp/*.js", "!tmp/unicorn.js"], {force: true});
paths = del.sync("tmp/*.js");
paths = del.sync("tmp/*.js", {force: true});
paths = del.sync("tmp/*.js", {dryRun: true});

View File

@@ -1,19 +0,0 @@
// Type definitions for del 2.2
// Project: https://github.com/sindresorhus/del
// Definitions by: Asana <https://asana.com>, Aya Morisawa <https://github.com/AyaMorisawa>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import glob = require("glob");
declare function del(patterns: string | string[], options?: del.Options): Promise<string[]>;
declare namespace del {
function sync(patterns: string | string[], options?: Options): string[];
interface Options extends glob.IOptions {
force?: boolean;
dryRun?: boolean;
}
}
export = del;

View File

@@ -1,6 +0,0 @@
{
"extends": "dtslint/dt.json",
"rules": {
"dt-header": false
}
}

View File

@@ -42,6 +42,16 @@ declare global {
*/
cleanup(): Promise<void>;
}
// Detox exports all methods from detox global and all of the global constants.
interface DetoxExport extends Detox {
device: Device;
element: Element;
waitFor: WaitFor;
expect: Expect<Expect<any>>;
by: Matchers;
}
interface Device {
/**
* Launch the app
@@ -434,10 +444,6 @@ declare global {
}
}
export { by, detox, device, element, waitFor };
declare const detoxExport: Detox.DetoxExport;
// Not exporting the global `expect` from the top of the file here
// because `expect` conflicts with the global `expect` of jest and
// therefore exporting it doesn't work. The global `expect` is kept
// for backwards compatibility though.
export const expect: Detox.Expect<Detox.Expect<any>>;
export = detoxExport;

View File

@@ -9,4 +9,4 @@ interface DetoxJestAdapter {
declare const adapter: DetoxJestAdapter;
export default adapter;
export = adapter;

View File

@@ -6,4 +6,4 @@ interface DetoxMochaAdapter {
declare const adapter: DetoxMochaAdapter;
export default adapter;
export = adapter;

View File

@@ -2,7 +2,8 @@ declare var beforeAll: (callback: () => void) => void;
declare var beforeEach: (callback: () => void) => void;
declare var afterAll: (callback: () => void) => void;
import adapter from "detox/runners/jest/adapter";
import detox = require("detox");
import adapter = require("detox/runners/jest/adapter");
// Normally the Detox configuration from the project's package.json like so:
// const config = require("./package.json").detox;

View File

@@ -5,7 +5,8 @@ declare var beforeEach: (callback: () => void) => void;
declare var after: (callback: () => void) => void;
declare var afterEach: (callback: () => void) => void;
import adapter from "detox/runners/mocha/adapter";
import * as detox from "detox";
import * as adapter from "detox/runners/mocha/adapter";
// Normally the Detox configuration from the project's package.json like so:
// const config = require("./package.json").detox;

Some files were not shown because too many files have changed in this diff Show More