mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 21:10:23 +00:00
Merge remote-tracking branch 'upstream/master' into types/gl-vec3
This commit is contained in:
+31
-1
@@ -780,6 +780,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",
|
||||
@@ -1110,6 +1116,12 @@
|
||||
"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 +1146,23 @@
|
||||
"sourceRepoURL": "http://onsen.io",
|
||||
"asOfVersion": "2.0.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-throttle",
|
||||
"typingsPackageName": "p-throttle",
|
||||
"sourceRepoURL": "https://github.com/sindresorhus/p-throttle",
|
||||
"asOfVersion": "2.0.0"
|
||||
"asOfVersion": "2.1.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "param-case",
|
||||
@@ -1788,6 +1812,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",
|
||||
|
||||
Vendored
+5
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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+/
|
||||
});
|
||||
|
||||
@@ -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'
|
||||
},
|
||||
|
||||
+38
-1
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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}, `;
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
);
|
||||
|
||||
Vendored
+113
-1
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
Vendored
+2
-1
@@ -26,6 +26,7 @@
|
||||
// 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>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@@ -34,7 +35,7 @@ export interface APIGatewayEventRequestContext {
|
||||
accountId: string;
|
||||
apiId: string;
|
||||
authorizer?: AuthResponseContext | null;
|
||||
connectedAt: number;
|
||||
connectedAt?: number;
|
||||
connectionId?: string;
|
||||
domainName?: string;
|
||||
eventType?: string;
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Vendored
+464
-464
@@ -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;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": false,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
|
||||
Vendored
+14
-10
@@ -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"];
|
||||
|
||||
Vendored
+33
-13
@@ -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
|
||||
|
||||
@@ -43,3 +43,12 @@ confetti({
|
||||
y: 0.6
|
||||
}
|
||||
});
|
||||
|
||||
const canvas = document.createElement('canvas');
|
||||
const myConfetti = confetti.create(canvas);
|
||||
|
||||
myConfetti();
|
||||
|
||||
myConfetti({
|
||||
particleCount: 150
|
||||
});
|
||||
|
||||
Vendored
+9
-1
@@ -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;
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
|
||||
Vendored
+4
-3
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
@@ -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();
|
||||
Vendored
+304
@@ -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;
|
||||
@@ -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"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
// 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>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Vendored
+6
-1
@@ -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 {
|
||||
|
||||
@@ -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());
|
||||
|
||||
|
||||
Vendored
+13
-9
@@ -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;
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"moment": ">=2.14.0"
|
||||
}
|
||||
}
|
||||
@@ -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)
|
||||
|
||||
Vendored
+5
@@ -1,6 +1,7 @@
|
||||
// Type definitions for discord-rpc 3.0
|
||||
// Project: https://github.com/discordjs/RPC#readme
|
||||
// Definitions by: Jason Bothell <https://github.com/jasonhaxstuff>
|
||||
// Jack Baron <https://github.com/lolPants>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import { EventEmitter } from 'events';
|
||||
@@ -66,6 +67,10 @@ export class Client extends EventEmitter {
|
||||
subscribe(event: string, args: any, callback: (data: any) => void): Promise<Subscription>;
|
||||
|
||||
destroy(): Promise<void>;
|
||||
|
||||
on(event: 'ready' | 'connected', listener: () => void): this;
|
||||
once(event: 'ready' | 'connected', listener: () => void): this;
|
||||
off(event: 'ready' | 'connected', listener: () => void): this;
|
||||
}
|
||||
|
||||
export interface RPCClientOptions {
|
||||
|
||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
// Type definitions for drivelist 6.4
|
||||
// Project: https://github.com/resin-io-modules/drivelist
|
||||
// Project: https://github.com/balena-io-modules/drivelist
|
||||
// Definitions by: Xiao Deng <https://github.com/WholeMilk>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
|
||||
Vendored
+3
-2
@@ -543,8 +543,9 @@ export namespace DS {
|
||||
* invoking the callback with the name of each relationship and its relationship
|
||||
* descriptor.
|
||||
*/
|
||||
eachRelationship(
|
||||
callback: (name: string, details: RelationshipMeta<this>) => void,
|
||||
eachRelationship<T extends Model>(
|
||||
this: T,
|
||||
callback: (name: string, details: RelationshipMeta<T>) => void,
|
||||
binding?: any
|
||||
): any;
|
||||
/**
|
||||
|
||||
@@ -26,7 +26,7 @@ p.eachRelationship((n, meta) => {
|
||||
let m: 'belongsTo' | 'hasMany' = meta.kind;
|
||||
});
|
||||
|
||||
class Comment extends DS.Model {
|
||||
export class Comment extends DS.Model {
|
||||
author = DS.attr('string');
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import Ember from 'ember';
|
||||
import DS from 'ember-data';
|
||||
import { assertType } from './lib/assert';
|
||||
import { Comment } from './relationships';
|
||||
|
||||
declare const store: DS.Store;
|
||||
|
||||
@@ -119,7 +120,7 @@ const MyRouteAsync = Ember.Route.extend({
|
||||
const store = this.get('store');
|
||||
return await store.findRecord('post-comment', 1);
|
||||
},
|
||||
async afterModel(): Promise<Ember.Array<PostComment>> {
|
||||
async afterModel(): Promise<Ember.Array<Comment>> {
|
||||
const post = await this.get('store').findRecord('post', 1);
|
||||
return await post.get('comments');
|
||||
}
|
||||
@@ -132,7 +133,7 @@ class MyRouteAsyncES6 extends Ember.Route {
|
||||
async model(): Promise<DS.Model> {
|
||||
return await this.store.findRecord('post-comment', 1);
|
||||
}
|
||||
async afterModel(): Promise<Ember.Array<PostComment>> {
|
||||
async afterModel(): Promise<Ember.Array<Comment>> {
|
||||
const post = await this.store.findRecord('post', 1);
|
||||
return await post.get('comments');
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -525,7 +525,7 @@ export namespace DS {
|
||||
* invoking the callback with the name of each relationship and its relationship
|
||||
* descriptor.
|
||||
*/
|
||||
eachRelationship(callback: (name: string, details: RelationshipMeta<this>) => void, binding?: any): any;
|
||||
eachRelationship<T extends Model>(this: T, callback: (name: string, details: RelationshipMeta<T>) => void, binding?: any): any;
|
||||
/**
|
||||
* Represents the model's class name as a string. This can be used to look up the model's class name through
|
||||
* `DS.Store`'s modelFor method.
|
||||
|
||||
@@ -26,7 +26,7 @@ p.eachRelationship((n, meta) => {
|
||||
let m: 'belongsTo' | 'hasMany' = meta.kind;
|
||||
});
|
||||
|
||||
class Comment extends DS.Model {
|
||||
export class Comment extends DS.Model {
|
||||
author = DS.attr('string');
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import Ember from 'ember';
|
||||
import DS from 'ember-data';
|
||||
import { assertType } from './lib/assert';
|
||||
import { Comment } from './relationships';
|
||||
|
||||
declare const store: DS.Store;
|
||||
|
||||
@@ -119,7 +120,7 @@ const MyRouteAsync = Ember.Route.extend({
|
||||
const store = this.get('store');
|
||||
return await store.findRecord('post-comment', 1);
|
||||
},
|
||||
async afterModel(): Promise<Ember.Array<PostComment>> {
|
||||
async afterModel(): Promise<Ember.Array<Comment>> {
|
||||
const post = await this.get('store').findRecord('post', 1);
|
||||
return await post.get('comments');
|
||||
}
|
||||
@@ -132,7 +133,7 @@ class MyRouteAsyncES6 extends Ember.Route {
|
||||
async model(): Promise<DS.Model> {
|
||||
return await this.store.findRecord('post-comment', 1);
|
||||
}
|
||||
async afterModel(): Promise<Ember.Array<PostComment>> {
|
||||
async afterModel(): Promise<Ember.Array<Comment>> {
|
||||
const post = await this.store.findRecord('post', 1);
|
||||
return await post.get('comments');
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ interface EditableMixin {
|
||||
isEditing: boolean;
|
||||
}
|
||||
|
||||
const EditableMixin: Ember.Mixin<EditableMixin, Ember.Route> = Ember.Mixin.create({
|
||||
const EditableMixin = Ember.Mixin.create<EditableMixin, Ember.Route>({
|
||||
edit() {
|
||||
this.get('controller');
|
||||
console.log('starting to edit');
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
import { methodID, soliditySHA256, soliditySHA3 } from 'ethereumjs-abi';
|
||||
import * as abi from 'ethereumjs-abi';
|
||||
|
||||
methodID('foo', ['uint256', 'string']);
|
||||
soliditySHA3(['uint256', 'string'], [0, 'Alice']);
|
||||
soliditySHA256(['uint256', 'string'], [0, 'Alice']);
|
||||
const types = ['uint256', 'string'];
|
||||
const values = [0, 'Alice'];
|
||||
const signature = 'foo(uint256,string):(uint256)';
|
||||
abi.eventID('foo', types);
|
||||
abi.methodID('foo', types);
|
||||
abi.soliditySHA3(types, values);
|
||||
abi.soliditySHA256(types, values);
|
||||
abi.solidityRIPEMD160(types, values);
|
||||
const simpleEncoded = abi.simpleEncode(signature, ...values);
|
||||
abi.simpleDecode(signature, simpleEncoded);
|
||||
const rawEncoded = abi.rawEncode(types, values);
|
||||
abi.rawDecode(types, rawEncoded);
|
||||
abi.solidityPack(types, values);
|
||||
const serpentSig = abi.toSerpent(['int256', 'bytes']);
|
||||
abi.fromSerpent(serpentSig);
|
||||
|
||||
Vendored
+10
-1
@@ -1,12 +1,21 @@
|
||||
// Type definitions for ethereumjs-abi 0.6
|
||||
// Project: https://github.com/ethereumjs/ethereumjs-abi, https://github.com/axic/ethereumjs-abi
|
||||
// Definitions by: Leonid Logvinov <https://github.com/LogvinovLeon>
|
||||
// Artur Kozak <https://github.com/quezak>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
export function soliditySHA3(argTypes: string[], args: any[]): Buffer;
|
||||
export function soliditySHA256(argTypes: string[], args: any[]): Buffer;
|
||||
export function solidityRIPEMD160(argTypes: string[], args: any[]): Buffer;
|
||||
export function eventID(name: string, types: string[]): Buffer;
|
||||
export function methodID(name: string, types: string[]): Buffer;
|
||||
export function simpleEncode(signature: string, ...args: any[]): Buffer;
|
||||
export function rawDecode(signature: string[], data: Buffer): any[];
|
||||
export function simpleDecode(signature: string, data: Buffer): any[];
|
||||
export function rawEncode(types: string[], values: any[]): Buffer;
|
||||
export function rawDecode(types: string[], data: Buffer): any[];
|
||||
export function stringify(types: string[], values: any[]): string;
|
||||
export function solidityPack(types: string[], values: any[]): Buffer;
|
||||
export function fromSerpent(signature: string): string[];
|
||||
export function toSerpent(types: string[]): string;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// transplant from https://github.com/spmason/expectations/blob/695c25bd35bb1751533a8082a5aa378e3e1b381f/test/expect.tests.js
|
||||
|
||||
var root = this;
|
||||
var root = window;
|
||||
|
||||
// Stub mocha functions
|
||||
const {describe, it, before, after, beforeEach, afterEach} = null as any as {
|
||||
@@ -451,7 +451,7 @@ describe('expect', ()=> {
|
||||
|
||||
describe('extensibility', ()=> {
|
||||
it('allows you to add your own assertions', ()=> {
|
||||
expect.addAssertion('toBeFoo', ()=> {
|
||||
expect.addAssertion('toBeFoo', function () {
|
||||
if (this.value === 'foo') {
|
||||
return this.pass();
|
||||
}
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": false,
|
||||
@@ -20,4 +21,4 @@
|
||||
"index.d.ts",
|
||||
"expectations-tests.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
// Type definitions for expo-localization 1.0
|
||||
// Project: https://docs.expo.io/
|
||||
// Project: https://docs.expo.io/versions/latest/sdk/localization
|
||||
// Definitions by: Bartosz Dotryw <https://github.com/burtek>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
|
||||
Vendored
+2217
-1484
File diff suppressed because it is too large
Load Diff
Vendored
+3
-1
@@ -1,4 +1,4 @@
|
||||
// Type definitions for FabricJS 1.5
|
||||
// Type definitions for FabricJS 2.6
|
||||
// Project: http://fabricjs.com/
|
||||
// Definitions by: Oliver Klemencic <https://github.com/oklemencic>
|
||||
// Joseph Livecchi <https://github.com/joewashear007>
|
||||
@@ -7,6 +7,8 @@
|
||||
// Brian Martinson <https://github.com/bmartinson>
|
||||
// Rogerio Teixeira <https://github.com/RogerioTeixeira>
|
||||
// Bradley Hill <https://github.com/BradleyHill>
|
||||
// Bryan Krol <https://github.com/bmkrol823>
|
||||
// Glenn Gartner <https://github.com/glenngartner>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.1
|
||||
export import fabric = require("./fabric-impl");
|
||||
|
||||
+30
-57
@@ -12,7 +12,7 @@ function sample1() {
|
||||
});
|
||||
|
||||
for (let i = 0; i < 15; i++) {
|
||||
fabric.Image.fromURL('../assets/ladybug.png', img => {
|
||||
fabric.Image.fromURL('../assets/ladybug.png', (img: fabric.Image) => {
|
||||
img.set({
|
||||
left: fabric.util.getRandomInt(0, 600),
|
||||
top: fabric.util.getRandomInt(0, 500),
|
||||
@@ -122,7 +122,7 @@ function sample3() {
|
||||
}
|
||||
});
|
||||
|
||||
const image = fabric.Image.fromURL('../assets/printio.png', img => {
|
||||
const image = fabric.Image.fromURL('../assets/printio.png', (img: fabric.Image) => {
|
||||
const oImg = img.set({ left: 300, top: 300, angle: -15 }).scale(0.9);
|
||||
canvas.add(oImg).renderAll();
|
||||
canvas.setActiveObject(oImg);
|
||||
@@ -236,21 +236,21 @@ function sample4() {
|
||||
|
||||
const topControl = <HTMLInputElement> $('top-control');
|
||||
topControl.onchange = function(this: HTMLInputElement) {
|
||||
rect.setTop(+this.value).setCoords();
|
||||
rect.set('top',+this.value).setCoords();
|
||||
canvas.renderAll();
|
||||
};
|
||||
|
||||
const leftControl = <HTMLInputElement> $('left-control');
|
||||
leftControl.onchange = function(this: HTMLInputElement) {
|
||||
rect.setLeft(+this.value).setCoords();
|
||||
rect.set('left',+this.value).setCoords();
|
||||
canvas.renderAll();
|
||||
};
|
||||
|
||||
function updateControls() {
|
||||
scaleControl.value = rect.getScaleX().toString();
|
||||
angleControl.value = rect.getAngle().toString();
|
||||
leftControl.value = rect.getLeft().toString();
|
||||
topControl.value = rect.getTop().toString();
|
||||
scaleControl.value = rect.scaleX.toString();
|
||||
angleControl.value = rect.angle.toString();
|
||||
leftControl.value = rect.left.toString();
|
||||
topControl.value = rect.top.toString();
|
||||
}
|
||||
canvas.on({
|
||||
'object:moving': updateControls,
|
||||
@@ -331,10 +331,10 @@ function sample6() {
|
||||
canvas.centerObject(obj);
|
||||
canvas.add(obj);
|
||||
|
||||
obj.clone(clone => canvas.add(clone.set({ left: 100, top: 100, angle: -15 })));
|
||||
obj.clone(clone => canvas.add(clone.set({ left: 480, top: 100, angle: 15 })));
|
||||
obj.clone(clone => canvas.add(clone.set({ left: 100, top: 400, angle: -15 })));
|
||||
obj.clone(clone => canvas.add(clone.set({ left: 480, top: 400, angle: 15 })));
|
||||
obj.clone((clone: fabric.Object) => canvas.add(clone.set({ left: 100, top: 100, angle: -15 })));
|
||||
obj.clone((clone: fabric.Object) => canvas.add(clone.set({ left: 480, top: 100, angle: 15 })));
|
||||
obj.clone((clone: fabric.Object) => canvas.add(clone.set({ left: 100, top: 400, angle: -15 })));
|
||||
obj.clone((clone: fabric.Object) => canvas.add(clone.set({ left: 480, top: 400, angle: 15 })));
|
||||
|
||||
canvas.on('mouse:move', options => {
|
||||
const p = canvas.getPointer(options.e);
|
||||
@@ -343,7 +343,7 @@ function sample6() {
|
||||
const distX = Math.abs(p.x - obj.left);
|
||||
const distY = Math.abs(p.y - obj.top);
|
||||
const dist = Math.round(Math.sqrt(Math.pow(distX, 2) + Math.pow(distY, 2)));
|
||||
obj.setOpacity(1 / (dist / 20));
|
||||
obj.set('opacity', (1 / (dist / 20)));
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -357,7 +357,7 @@ function sample7() {
|
||||
const canvas = new fabric.Canvas('c', { selection: false });
|
||||
|
||||
setInterval(() => {
|
||||
fabric.Image.fromURL('../assets/ladybug.png', obj => {
|
||||
fabric.Image.fromURL('../assets/ladybug.png', (obj: fabric.Object) => {
|
||||
const img = <ImageWithInfo> obj;
|
||||
img.set('left', fabric.util.getRandomInt(200, 600)).set('top', -50);
|
||||
img.movingLeft = !!Math.round(Math.random());
|
||||
@@ -373,7 +373,7 @@ function sample7() {
|
||||
if (img.left > 900 || img.top > 500) {
|
||||
canvas.remove(img);
|
||||
} else {
|
||||
img.setAngle(img.getAngle() + 2);
|
||||
img.setAngle(img.angle + 2);
|
||||
}
|
||||
});
|
||||
canvas.renderAll();
|
||||
@@ -475,7 +475,7 @@ function sample8() {
|
||||
break;
|
||||
|
||||
case 'image1':
|
||||
fabric.Image.fromURL('../assets/pug.jpg', image => {
|
||||
fabric.Image.fromURL('../assets/pug.jpg', (image: fabric.Image) => {
|
||||
image.set({
|
||||
left,
|
||||
top,
|
||||
@@ -489,7 +489,7 @@ function sample8() {
|
||||
break;
|
||||
|
||||
case 'image2':
|
||||
fabric.Image.fromURL('../assets/logo.png', image => {
|
||||
fabric.Image.fromURL('../assets/logo.png', (image: fabric.Image) => {
|
||||
image.set({
|
||||
left,
|
||||
top,
|
||||
@@ -510,14 +510,7 @@ function sample8() {
|
||||
fabric.loadSVGFromURL(`../assets/${match[0]}.svg`, (objects, options) => {
|
||||
const loadedObject = fabric.util.groupSVGElements(objects, options);
|
||||
|
||||
loadedObject.set({
|
||||
left,
|
||||
top,
|
||||
angle,
|
||||
padding: 10,
|
||||
cornerSize: 10
|
||||
});
|
||||
loadedObject/*.scaleToWidth(300)*/.setCoords();
|
||||
loadedObject.setCoords();
|
||||
|
||||
// loadedObject.hasRotatingPoint = true;
|
||||
|
||||
@@ -554,15 +547,8 @@ function sample8() {
|
||||
const removeSelectedEl = document.getElementById('remove-selected');
|
||||
removeSelectedEl.onclick = () => {
|
||||
const activeObject = canvas.getActiveObject();
|
||||
const activeGroup = canvas.getActiveGroup();
|
||||
if (activeObject) {
|
||||
canvas.remove(activeObject);
|
||||
} else if (activeGroup) {
|
||||
const objectsInGroup = activeGroup.getObjects();
|
||||
canvas.discardActiveGroup();
|
||||
objectsInGroup.forEach(object => {
|
||||
canvas.remove(object);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -601,10 +587,9 @@ function sample8() {
|
||||
|
||||
slider.onchange = function() {
|
||||
const activeObject = canvas.getActiveObject();
|
||||
const activeGroup = canvas.getActiveGroup();
|
||||
|
||||
if (activeObject || activeGroup) {
|
||||
(activeObject || activeGroup).setOpacity(parseInt((<HTMLInputElement> this).value, 10) / 100);
|
||||
if (activeObject) {
|
||||
activeObject.set('opacity', (parseInt((<HTMLInputElement> this).value, 10) / 100));
|
||||
canvas.renderAll();
|
||||
}
|
||||
};
|
||||
@@ -632,10 +617,9 @@ function sample8() {
|
||||
|
||||
colorpicker.onchange = function() {
|
||||
const activeObject = canvas.getActiveObject();
|
||||
const activeGroup = canvas.getActiveGroup();
|
||||
|
||||
if (activeObject || activeGroup) {
|
||||
(activeObject || activeGroup).setFill((<HTMLInputElement> this).value);
|
||||
if (activeObject) {
|
||||
activeObject.set('fill', (<HTMLInputElement> this).value);
|
||||
canvas.renderAll();
|
||||
}
|
||||
};
|
||||
@@ -768,16 +752,6 @@ function sample8() {
|
||||
updateComplexity();
|
||||
});
|
||||
|
||||
drawingColorEl.onchange = () => {
|
||||
canvas.freeDrawingColor = drawingColorEl.value;
|
||||
};
|
||||
drawingLineWidthEl.onchange = () => {
|
||||
canvas.freeDrawingLineWidth = parseInt(drawingLineWidthEl.value, 10) || 1; // disallow 0, NaN, etc.
|
||||
};
|
||||
|
||||
canvas.freeDrawingColor = drawingColorEl.value;
|
||||
canvas.freeDrawingLineWidth = parseInt(drawingLineWidthEl.value, 10) || 1;
|
||||
|
||||
const text = `Lorem ipsum dolor sit amet,
|
||||
consectetur adipisicing elit,
|
||||
sed do eiusmod tempor incididunt
|
||||
@@ -802,7 +776,7 @@ laboris nisi ut aliquip ex ea commodo consequat.`;
|
||||
};
|
||||
|
||||
document.onkeydown = e => {
|
||||
const obj = canvas.getActiveObject() || canvas.getActiveGroup();
|
||||
const obj = canvas.getActiveObject();
|
||||
if (obj && e.keyCode === 8) {
|
||||
// this is horrible. need to fix, so that unified interface can be used
|
||||
if (obj.type === 'group') {
|
||||
@@ -832,8 +806,7 @@ laboris nisi ut aliquip ex ea commodo consequat.`;
|
||||
const obj = canvas.getActiveObject();
|
||||
if (obj) {
|
||||
obj.setGradient("fill", {
|
||||
x2: (getRandomInt(0, 1) ? 0 : obj.width),
|
||||
y2: (getRandomInt(0, 1) ? 0 : obj.height),
|
||||
coords: {x2: (getRandomInt(0, 1) ? 0 : obj.width), y2: (getRandomInt(0, 1) ? 0 : obj.height)},
|
||||
colorStops: {
|
||||
0: '#' + getRandomColor(),
|
||||
1: '#' + getRandomColor()
|
||||
@@ -871,8 +844,8 @@ laboris nisi ut aliquip ex ea commodo consequat.`;
|
||||
cmdUnderlineBtn.onclick = function() {
|
||||
const activeObject = <fabric.Text> canvas.getActiveObject();
|
||||
if (activeObject && activeObject.type === 'text') {
|
||||
activeObject.textDecoration = (activeObject.textDecoration === 'underline' ? '' : 'underline');
|
||||
(this as HTMLElement).className = activeObject.textDecoration ? 'selected' : '';
|
||||
activeObject.underline = !activeObject.underline;
|
||||
(this as HTMLElement).className = activeObject.underline ? 'selected' : '';
|
||||
canvas.renderAll();
|
||||
}
|
||||
};
|
||||
@@ -884,8 +857,8 @@ laboris nisi ut aliquip ex ea commodo consequat.`;
|
||||
cmdLinethroughBtn.onclick = function() {
|
||||
const activeObject = <fabric.Text> canvas.getActiveObject();
|
||||
if (activeObject && activeObject.type === 'text') {
|
||||
activeObject.textDecoration = (activeObject.textDecoration === 'line-through' ? '' : 'line-through');
|
||||
(this as HTMLElement).className = activeObject.textDecoration ? 'selected' : '';
|
||||
activeObject.linethrough = !activeObject.linethrough;
|
||||
(this as HTMLElement).className = activeObject.linethrough ? 'selected' : '';
|
||||
canvas.renderAll();
|
||||
}
|
||||
};
|
||||
@@ -897,8 +870,8 @@ laboris nisi ut aliquip ex ea commodo consequat.`;
|
||||
cmdOverlineBtn.onclick = function() {
|
||||
const activeObject = <fabric.Text> canvas.getActiveObject();
|
||||
if (activeObject && activeObject.type === 'text') {
|
||||
activeObject.textDecoration = (activeObject.textDecoration === 'overline' ? '' : 'overline');
|
||||
(this as HTMLElement).className = activeObject.textDecoration ? 'selected' : '';
|
||||
activeObject.overline = !activeObject.overline;
|
||||
(this as HTMLElement).className = activeObject.overline ? 'selected' : '';
|
||||
canvas.renderAll();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"normalize-url": "*"
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
// Grid
|
||||
$(() => {
|
||||
this.grid = $('#grid').grid({
|
||||
(this as any).grid = $('#grid').grid({
|
||||
primaryKey: 'ID',
|
||||
columns: [
|
||||
{ field: 'ID', width: 50, sortable: true },
|
||||
@@ -14,9 +14,9 @@ $(() => {
|
||||
|
||||
// Dialog
|
||||
$(() => {
|
||||
this.dialog = $('#playerModal').dialog({
|
||||
(this as any).dialog = $('#playerModal').dialog({
|
||||
autoOpen: false,
|
||||
title: 'Player',
|
||||
width: 400
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Vendored
+1
@@ -36,6 +36,7 @@ declare class HTTPError extends StdError {
|
||||
statusCode: number;
|
||||
statusMessage: string;
|
||||
headers: http.IncomingHttpHeaders;
|
||||
body: Buffer | string | object;
|
||||
}
|
||||
|
||||
declare class MaxRedirectsError extends StdError {
|
||||
|
||||
@@ -19,5 +19,8 @@ gulp.src("test.css")
|
||||
gulp.src("test.css")
|
||||
.pipe(ghPages({push: false}));
|
||||
|
||||
gulp.src("test.css")
|
||||
.pipe(ghPages({ force: true }));
|
||||
|
||||
gulp.src("test.css")
|
||||
.pipe(ghPages({message: "master"}));
|
||||
|
||||
Vendored
+2
@@ -1,6 +1,7 @@
|
||||
// Type definitions for gulp-gh-pages
|
||||
// Project: https://github.com/rowoot/gulp-gh-pages
|
||||
// Definitions by: Asana <https://asana.com>
|
||||
// Ntnyq <https://github.com/ntnyq>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node"/>
|
||||
@@ -12,6 +13,7 @@ interface Options {
|
||||
branch?: string;
|
||||
cacheDir?: string;
|
||||
push?: boolean;
|
||||
force?: boolean;
|
||||
message?: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"handlebars": ">=4.1.0"
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
"es2015"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": false,
|
||||
|
||||
Vendored
+2
@@ -38,6 +38,7 @@ export interface Location {
|
||||
pathname: Pathname;
|
||||
search: Search;
|
||||
query: Query;
|
||||
hash: Hash;
|
||||
state: LocationState;
|
||||
action: Action;
|
||||
key: LocationKey;
|
||||
@@ -47,6 +48,7 @@ export interface LocationDescriptorObject {
|
||||
pathname?: Pathname;
|
||||
search?: Search;
|
||||
query?: Query;
|
||||
hash?: Hash;
|
||||
state?: LocationState;
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
||||
// Type definitions for howler.js v2.0.5
|
||||
// Project: https://github.com/goldfire/howler.js
|
||||
// Definitions by: Pedro Casaubon <https://github.com/xperiments>, Todd Dukart <https://github.com/tdukart>, Alexander Leon <https://github.com/alien35>, Nicholas Higgins <https://github.com/nicholashza>
|
||||
// Definitions by: Pedro Casaubon <https://github.com/xperiments>, Alexander Leon <https://github.com/alien35>, Nicholas Higgins <https://github.com/nicholashza>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
interface HowlerGlobal {
|
||||
|
||||
@@ -52,7 +52,7 @@ console.log(err instanceof Error); // true
|
||||
|
||||
// ----------------------------------------
|
||||
// Advanced usage: creating custom Error subclasses
|
||||
var Custom404Error = httperr.createHttpError(404, 'Not Found', config => {
|
||||
var Custom404Error = httperr.createHttpError(404, 'Not Found', function (config) {
|
||||
this.message = 'The resource was not found';
|
||||
this['some custom property'] = config.parameters['some custom parameter'];
|
||||
});
|
||||
|
||||
Vendored
+1
-1
@@ -55,7 +55,7 @@ export class ImapSimple extends NodeJS.EventEmitter {
|
||||
getBoxes(callback: (err: Error, boxes: Imap.MailBoxes) => void): void;
|
||||
getBoxes(): Promise<Imap.MailBoxes>;
|
||||
|
||||
/** Search for and retrieve mail in the previously opened mailbox. */
|
||||
/** Search for and retrieve mail in the currently open mailbox. */
|
||||
search(searchCriteria: any[], fetchOptions: Imap.FetchOptions, callback: (err: Error, messages: Message[]) => void): void;
|
||||
search(searchCriteria: any[], fetchOptions: Imap.FetchOptions): Promise<Message[]>;
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"chalk": "^2.1.0"
|
||||
}
|
||||
}
|
||||
Vendored
+1
@@ -81,6 +81,7 @@ declare namespace inquirer {
|
||||
* Possible values:
|
||||
* <ul>
|
||||
* <li>input</li>
|
||||
* <li>number</li>
|
||||
* <li>confirm</li>
|
||||
* <li>list</li>
|
||||
* <li>rawlist</li>
|
||||
|
||||
Vendored
-12
@@ -1,12 +0,0 @@
|
||||
// Type definitions for internal-ip 3.0
|
||||
// Project: https://github.com/sindresorhus/internal-ip#readme
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export const v6: IPGetterFn;
|
||||
export const v4: IPGetterFn;
|
||||
|
||||
export interface IPGetterFn { // tslint:disable-line:interface-name
|
||||
(): Promise<string | null>;
|
||||
sync(): string | null;
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
import * as internalIp from 'internal-ip';
|
||||
|
||||
internalIp.v6().then(ip => {
|
||||
// $ExpectType string | null
|
||||
ip;
|
||||
});
|
||||
// $ExpectType string | null
|
||||
internalIp.v6.sync();
|
||||
|
||||
internalIp.v4().then(ip => {
|
||||
// $ExpectType string | null
|
||||
ip;
|
||||
});
|
||||
// $ExpectType string | null
|
||||
internalIp.v4.sync();
|
||||
Vendored
-7
@@ -1,7 +0,0 @@
|
||||
// Type definitions for internal-ip 2.0
|
||||
// Project: https://github.com/sindresorhus/internal-ip#readme
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export function v6(): Promise<string>;
|
||||
export function v4(): Promise<string>;
|
||||
@@ -1,10 +0,0 @@
|
||||
import * as internalIp from 'internal-ip';
|
||||
|
||||
let str: string;
|
||||
internalIp.v6().then(ip => {
|
||||
str = ip;
|
||||
});
|
||||
|
||||
internalIp.v4().then(ip => {
|
||||
str = ip;
|
||||
});
|
||||
Vendored
+8
-3
@@ -30,7 +30,7 @@ interface RedisStatic {
|
||||
(port?: number, host?: string, options?: IORedis.RedisOptions): IORedis.Redis;
|
||||
(host?: string, options?: IORedis.RedisOptions): IORedis.Redis;
|
||||
(options?: IORedis.RedisOptions): IORedis.Redis;
|
||||
Cluster: IORedis.Cluster;
|
||||
Cluster: IORedis.ClusterStatic;
|
||||
Command: IORedis.Command;
|
||||
}
|
||||
|
||||
@@ -873,11 +873,16 @@ declare namespace IORedis {
|
||||
|
||||
type ClusterNode = string | number | NodeConfiguration;
|
||||
|
||||
type NodeRole = 'master' | 'slave' | 'all';
|
||||
|
||||
interface Cluster extends NodeJS.EventEmitter, Commander {
|
||||
new(nodes: ClusterNode[], options?: ClusterOptions): Redis;
|
||||
connect(callback: () => void): Promise<any>;
|
||||
disconnect(): void;
|
||||
nodes(role: string): Redis[];
|
||||
nodes(role?: NodeRole): Redis[];
|
||||
}
|
||||
|
||||
interface ClusterStatic extends NodeJS.EventEmitter, Commander {
|
||||
new (nodes: ClusterNode[], options?: ClusterOptions): Cluster;
|
||||
}
|
||||
|
||||
interface RedisOptions {
|
||||
|
||||
@@ -207,3 +207,22 @@ new Redis.Cluster([], {
|
||||
new Redis.Cluster([], {
|
||||
clusterRetryStrategy: (times: number, reason?: Error) => 1
|
||||
});
|
||||
|
||||
// Cluster types
|
||||
const clusterOptions: Redis.ClusterOptions = {};
|
||||
const cluster = new Redis.Cluster(
|
||||
[
|
||||
{
|
||||
host: 'localhost',
|
||||
port: 6379
|
||||
}
|
||||
],
|
||||
clusterOptions
|
||||
);
|
||||
cluster.on('end', () => console.log('on end'));
|
||||
cluster.nodes().map(node => {
|
||||
node.pipeline()
|
||||
.flushdb()
|
||||
.exec()
|
||||
.then(result => console.log(result));
|
||||
});
|
||||
|
||||
Vendored
+4
@@ -284,6 +284,10 @@ declare global {
|
||||
* Get the Isotope instance from a jQuery object. Isotope instances are useful to access Isotope properties.
|
||||
*/
|
||||
data(methodName: 'isotope'): Isotope;
|
||||
/**
|
||||
* Filters, sorts, and lays out items.
|
||||
*/
|
||||
isotope(): JQuery;
|
||||
/**
|
||||
* Lays out specified items.
|
||||
* @param elements Array of Isotope.Items
|
||||
|
||||
@@ -81,6 +81,7 @@ $grid = $('.grid').isotope({
|
||||
});
|
||||
|
||||
// test methods using jquery
|
||||
$grid.isotope();
|
||||
$grid.isotope('addItems', $('.items'));
|
||||
$grid.isotope('appended', $('.items')[0]);
|
||||
$grid.isotope('hideItemElements', [ new HTMLElement() ]);
|
||||
|
||||
@@ -772,7 +772,7 @@ describe("Jasmine Mock Ajax (for toplevel)", () => {
|
||||
error = jasmine.createSpy("onFailure");
|
||||
complete = jasmine.createSpy("onComplete");
|
||||
|
||||
onreadystatechange = () => {
|
||||
onreadystatechange = function() {
|
||||
if (this.readyState === (this.DONE || 4)) { // IE 8 doesn't support DONE
|
||||
if (this.status === 200) {
|
||||
success(this.responseText, this.textStatus, this);
|
||||
|
||||
+32
-3
@@ -1,14 +1,43 @@
|
||||
// Type definitions for jest-environment-puppeteer 2.2
|
||||
// Type definitions for jest-environment-puppeteer 4.0
|
||||
// Project: https://github.com/smooth-code/jest-puppeteer/tree/master/packages/jest-environment-puppeteer
|
||||
// Definitions by: Josh Goldberg <https://github.com/joshuakgoldberg>
|
||||
// Ifiok Jr. <https://github.com/ifiokjr>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
import { Browser, Page } from "puppeteer";
|
||||
import { Browser, Page, BrowserContext } from 'puppeteer';
|
||||
|
||||
interface JestPuppeteer {
|
||||
/**
|
||||
* Reset global.page
|
||||
*
|
||||
* ```ts
|
||||
* beforeEach(async () => {
|
||||
* await jestPuppeteer.resetPage()
|
||||
* })
|
||||
* ```
|
||||
*/
|
||||
resetPage(): Promise<void>;
|
||||
|
||||
/**
|
||||
* Suspends test execution and gives you opportunity to see what's going on in the browser
|
||||
* - Jest is suspended (no timeout)
|
||||
* - A debugger instruction to Chromium, if Puppeteer has been launched with { devtools: true } it will stop
|
||||
*
|
||||
* ```ts
|
||||
* it('should put test in debug mode', async () => {
|
||||
* await jestPuppeteer.debug()
|
||||
* })
|
||||
* ```
|
||||
*/
|
||||
debug(): Promise<void>;
|
||||
}
|
||||
|
||||
declare global {
|
||||
const browser: Browser;
|
||||
const context: BrowserContext;
|
||||
const page: Page;
|
||||
const jestPuppeteer: JestPuppeteer;
|
||||
}
|
||||
|
||||
export { };
|
||||
export {};
|
||||
|
||||
@@ -2,3 +2,7 @@ import * as puppeteer from "puppeteer";
|
||||
|
||||
const myBrowser: puppeteer.Browser = browser;
|
||||
const myPage: puppeteer.Page = page;
|
||||
const myContext: puppeteer.BrowserContext = context;
|
||||
|
||||
jestPuppeteer.debug();
|
||||
jestPuppeteer.resetPage();
|
||||
|
||||
Vendored
+8
-5
@@ -220,9 +220,10 @@ declare namespace jest {
|
||||
* spy.mockRestore();
|
||||
* });
|
||||
*/
|
||||
function spyOn<T extends {}, M extends NonFunctionPropertyNames<T>>(object: T, method: M, accessType: 'get'): SpyInstance<T[M], []>;
|
||||
function spyOn<T extends {}, M extends NonFunctionPropertyNames<T>>(object: T, method: M, accessType: 'set'): SpyInstance<void, [T[M]]>;
|
||||
function spyOn<T extends {}, M extends FunctionPropertyNames<T>>(object: T, method: M): T[M] extends (...args: any[]) => any ? SpyInstance<ReturnType<T[M]>, ArgsType<T[M]>> : never;
|
||||
function spyOn<T extends {}, M extends NonFunctionPropertyNames<Required<T>>>(object: T, method: M, accessType: 'get'): SpyInstance<Required<T>[M], []>;
|
||||
function spyOn<T extends {}, M extends NonFunctionPropertyNames<Required<T>>>(object: T, method: M, accessType: 'set'): SpyInstance<void, [Required<T>[M]]>;
|
||||
function spyOn<T extends {}, M extends FunctionPropertyNames<Required<T>>>(object: T, method: M): Required<T>[M] extends (...args: any[]) => any ?
|
||||
SpyInstance<ReturnType<Required<T>[M]>, ArgsType<Required<T>[M]>> : never;
|
||||
/**
|
||||
* Indicates that the module system should never return a mocked version of
|
||||
* the specified module from require() (e.g. that it should always return the real module).
|
||||
@@ -263,10 +264,11 @@ declare namespace jest {
|
||||
}
|
||||
|
||||
interface Each {
|
||||
(cases: any[]): (name: string, fn: (...args: any[]) => any) => void;
|
||||
(cases: any[]): (name: string, fn: (...args: any[]) => any, timeout?: number) => void;
|
||||
(strings: TemplateStringsArray, ...placeholders: any[]): (
|
||||
name: string,
|
||||
fn: (arg: any) => any
|
||||
fn: (arg: any) => any,
|
||||
timeout?: number
|
||||
) => void;
|
||||
}
|
||||
|
||||
@@ -1625,6 +1627,7 @@ declare namespace jest {
|
||||
numPendingTests: number;
|
||||
numPendingTestSuites: number;
|
||||
numRuntimeErrorTestSuites: number;
|
||||
numTodoTests: number;
|
||||
numTotalTests: number;
|
||||
numTotalTestSuites: number;
|
||||
snapshot: SnapshotSummary;
|
||||
|
||||
@@ -349,11 +349,15 @@ const mockContextVoid = jest.fn().mock;
|
||||
const mockContextString = jest.fn(() => "").mock;
|
||||
|
||||
jest.fn().mockClear();
|
||||
|
||||
jest.fn().mockReset();
|
||||
|
||||
jest.fn().mockRestore();
|
||||
jest.fn().mockImplementation((test: number) => test);
|
||||
jest.fn().mockResolvedValue(1);
|
||||
|
||||
interface SpyInterface {
|
||||
prop?: number;
|
||||
method?: (arg1: boolean) => void;
|
||||
}
|
||||
const spiedTarget = {
|
||||
returnsVoid(): void { },
|
||||
setValue(value: string): void {
|
||||
@@ -363,7 +367,6 @@ const spiedTarget = {
|
||||
return "";
|
||||
}
|
||||
};
|
||||
|
||||
class SpiedTargetClass {
|
||||
private _value = 3;
|
||||
private _value2 = '';
|
||||
@@ -380,6 +383,7 @@ class SpiedTargetClass {
|
||||
this._value2 = value2;
|
||||
}
|
||||
}
|
||||
|
||||
const spiedTarget2 = new SpiedTargetClass();
|
||||
|
||||
// $ExpectError
|
||||
@@ -425,11 +429,17 @@ const spy5 = jest.spyOn(spiedTarget2, "value", "get");
|
||||
spy5.mockReturnValue('5');
|
||||
|
||||
// $ExpectType SpyInstance<void, [number]>
|
||||
const spy6 = jest.spyOn(spiedTarget2, "value", "set");
|
||||
jest.spyOn(spiedTarget2, "value", "set");
|
||||
|
||||
// should compile
|
||||
jest.fn().mockImplementation((test: number) => test);
|
||||
jest.fn().mockResolvedValue(1);
|
||||
let spyInterfaceImpl: SpyInterface = {};
|
||||
// $ExpectError
|
||||
jest.spyOn(spyInterfaceImpl, "method", "get");
|
||||
// $ExpectError
|
||||
jest.spyOn(spyInterfaceImpl, "prop");
|
||||
// $ExpectType SpyInstance<number, []>
|
||||
jest.spyOn(spyInterfaceImpl, "prop", "get");
|
||||
// $ExpectType SpyInstance<void, [boolean]>
|
||||
jest.spyOn(spyInterfaceImpl, "method");
|
||||
|
||||
interface Type1 { a: number; }
|
||||
interface Type2 { b: number; }
|
||||
@@ -1360,6 +1370,14 @@ test.each([[1, 1, 2], [1, 2, 3], [2, 1, 3]])(
|
||||
}
|
||||
);
|
||||
|
||||
test.each([[1, 1, 2], [1, 2, 3], [2, 1, 3]])(
|
||||
".add(%i, %i)",
|
||||
(a, b, expected) => {
|
||||
expect(a + b).toBe(expected);
|
||||
},
|
||||
5000
|
||||
);
|
||||
|
||||
test.each`
|
||||
a | b | expected
|
||||
${1} | ${1} | ${2}
|
||||
@@ -1369,6 +1387,15 @@ test.each`
|
||||
expect(a + b).toBe(expected);
|
||||
});
|
||||
|
||||
test.each`
|
||||
a | b | expected
|
||||
${1} | ${1} | ${2}
|
||||
${1} | ${2} | ${3}
|
||||
${2} | ${1} | ${3}
|
||||
`("returns $expected when $a is added $b", ({ a, b, expected }: Case) => {
|
||||
expect(a + b).toBe(expected);
|
||||
}, 5000);
|
||||
|
||||
test.only.each([[1, 1, 2], [1, 2, 3], [2, 1, 3]])(
|
||||
".add(%i, %i)",
|
||||
(a, b, expected) => {
|
||||
|
||||
Vendored
+2
-2
@@ -104,7 +104,7 @@ export interface RuleOptions {
|
||||
index: number;
|
||||
className: string;
|
||||
}
|
||||
export declare class SheetsRegistry {
|
||||
export class SheetsRegistry {
|
||||
constructor();
|
||||
registry: ReadonlyArray<StyleSheet>;
|
||||
readonly index: number;
|
||||
@@ -122,7 +122,7 @@ export type CreateStyleSheetOptions<Name extends string = any> = Partial<{
|
||||
generateClassName: GenerateClassName<Name>;
|
||||
classNamePrefix: string;
|
||||
}>;
|
||||
export declare class JSS {
|
||||
export class JSS {
|
||||
constructor(options?: Partial<JSSOptions>);
|
||||
createStyleSheet<Name extends string>(
|
||||
styles: Partial<Styles<Name>>,
|
||||
|
||||
Vendored
+6
-2
@@ -1,6 +1,10 @@
|
||||
// Type definitions for kafka-node 2.0
|
||||
// Project: https://github.com/SOHU-Co/kafka-node/
|
||||
// Definitions by: Daniel Imrie-Situnayake <https://github.com/dansitu>, Bill <https://github.com/bkim54>, Michael Haan <https://github.com/sfrooster>, Amiram Korach <https://github.com/amiram>
|
||||
// Definitions by: Daniel Imrie-Situnayake <https://github.com/dansitu>
|
||||
// Bill <https://github.com/bkim54>
|
||||
// Michael Haan <https://github.com/sfrooster>
|
||||
// Amiram Korach <https://github.com/amiram>
|
||||
// Insanehong <https://github.com/insanehong>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
@@ -61,7 +65,7 @@ export class HighLevelConsumer {
|
||||
client: Client;
|
||||
on(eventName: "message", cb: (message: Message) => any): void;
|
||||
on(eventName: "error" | "offsetOutOfRange", cb: (error: any) => any): void;
|
||||
on(eventName: "rebalancing" | "rebalanced", cb: () => any): void;
|
||||
on(eventName: "rebalancing" | "rebalanced" | "connect", cb: () => any): void;
|
||||
addTopics(topics: string[] | Topic[], cb?: (error: any, added: string[] | Topic[]) => any): void;
|
||||
removeTopics(topics: string | string[], cb: (error: any, removed: number) => any): void;
|
||||
commit(cb: (error: any, data: any) => any): void;
|
||||
|
||||
@@ -244,6 +244,8 @@ consumerGroup.on('error', (err) => {
|
||||
});
|
||||
consumerGroup.on('message', (msg) => {
|
||||
});
|
||||
consumerGroup.on('connect', () => {
|
||||
});
|
||||
consumerGroup.close(true, () => {
|
||||
});
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ klaw('/some/dir')
|
||||
// README.md: Streams 2 & 3 (pull) with error handling
|
||||
|
||||
klaw('/some/dir')
|
||||
.on('readable', () => {
|
||||
.on('readable', function() {
|
||||
while (true) {
|
||||
const item = this.read();
|
||||
if (!item) break;
|
||||
|
||||
+81
-80
@@ -173,7 +173,7 @@ knex.select('title', 'author', 'year').from('books');
|
||||
knex.select({ name: 'title', writer: 'author' }).from(knex.raw('books'));
|
||||
knex.select().table('books');
|
||||
|
||||
knex.avg('sum_column1').from(() => {
|
||||
knex.avg('sum_column1').from(function() {
|
||||
this.sum('column1 as sum_column1').from('t1').groupBy('column1').as('t1');
|
||||
}).as('ignored_alias');
|
||||
|
||||
@@ -190,7 +190,7 @@ knex('users').where({
|
||||
|
||||
knex('users').where('id', 1);
|
||||
|
||||
knex('users').where(() => {
|
||||
knex('users').where(function() {
|
||||
this.where('id', 1).orWhere('id', '>', 10);
|
||||
}).orWhere({name: 'Tester'});
|
||||
|
||||
@@ -218,7 +218,7 @@ knex.select('name').from('users')
|
||||
|
||||
knex('users')
|
||||
.where('name', '=', 'John')
|
||||
.orWhere(() => {
|
||||
.orWhere(function() {
|
||||
this.where('votes', '>', 100).andWhere('title', '<>', 'Admin');
|
||||
});
|
||||
|
||||
@@ -230,13 +230,13 @@ knex('users').whereNull('updated_at');
|
||||
|
||||
knex('users').whereNotNull('created_at');
|
||||
|
||||
knex('users').whereExists(() => {
|
||||
knex('users').whereExists(function() {
|
||||
this.select('*').from('accounts').whereRaw('users.account_id = accounts.id');
|
||||
});
|
||||
|
||||
knex('users').whereExists(knex.select('*').from('accounts').whereRaw('users.account_id = accounts.id'));
|
||||
|
||||
knex('users').whereNotExists(() => {
|
||||
knex('users').whereNotExists(function() {
|
||||
this.select('*').from('accounts').whereRaw('users.account_id = accounts.id');
|
||||
});
|
||||
|
||||
@@ -321,15 +321,15 @@ knex('users')
|
||||
.join(knex('contacts').select('user_id', 'phone').as('contacts'), { 'users.id': 'contacts.user_id' })
|
||||
.select('users.id', 'contacts.phone');
|
||||
|
||||
knex.select('*').from('users').join(knex('accounts').select('id', 'owner_id').as('accounts'), () => {
|
||||
knex.select('*').from('users').join(knex('accounts').select('id', 'owner_id').as('accounts'), function() {
|
||||
this.on('accounts.id', '=', 'users.account_id').orOn('accounts.owner_id', '=', 'users.id');
|
||||
});
|
||||
|
||||
knex.select('*').from('users').join('accounts', () => {
|
||||
knex.select('*').from('users').join('accounts', function() {
|
||||
this.on('accounts.id', '=', 'users.account_id').orOn('accounts.owner_id', '=', 'users.id');
|
||||
});
|
||||
|
||||
knex.select('*').from('users').join('accounts', (join: Knex.JoinClause) => {
|
||||
knex.select('*').from('users').join('accounts', function(join: Knex.JoinClause) {
|
||||
if (this !== join) {
|
||||
throw new Error("join() callback call semantics wrong");
|
||||
}
|
||||
@@ -337,120 +337,120 @@ knex.select('*').from('users').join('accounts', (join: Knex.JoinClause) => {
|
||||
join.on('accounts.id', '=', 'users.account_id').orOn('accounts.owner_id', '=', 'users.id');
|
||||
});
|
||||
|
||||
knex.select('*').from('user').join('contacts', () => {
|
||||
knex.select('*').from('user').join('contacts', function() {
|
||||
this.on('users.id', '=', knex.raw(7));
|
||||
});
|
||||
|
||||
knex.select('*').from('users').join('contacts', () => {
|
||||
knex.select('*').from('users').join('contacts', function() {
|
||||
this.on('users.id', '=', 'contacts.id').onIn('contacts.id', [7, 15, 23, 41]);
|
||||
});
|
||||
|
||||
knex.select('*').from('users').join('contacts', () => {
|
||||
knex.select('*').from('users').join('contacts', function() {
|
||||
this.on('users.id', '=', 'contacts.id').andOnIn('contacts.id', [7, 15, 23, 41]);
|
||||
});
|
||||
|
||||
knex.select('*').from('users').join('contacts', () => {
|
||||
knex.select('*').from('users').join('contacts', function() {
|
||||
this.on('users.id', '=', 'contacts.id').orOnIn('contacts.id', [7, 15, 23, 41]);
|
||||
});
|
||||
|
||||
knex.select('*').from('users').join('contacts', () => {
|
||||
knex.select('*').from('users').join('contacts', function() {
|
||||
this.on('users.id', '=', 'contacts.id').onNotIn('contacts.id', [7, 15, 23, 41]);
|
||||
});
|
||||
|
||||
knex.select('*').from('users').join('contacts', () => {
|
||||
knex.select('*').from('users').join('contacts', function() {
|
||||
this.on('users.id', '=', 'contacts.id').andOnNotIn('contacts.id', [7, 15, 23, 41]);
|
||||
});
|
||||
|
||||
knex.select('*').from('users').join('contacts', () => {
|
||||
knex.select('*').from('users').join('contacts', function() {
|
||||
this.on('users.id', '=', 'contacts.id').orOnNotIn('contacts.id', [7, 15, 23, 41]);
|
||||
});
|
||||
|
||||
knex.select('*').from('users').join('contacts', () => {
|
||||
knex.select('*').from('users').join('contacts', function() {
|
||||
this.on('users.id', '=', 'contacts.id').onNull('contacts.email');
|
||||
});
|
||||
|
||||
knex.select('*').from('users').join('contacts', () => {
|
||||
knex.select('*').from('users').join('contacts', function() {
|
||||
this.on('users.id', '=', 'contacts.id').andOnNull('contacts.email');
|
||||
});
|
||||
|
||||
knex.select('*').from('users').join('contacts', () => {
|
||||
knex.select('*').from('users').join('contacts', function() {
|
||||
this.on('users.id', '=', 'contacts.id').orOnNull('contacts.email');
|
||||
});
|
||||
|
||||
knex.select('*').from('users').join('contacts', () => {
|
||||
knex.select('*').from('users').join('contacts', function() {
|
||||
this.on('users.id', '=', 'contacts.id').onNotNull('contacts.email');
|
||||
});
|
||||
|
||||
knex.select('*').from('users').join('contacts', () => {
|
||||
knex.select('*').from('users').join('contacts', function() {
|
||||
this.on('users.id', '=', 'contacts.id').andOnNotNull('contacts.email');
|
||||
});
|
||||
|
||||
knex.select('*').from('users').join('contacts', () => {
|
||||
knex.select('*').from('users').join('contacts', function() {
|
||||
this.on('users.id', '=', 'contacts.id').orOnNotNull('contacts.email');
|
||||
});
|
||||
|
||||
knex.select('*').from('users').join('contacts', () => {
|
||||
this.on('users.id', '=', 'contacts.id').onExists(() => {
|
||||
knex.select('*').from('users').join('contacts', function() {
|
||||
this.on('users.id', '=', 'contacts.id').onExists(function() {
|
||||
this.select('*').from('accounts').whereRaw('users.account_id = accounts.id');
|
||||
});
|
||||
});
|
||||
|
||||
knex.select('*').from('users').join('contacts', () => {
|
||||
this.on('users.id', '=', 'contacts.id').andOnExists(() => {
|
||||
knex.select('*').from('users').join('contacts', function() {
|
||||
this.on('users.id', '=', 'contacts.id').andOnExists(function() {
|
||||
this.select('*').from('accounts').whereRaw('users.account_id = accounts.id');
|
||||
});
|
||||
});
|
||||
|
||||
knex.select('*').from('users').join('contacts', () => {
|
||||
this.on('users.id', '=', 'contacts.id').orOnExists(() => {
|
||||
knex.select('*').from('users').join('contacts', function() {
|
||||
this.on('users.id', '=', 'contacts.id').orOnExists(function() {
|
||||
this.select('*').from('accounts').whereRaw('users.account_id = accounts.id');
|
||||
});
|
||||
});
|
||||
|
||||
knex.select('*').from('users').join('contacts', () => {
|
||||
this.on('users.id', '=', 'contacts.id').onNotExists(() => {
|
||||
knex.select('*').from('users').join('contacts', function() {
|
||||
this.on('users.id', '=', 'contacts.id').onNotExists(function() {
|
||||
this.select('*').from('accounts').whereRaw('users.account_id = accounts.id');
|
||||
});
|
||||
});
|
||||
|
||||
knex.select('*').from('users').join('contacts', () => {
|
||||
this.on('users.id', '=', 'contacts.id').andOnNotExists(() => {
|
||||
knex.select('*').from('users').join('contacts', function() {
|
||||
this.on('users.id', '=', 'contacts.id').andOnNotExists(function() {
|
||||
this.select('*').from('accounts').whereRaw('users.account_id = accounts.id');
|
||||
});
|
||||
});
|
||||
|
||||
knex.select('*').from('users').join('contacts', () => {
|
||||
this.on('users.id', '=', 'contacts.id').orOnNotExists(() => {
|
||||
knex.select('*').from('users').join('contacts', function() {
|
||||
this.on('users.id', '=', 'contacts.id').orOnNotExists(function() {
|
||||
this.select('*').from('accounts').whereRaw('users.account_id = accounts.id');
|
||||
});
|
||||
});
|
||||
|
||||
knex.select('*').from('users').join('contacts', () => {
|
||||
knex.select('*').from('users').join('contacts', function() {
|
||||
this.on('users.id', '=', 'contacts.id').onBetween('contacts.id', [5, 30]);
|
||||
});
|
||||
|
||||
knex.select('*').from('users').join('contacts', () => {
|
||||
knex.select('*').from('users').join('contacts', function() {
|
||||
this.on('users.id', '=', 'contacts.id').andOnBetween('contacts.id', [5, 30]);
|
||||
});
|
||||
|
||||
knex.select('*').from('users').join('contacts', () => {
|
||||
knex.select('*').from('users').join('contacts', function() {
|
||||
this.on('users.id', '=', 'contacts.id').orOnBetween('contacts.id', [5, 30]);
|
||||
});
|
||||
|
||||
knex.select('*').from('users').join('contacts', () => {
|
||||
knex.select('*').from('users').join('contacts', function() {
|
||||
this.on('users.id', '=', 'contacts.id').onNotBetween('contacts.id', [5, 30]);
|
||||
});
|
||||
|
||||
knex.select('*').from('users').join('contacts', () => {
|
||||
knex.select('*').from('users').join('contacts', function() {
|
||||
this.on('users.id', '=', 'contacts.id').andOnNotBetween('contacts.id', [5, 30]);
|
||||
});
|
||||
|
||||
knex.select('*').from('users').join('contacts', () => {
|
||||
knex.select('*').from('users').join('contacts', function() {
|
||||
this.on('users.id', '=', 'contacts.id').orOnNotBetween('contacts.id', [5, 30]);
|
||||
});
|
||||
|
||||
knex.select('*').from('users').join('contacts', () => {
|
||||
this.on('users.id', '=', 'contacts.id').onNotExists(() => {
|
||||
knex.select('*').from('users').join('contacts', function() {
|
||||
this.on('users.id', '=', 'contacts.id').onNotExists(function() {
|
||||
this.select('*').from('accounts').whereRaw('users.account_id = accounts.id');
|
||||
});
|
||||
});
|
||||
@@ -475,7 +475,7 @@ knex.from('users').innerJoin('accounts', 'users.id', 'accounts.user_id');
|
||||
|
||||
knex.table('users').innerJoin('accounts', 'users.id', '=', 'accounts.user_id');
|
||||
|
||||
knex('users').innerJoin('accounts', () => {
|
||||
knex('users').innerJoin('accounts', function() {
|
||||
this.on('accounts.id', '=', 'users.account_id').orOn('accounts.owner_id', '=', 'users.id');
|
||||
});
|
||||
|
||||
@@ -485,7 +485,7 @@ knex('users').innerJoin('accounts', (join: Knex.JoinClause) => {
|
||||
|
||||
knex.select('*').from('users').leftJoin('accounts', 'users.id', 'accounts.user_id');
|
||||
|
||||
knex.select('*').from('users').leftJoin('accounts', () => {
|
||||
knex.select('*').from('users').leftJoin('accounts', function() {
|
||||
this.on('accounts.id', '=', 'users.account_id').orOn('accounts.owner_id', '=', 'users.id');
|
||||
});
|
||||
|
||||
@@ -502,13 +502,13 @@ knex.select('*').from('users').leftJoin('accounts', (join) => {
|
||||
|
||||
knex.select('*').from('users').leftOuterJoin('accounts', 'users.id', 'accounts.user_id');
|
||||
|
||||
knex.select('*').from('users').leftOuterJoin('accounts', () => {
|
||||
knex.select('*').from('users').leftOuterJoin('accounts', function() {
|
||||
this.on('accounts.id', '=', 'users.account_id').orOn('accounts.owner_id', '=', 'users.id');
|
||||
});
|
||||
|
||||
knex.select('*').from('users').rightJoin('accounts', 'users.id', 'accounts.user_id');
|
||||
|
||||
knex.select('*').from('users').rightJoin('accounts', () => {
|
||||
knex.select('*').from('users').rightJoin('accounts', function() {
|
||||
this.on('accounts.id', '=', 'users.account_id').orOn('accounts.owner_id', '=', 'users.id');
|
||||
});
|
||||
|
||||
@@ -518,13 +518,13 @@ knex.select('*').from('users').rightJoin('accounts', (join: Knex.JoinClause) =>
|
||||
|
||||
knex.select('*').from('users').rightOuterJoin('accounts', 'users.id', 'accounts.user_id');
|
||||
|
||||
knex.select('*').from('users').rightOuterJoin('accounts', () => {
|
||||
knex.select('*').from('users').rightOuterJoin('accounts', function() {
|
||||
this.on('accounts.id', '=', 'users.account_id').orOn('accounts.owner_id', '=', 'users.id');
|
||||
});
|
||||
|
||||
knex.select('*').from('users').outerJoin('accounts', 'users.id', 'accounts.user_id');
|
||||
|
||||
knex.select('*').from('users').outerJoin('accounts', () => {
|
||||
knex.select('*').from('users').outerJoin('accounts', function() {
|
||||
this.on('accounts.id', '=', 'users.account_id').orOn('accounts.owner_id', '=', 'users.id');
|
||||
});
|
||||
|
||||
@@ -534,7 +534,7 @@ knex.select('*').from('users').outerJoin('accounts', (join: Knex.JoinClause) =>
|
||||
|
||||
knex.select('*').from('users').fullOuterJoin('accounts', 'users.id', 'accounts.user_id');
|
||||
|
||||
knex.select('*').from('users').fullOuterJoin('accounts', () => {
|
||||
knex.select('*').from('users').fullOuterJoin('accounts', function() {
|
||||
this.on('accounts.id', '=', 'users.account_id').orOn('accounts.owner_id', '=', 'users.id');
|
||||
});
|
||||
|
||||
@@ -549,39 +549,39 @@ knex.select('*').from('accounts').joinRaw('natural full join table1').where('id'
|
||||
knex.select('*').from('accounts').join(knex.raw('natural full join table1')).where('id', 1);
|
||||
|
||||
knex.select('*').from('accounts')
|
||||
.join(() => {
|
||||
.join(function() {
|
||||
this.select('*').from('accounts').as('special_accounts');
|
||||
}, 'special_accounts.a', '=', 'accounts.b');
|
||||
knex.select('*').from('accounts')
|
||||
.leftJoin(() => {
|
||||
.leftJoin(function() {
|
||||
this.select('*').from('accounts').as('special_accounts');
|
||||
}, 'special_accounts.a', '=', 'accounts.b');
|
||||
knex.select('*').from('accounts')
|
||||
.leftOuterJoin(() => {
|
||||
.leftOuterJoin(function() {
|
||||
this.select('*').from('accounts').as('special_accounts');
|
||||
}, 'special_accounts.a', '=', 'accounts.b');
|
||||
knex.select('*').from('accounts')
|
||||
.rightJoin(() => {
|
||||
.rightJoin(function() {
|
||||
this.select('*').from('accounts').as('special_accounts');
|
||||
}, 'special_accounts.a', '=', 'accounts.b');
|
||||
knex.select('*').from('accounts')
|
||||
.rightOuterJoin(() => {
|
||||
.rightOuterJoin(function() {
|
||||
this.select('*').from('accounts').as('special_accounts');
|
||||
}, 'special_accounts.a', '=', 'accounts.b');
|
||||
knex.select('*').from('accounts')
|
||||
.innerJoin(() => {
|
||||
.innerJoin(function() {
|
||||
this.select('*').from('accounts').as('special_accounts');
|
||||
}, 'special_accounts.a', '=', 'accounts.b');
|
||||
knex.select('*').from('accounts')
|
||||
.crossJoin(() => {
|
||||
.crossJoin(function() {
|
||||
this.select('*').from('accounts').as('special_accounts');
|
||||
}, 'special_accounts.a', '=', 'accounts.b');
|
||||
knex.select('*').from('accounts')
|
||||
.fullOuterJoin(() => {
|
||||
.fullOuterJoin(function() {
|
||||
this.select('*').from('accounts').as('special_accounts');
|
||||
}, 'special_accounts.a', '=', 'accounts.b');
|
||||
knex.select('*').from('accounts')
|
||||
.outerJoin(() => {
|
||||
.outerJoin(function() {
|
||||
this.select('*').from('accounts').as('special_accounts');
|
||||
}, 'special_accounts.a', '=', 'accounts.b');
|
||||
|
||||
@@ -1044,66 +1044,66 @@ knex.select('*').from('users').where(knex.raw('id = ?', [1])).toSQL();
|
||||
//
|
||||
knex('users')
|
||||
.select('*')
|
||||
.join('contacts', (builder) => {
|
||||
this.on((builder: any) => {
|
||||
.join('contacts', function(builder) {
|
||||
this.on(function(builder: any) {
|
||||
let self: Knex.JoinClause = this;
|
||||
self = builder;
|
||||
}).andOn((builder: any) => {
|
||||
}).andOn(function(builder: any) {
|
||||
let self: Knex.JoinClause = this;
|
||||
self = builder;
|
||||
}).orOn((builder: any) => {
|
||||
}).orOn(function(builder: any) {
|
||||
let self: Knex.JoinClause = this;
|
||||
self = builder;
|
||||
}).onExists((builder: any) => {
|
||||
}).onExists(function(builder: any) {
|
||||
let self: Knex.QueryBuilder = this;
|
||||
self = builder;
|
||||
}).orOnExists((builder: any) => {
|
||||
}).orOnExists(function(builder: any) {
|
||||
let self: Knex.QueryBuilder = this;
|
||||
self = builder;
|
||||
}).andOnExists((builder: any) => {
|
||||
}).andOnExists(function(builder: any) {
|
||||
let self: Knex.QueryBuilder = this;
|
||||
self = builder;
|
||||
}).onNotExists((builder: any) => {
|
||||
}).onNotExists(function(builder: any) {
|
||||
let self: Knex.QueryBuilder = this;
|
||||
self = builder;
|
||||
}).andOnNotExists((builder: any) => {
|
||||
}).andOnNotExists(function(builder: any) {
|
||||
let self: Knex.QueryBuilder = this;
|
||||
self = builder;
|
||||
}).orOnNotExists((builder: any) => {
|
||||
}).orOnNotExists(function(builder: any) {
|
||||
let self: Knex.QueryBuilder = this;
|
||||
self = builder;
|
||||
});
|
||||
}).where((builder) => {
|
||||
}).where(function(builder) {
|
||||
let self: Knex.QueryBuilder = this;
|
||||
self = builder;
|
||||
}).orWhere((builder) => {
|
||||
}).orWhere(function(builder) {
|
||||
let self: Knex.QueryBuilder = this;
|
||||
self = builder;
|
||||
}).andWhere((builder) => {
|
||||
}).andWhere(function(builder) {
|
||||
let self: Knex.QueryBuilder = this;
|
||||
self = builder;
|
||||
}).whereIn('column', (builder) => {
|
||||
}).whereIn('column', function(builder) {
|
||||
let self: Knex.QueryBuilder = this;
|
||||
self = builder;
|
||||
}).orWhereIn('column', (builder) => {
|
||||
}).orWhereIn('column', function(builder) {
|
||||
let self: Knex.QueryBuilder = this;
|
||||
self = builder;
|
||||
}).whereNotIn('column', (builder) => {
|
||||
}).whereNotIn('column', function(builder) {
|
||||
let self: Knex.QueryBuilder = this;
|
||||
self = builder;
|
||||
}).orWhereNotIn('column', (builder) => {
|
||||
}).orWhereNotIn('column', function(builder) {
|
||||
let self: Knex.QueryBuilder = this;
|
||||
self = builder;
|
||||
}).whereWrapped((builder) => {
|
||||
}).whereWrapped(function(builder) {
|
||||
let self: Knex.QueryBuilder = this;
|
||||
self = builder;
|
||||
}).union((builder) => {
|
||||
}).union(function(builder) {
|
||||
let self: Knex.QueryBuilder = this;
|
||||
self = builder;
|
||||
}).unionAll((builder) => {
|
||||
}).unionAll(function(builder) {
|
||||
let self: Knex.QueryBuilder = this;
|
||||
self = builder;
|
||||
}).modify((builder, aBool) => {
|
||||
}).modify(function(builder, aBool) {
|
||||
let self: Knex.QueryBuilder = this;
|
||||
self = builder;
|
||||
}, true);
|
||||
@@ -1111,6 +1111,7 @@ knex('users')
|
||||
//
|
||||
// Migrations
|
||||
//
|
||||
const name = "test";
|
||||
const config = {
|
||||
directory: "./migrations",
|
||||
extension: "js",
|
||||
@@ -1196,12 +1197,12 @@ knex('characters')
|
||||
|
||||
knex('characters')
|
||||
.select()
|
||||
.whereIn('name', () => {
|
||||
.whereIn('name', function() {
|
||||
this.select('name').from('characters');
|
||||
});
|
||||
knex('characters')
|
||||
.select()
|
||||
.whereIn(['name', 'class'], () => {
|
||||
.whereIn(['name', 'class'], function() {
|
||||
this.select('name', 'class').from('characters');
|
||||
});
|
||||
|
||||
|
||||
Vendored
+166
-80
@@ -12,13 +12,30 @@
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
interface KnockoutSubscribableFunctions<T> {
|
||||
notifySubscribers(valueToWrite?: T, event?: string): void;
|
||||
/**
|
||||
* Notify subscribers of knockout "change" event. This doesn't acctually change the observable value.
|
||||
* @param eventValue A value to be sent with the event.
|
||||
* @param event The knockout event.
|
||||
*/
|
||||
notifySubscribers(eventValue?: T, event?: "change"): void;
|
||||
/**
|
||||
* Notify subscribers of a knockout or user defined event.
|
||||
* @param eventValue A value to be sent with the event.
|
||||
* @param event The knockout or user defined event name.
|
||||
*/
|
||||
notifySubscribers<U>(eventValue: U, event: string): void;
|
||||
}
|
||||
|
||||
interface KnockoutComputedFunctions<T> {
|
||||
}
|
||||
|
||||
interface KnockoutObservableFunctions<T> {
|
||||
/**
|
||||
* Used by knockout to decide if value of observable has changed and should notify subscribers. Returns true if instances are primitives, and false if are objects.
|
||||
* If your observable holds an object, this can be overwritten to return equality based on your needs.
|
||||
* @param a previous value.
|
||||
* @param b next value.
|
||||
*/
|
||||
equalityComparer(a: T, b: T): boolean;
|
||||
}
|
||||
|
||||
@@ -57,7 +74,7 @@ interface KnockoutObservableArrayFunctions<T> extends KnockoutReadonlyObservable
|
||||
pop(): T;
|
||||
/**
|
||||
* Adds a new item to the end of array.
|
||||
* @param items Items to be added
|
||||
* @param items Items to be added.
|
||||
*/
|
||||
push(...items: T[]): void;
|
||||
/**
|
||||
@@ -66,7 +83,7 @@ interface KnockoutObservableArrayFunctions<T> extends KnockoutReadonlyObservable
|
||||
shift(): T;
|
||||
/**
|
||||
* Inserts a new item at the beginning of the array.
|
||||
* @param items Items to be added
|
||||
* @param items Items to be added.
|
||||
*/
|
||||
unshift(...items: T[]): number;
|
||||
/**
|
||||
@@ -85,24 +102,24 @@ interface KnockoutObservableArrayFunctions<T> extends KnockoutReadonlyObservable
|
||||
|
||||
// Ko specific
|
||||
/**
|
||||
* Replaces the first value that equals oldItem with newItem
|
||||
* @param oldItem Item to be replaced
|
||||
* @param newItem Replacing item
|
||||
* Replaces the first value that equals oldItem with newItem.
|
||||
* @param oldItem Item to be replaced.
|
||||
* @param newItem Replacing item.
|
||||
*/
|
||||
replace(oldItem: T, newItem: T): void;
|
||||
/**
|
||||
* Removes all values that equal item and returns them as an array.
|
||||
* @param item The item to be removed
|
||||
* @param item The item to be removed.
|
||||
*/
|
||||
remove(item: T): T[];
|
||||
/**
|
||||
* Removes all values and returns them as an array.
|
||||
* @param removeFunction A function used to determine true if item should be removed and fasle otherwise
|
||||
* @param removeFunction A function used to determine true if item should be removed and fasle otherwise.
|
||||
*/
|
||||
remove(removeFunction: (item: T) => boolean): T[];
|
||||
/**
|
||||
* Removes all values that equal any of the supplied items
|
||||
* @param items Items to be removed
|
||||
* Removes all values that equal any of the supplied items.
|
||||
* @param items Items to be removed.
|
||||
*/
|
||||
removeAll(items: T[]): T[];
|
||||
/**
|
||||
@@ -140,45 +157,45 @@ interface KnockoutSubscribableStatic {
|
||||
|
||||
interface KnockoutSubscription {
|
||||
/**
|
||||
* Terminates a subscription
|
||||
* Terminates a subscription.
|
||||
*/
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
interface KnockoutSubscribable<T> extends KnockoutSubscribableFunctions<T> {
|
||||
/**
|
||||
* Registers to be notified after the observable's value changes
|
||||
* @param callback Function that is called whenever the notification happens
|
||||
* @param target Defines the value of 'this' in the callback function
|
||||
* @param event The name of the event to receive notification for
|
||||
* Registers to be notified after the observable's value changes.
|
||||
* @param callback Function that is called whenever the notification happens.
|
||||
* @param target Defines the value of 'this' in the callback function.
|
||||
* @param event The knockout event name.
|
||||
*/
|
||||
subscribe(callback: (newValue: T) => void, target?: any, event?: "change"): KnockoutSubscription;
|
||||
/**
|
||||
* Registers to be notified before the observable's value changes
|
||||
* @param callback Function that is called whenever the notification happens
|
||||
* @param target Defines the value of 'this' in the callback function
|
||||
* @param event The name of the event to receive notification for
|
||||
* Registers to be notified before the observable's value changes.
|
||||
* @param callback Function that is called whenever the notification happens.
|
||||
* @param target Defines the value of 'this' in the callback function.
|
||||
* @param event The knockout event name.
|
||||
*/
|
||||
subscribe(callback: (newValue: T) => void, target: any, event: "beforeChange"): KnockoutSubscription;
|
||||
/**
|
||||
* Registers to be notified when the observable's value changes
|
||||
* @param callback Function that is called whenever the notification happens
|
||||
* @param target Defines the value of 'this' in the callback function
|
||||
* @param event The name of the event to receive notification for
|
||||
* Registers to be notified when a knockout or user defined event happens.
|
||||
* @param callback Function that is called whenever the notification happens. eventValue can be anything. No relation to underlying observable.
|
||||
* @param target Defines the value of 'this' in the callback function.
|
||||
* @param event The knockout or user defined event name.
|
||||
*/
|
||||
subscribe<TEvent>(callback: (newValue: TEvent) => void, target: any, event: string): KnockoutSubscription;
|
||||
subscribe<U>(callback: (eventValue: U) => void, target: any, event: string): KnockoutSubscription;
|
||||
/**
|
||||
* Customizes observables basic functionality
|
||||
* Customizes observables basic functionality.
|
||||
* @param requestedExtenders Name of the extender feature and its value, e.g. { notify: 'always' }, { rateLimit: 50 }
|
||||
*/
|
||||
extend(requestedExtenders: { [key: string]: any; }): KnockoutSubscribable<T>;
|
||||
/**
|
||||
* Gets total number of subscribers
|
||||
* Gets total number of subscribers.
|
||||
*/
|
||||
getSubscriptionsCount(): number;
|
||||
/**
|
||||
* Gets number of subscribers of a particular event
|
||||
* @param event Event name
|
||||
* Gets number of subscribers of a particular event.
|
||||
* @param event Event name.
|
||||
*/
|
||||
getSubscriptionsCount(event: string): number;
|
||||
}
|
||||
@@ -187,26 +204,32 @@ interface KnockoutComputedStatic {
|
||||
fn: KnockoutComputedFunctions<any>;
|
||||
|
||||
/**
|
||||
* Creates computed observable
|
||||
* Creates computed observable.
|
||||
*/
|
||||
<T>(): KnockoutComputed<T>;
|
||||
/**
|
||||
* Creates computed observable
|
||||
* @param evaluatorFunction Function that computes the observable value
|
||||
* @param context Defines the value of 'this' when evaluating the computed observable
|
||||
* @param options An object with further properties for the computed observable
|
||||
* Creates computed observable.
|
||||
* @param evaluatorFunction Function that computes the observable value.
|
||||
* @param context Defines the value of 'this' when evaluating the computed observable.
|
||||
* @param options An object with further properties for the computed observable.
|
||||
*/
|
||||
<T>(evaluatorFunction: () => T, context?: any, options?: KnockoutComputedOptions<T>): KnockoutComputed<T>;
|
||||
/**
|
||||
* Creates computed observable
|
||||
* @param options An object that defines the computed observable options and behavior
|
||||
* @param context Defines the value of 'this' when evaluating the computed observable
|
||||
* Creates computed observable.
|
||||
* @param options An object that defines the computed observable options and behavior.
|
||||
* @param context Defines the value of 'this' when evaluating the computed observable.
|
||||
*/
|
||||
<T>(options: KnockoutComputedDefine<T>, context?: any): KnockoutComputed<T>;
|
||||
}
|
||||
|
||||
interface KnockoutReadonlyComputed<T> extends KnockoutReadonlyObservable<T> {
|
||||
/**
|
||||
* Returns whether the computed observable may be updated in the future. A computed observable is inactive if it has no dependencies.
|
||||
*/
|
||||
isActive(): boolean;
|
||||
/**
|
||||
* Returns the current number of dependencies of the computed observable.
|
||||
*/
|
||||
getDependenciesCount(): number;
|
||||
}
|
||||
|
||||
@@ -220,15 +243,7 @@ interface KnockoutComputed<T> extends KnockoutReadonlyComputed<T>, KnockoutObser
|
||||
*/
|
||||
dispose(): void;
|
||||
/**
|
||||
* Returns whether the computed observable may be updated in the future. A computed observable is inactive if it has no dependencies.
|
||||
*/
|
||||
isActive(): boolean;
|
||||
/**
|
||||
* Returns the current number of dependencies of the computed observable.
|
||||
*/
|
||||
getDependenciesCount(): number;
|
||||
/**
|
||||
* Customizes observables basic functionality
|
||||
* Customizes observables basic functionality.
|
||||
* @param requestedExtenders Name of the extender feature and it's value, e.g. { notify: 'always' }, { rateLimit: 50 }
|
||||
*/
|
||||
extend(requestedExtenders: { [key: string]: any; }): KnockoutComputed<T>;
|
||||
@@ -249,19 +264,19 @@ interface KnockoutReadonlyObservableArray<T> extends KnockoutReadonlyObservable<
|
||||
subscribe(callback: (newValue: KnockoutArrayChange<T>[]) => void, target: any, event: "arrayChange"): KnockoutSubscription;
|
||||
subscribe(callback: (newValue: T[]) => void, target: any, event: "beforeChange"): KnockoutSubscription;
|
||||
subscribe(callback: (newValue: T[]) => void, target?: any, event?: "change"): KnockoutSubscription;
|
||||
subscribe<TEvent>(callback: (newValue: TEvent) => void, target: any, event: string): KnockoutSubscription;
|
||||
subscribe<U>(callback: (newValue: U) => void, target: any, event: string): KnockoutSubscription;
|
||||
}
|
||||
|
||||
/*
|
||||
NOTE: In theory this should extend both Observable<T[]> and ReadonlyObservableArray<T>,
|
||||
NOTE: In theory this should extend both KnockoutObservable<T[]> and KnockoutReadonlyObservableArray<T>,
|
||||
but can't since they both provide conflicting typings of .subscribe.
|
||||
So it extends Observable<T[]> and duplicates the subscribe definitions, which should be kept in sync
|
||||
So it extends KnockoutObservable<T[]> and duplicates the subscribe definitions, which should be kept in sync
|
||||
*/
|
||||
interface KnockoutObservableArray<T> extends KnockoutObservable<T[]>, KnockoutObservableArrayFunctions<T> {
|
||||
subscribe(callback: (newValue: KnockoutArrayChange<T>[]) => void, target: any, event: "arrayChange"): KnockoutSubscription;
|
||||
subscribe(callback: (newValue: T[]) => void, target: any, event: "beforeChange"): KnockoutSubscription;
|
||||
subscribe(callback: (newValue: T[]) => void, target?: any, event?: "change"): KnockoutSubscription;
|
||||
subscribe<TEvent>(callback: (newValue: TEvent) => void, target: any, event: string): KnockoutSubscription;
|
||||
subscribe<U>(callback: (newValue: U) => void, target: any, event: string): KnockoutSubscription;
|
||||
|
||||
extend(requestedExtenders: { [key: string]: any; }): KnockoutObservableArray<T>;
|
||||
}
|
||||
@@ -281,9 +296,8 @@ interface KnockoutObservableStatic {
|
||||
interface KnockoutReadonlyObservable<T> extends KnockoutSubscribable<T>, KnockoutObservableFunctions<T> {
|
||||
(): T;
|
||||
|
||||
|
||||
/**
|
||||
* Returns the current value of the computed observable without creating a dependency
|
||||
* Returns the current value of the computed observable without creating a dependency.
|
||||
*/
|
||||
peek(): T;
|
||||
valueHasMutated?: { (): void; };
|
||||
@@ -294,6 +308,10 @@ interface KnockoutObservable<T> extends KnockoutReadonlyObservable<T> {
|
||||
(value: T): void;
|
||||
|
||||
// Since .extend does arbitrary thing to an observable, it's not safe to do on a readonly observable
|
||||
/**
|
||||
* Customizes observables basic functionality.
|
||||
* @param requestedExtenders Name of the extender feature and it's value, e.g. { notify: 'always' }, { rateLimit: 50 }
|
||||
*/
|
||||
extend(requestedExtenders: { [key: string]: any; }): KnockoutObservable<T>;
|
||||
}
|
||||
|
||||
@@ -301,7 +319,7 @@ interface KnockoutComputedOptions<T> {
|
||||
/**
|
||||
* Makes the computed observable writable. This is a function that receives values that other code is trying to write to your computed observable.
|
||||
* It’s up to you to supply custom logic to handle the incoming values, typically by writing the values to some underlying observable(s).
|
||||
* @param value
|
||||
* @param value Value being written to the computer observable.
|
||||
*/
|
||||
write?(value: T): void;
|
||||
/**
|
||||
@@ -347,8 +365,19 @@ interface KnockoutBindingContext {
|
||||
$component: any;
|
||||
$componentTemplateNodes: Node[];
|
||||
|
||||
extend(properties: any): any;
|
||||
createChildContext(dataItemOrAccessor: any, dataItemAlias?: any, extendCallback?: Function): any;
|
||||
/**
|
||||
* Clones the current Binding Context, adding extra properties to it.
|
||||
* @param properties object with properties to be added in the binding context.
|
||||
*/
|
||||
extend(properties: { [key: string]: any; } | (() => { [key: string]: any; })): KnockoutBindingContext;
|
||||
/**
|
||||
* This returns a new binding context whose viewmodel is the first parameter and whose $parentContext is the current bindingContext.
|
||||
* @param dataItemOrAccessor The binding context of the children.
|
||||
* @param dataItemAlias An alias for the data item in descendant contexts.
|
||||
* @param extendCallback Function to be called.
|
||||
* @param options Further options.
|
||||
*/
|
||||
createChildContext(dataItemOrAccessor: any, dataItemAlias?: string, extendCallback?: Function, options?: { "exportDependencies": boolean }): any;
|
||||
}
|
||||
|
||||
interface KnockoutAllBindingsAccessor {
|
||||
@@ -405,7 +434,7 @@ interface KnockoutBindingHandlers {
|
||||
}
|
||||
|
||||
interface KnockoutMemoization {
|
||||
memoize(callback: () => string): string;
|
||||
memoize(callback: Function): string;
|
||||
unmemoize(memoId: string, callbackParams: any[]): boolean;
|
||||
unmemoizeDomNodeAndDescendants(domNode: any, extraCallbackParamsArray: any[]): boolean;
|
||||
parseMemoText(memoText: string): string;
|
||||
@@ -640,63 +669,100 @@ interface KnockoutStatic {
|
||||
|
||||
computed: KnockoutComputedStatic;
|
||||
/**
|
||||
* Creates a pure computed observable
|
||||
* @param evaluatorFunction Function that computes the observable value
|
||||
* @param context Defines the value of 'this' when evaluating the computed observable
|
||||
* Creates a pure computed observable.
|
||||
* @param evaluatorFunction Function that computes the observable value.
|
||||
* @param context Defines the value of 'this' when evaluating the computed observable.
|
||||
*/
|
||||
pureComputed<T>(evaluatorFunction: () => T, context?: any): KnockoutComputed<T>;
|
||||
/**
|
||||
* Creates a pure computed observable
|
||||
* @param options An object that defines the computed observable options and behavior
|
||||
* @param context Defines the value of 'this' when evaluating the computed observable
|
||||
* Creates a pure computed observable.
|
||||
* @param options An object that defines the computed observable options and behavior.
|
||||
* @param context Defines the value of 'this' when evaluating the computed observable.
|
||||
*/
|
||||
pureComputed<T>(options: KnockoutComputedDefine<T>, context?: any): KnockoutComputed<T>;
|
||||
|
||||
observableArray: KnockoutObservableArrayStatic;
|
||||
|
||||
contextFor(node: any): any;
|
||||
/**
|
||||
* Evaluates if instance is a KnockoutSubscribable.
|
||||
* @param instance Instance to be evaluated.
|
||||
*/
|
||||
isSubscribable(instance: any): instance is KnockoutSubscribable<any>;
|
||||
toJSON(viewModel: any, replacer?: Function, space?: any): string;
|
||||
|
||||
/**
|
||||
* Clones object substituting each observable for it's underlying value. Uses browser JSON.stringify internally to stringify the result.
|
||||
* @param viewModel Object with observables to be converted.
|
||||
* @param replacer A Function or array of names that alters the behavior of the stringification process.
|
||||
* @param space Used to insert white space into the output JSON string for readability purposes.
|
||||
*/
|
||||
toJSON(viewModel: any, replacer?: Function | [string | number], space?: string | number): string;
|
||||
/**
|
||||
* Clones object substituting for each observable the current value of that observable.
|
||||
* @param viewModel Object with observables to be converted.
|
||||
*/
|
||||
toJS(viewModel: any): any;
|
||||
/**
|
||||
* Determine if argument is an observable. Returns true for observables, observable arrays, and all computed observables.
|
||||
* @param instance Object to be checked
|
||||
* @param instance Object to be checked.
|
||||
*/
|
||||
isObservable(instance: any): instance is KnockoutObservable<any>;
|
||||
/**
|
||||
* Determine if argument is an observable. Returns true for observables, observable arrays, and all computed observables.
|
||||
* @param instance Object to be checked
|
||||
* @param instance Object to be checked.
|
||||
*/
|
||||
isObservable<T>(instance: KnockoutObservable<T> | T): instance is KnockoutObservable<T>;
|
||||
/**
|
||||
* Determine if argument is a writable observable. Returns true for observables, observable arrays, and writable computed observables.
|
||||
* @param instance Object to be checked
|
||||
* @param instance Object to be checked.
|
||||
*/
|
||||
isWriteableObservable(instance: any): instance is KnockoutObservable<any>;
|
||||
/**
|
||||
* Determine if argument is a writable observable. Returns true for observables, observable arrays, and writable computed observables.
|
||||
* @param instance Object to be checked
|
||||
* @param instance Object to be checked.
|
||||
*/
|
||||
isWriteableObservable<T>(instance: KnockoutObservable<T> | T): instance is KnockoutObservable<T>;
|
||||
/**
|
||||
* Determine if argument is a computed observable
|
||||
* @param instance Object to be checked
|
||||
* Determine if argument is a computed observable.
|
||||
* @param instance Object to be checked.
|
||||
*/
|
||||
isComputed(instance: any): instance is KnockoutComputed<any>;
|
||||
/**
|
||||
* Determine if argument is a computed observable
|
||||
* @param instance Object to be checked
|
||||
* Determine if argument is a computed observable.
|
||||
* @param instance Object to be checked.
|
||||
*/
|
||||
isComputed<T>(instance: KnockoutObservable<T> | T): instance is KnockoutComputed<T>;
|
||||
|
||||
dataFor(node: any): any;
|
||||
/**
|
||||
* Returns the data that was available for binding against the element.
|
||||
* @param node Html node that contains the binding context.
|
||||
*/
|
||||
dataFor(node: Node): any;
|
||||
/**
|
||||
* Returns the entire binding context that was available to the DOM element.
|
||||
* @param node Html node that contains the binding context.
|
||||
*/
|
||||
contextFor(node: Node): any;
|
||||
/**
|
||||
* Removes a node from the DOM.
|
||||
* @param node Node to be removed.
|
||||
*/
|
||||
removeNode(node: Node): void;
|
||||
/**
|
||||
* Used internally by Knockout to clean up data/computeds that it created related to the element. It does not remove any event handlers added by bindings.
|
||||
* @param node Node to be cleaned.
|
||||
*/
|
||||
cleanNode(node: Node): Node;
|
||||
renderTemplate(template: Function, viewModel: any, options?: any, target?: any, renderMode?: any): any;
|
||||
renderTemplate(template: string, viewModel: any, options?: any, target?: any, renderMode?: any): any;
|
||||
unwrap<T>(value: KnockoutObservable<T> | T): T;
|
||||
unwrap<T>(value: KnockoutObservableArray<T> | T[]): T[];
|
||||
/**
|
||||
* Returns the underlying value of the Knockout Observable or in case of plain js object, return the object. Use this to easily accept both observable and plain values.
|
||||
* @param instance observable to be unwraped if it's an Observable.
|
||||
*/
|
||||
unwrap<T>(instance: KnockoutObservable<T> | T): T;
|
||||
/**
|
||||
* Gets the array inside the KnockoutObservableArray.
|
||||
* @param instance observable to be unwraped.
|
||||
*/
|
||||
unwrap<T>(instance: KnockoutObservableArray<T> | T[]): T[];
|
||||
|
||||
/**
|
||||
* Get information about the current computed property during the execution of a computed observable’s evaluator function.
|
||||
@@ -783,10 +849,10 @@ interface KnockoutStatic {
|
||||
renderTemplateForEach(template: any, arrayOrObservableArray: KnockoutObservable<any>, options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any;
|
||||
|
||||
/**
|
||||
* Executes a callback function inside a computed observable, without creating a dependecy between it and the observables inside the function
|
||||
* Executes a callback function inside a computed observable, without creating a dependecy between it and the observables inside the function.
|
||||
* @param callback Function to be called.
|
||||
* @param callbackTarget Defines the value of 'this' in the callback function
|
||||
* @param callbackArgs Arguments for the callback Function
|
||||
* @param callbackTarget Defines the value of 'this' in the callback function.
|
||||
* @param callbackArgs Arguments for the callback Function.
|
||||
*/
|
||||
ignoreDependencies<T>(callback: () => T, callbackTarget?: any, callbackArgs?: any): T;
|
||||
|
||||
@@ -924,9 +990,25 @@ declare namespace KnockoutComponentTypes {
|
||||
}
|
||||
|
||||
interface Loader {
|
||||
/**
|
||||
* Define this if: you want to supply configurations programmatically based on names, e.g., to implement a naming convention.
|
||||
* @see {@link https://knockoutjs.com/documentation/component-loaders.html}
|
||||
*/
|
||||
getConfig?(componentName: string, callback: (result: ComponentConfig | null) => void): void;
|
||||
/**
|
||||
* Define this if: you want to take control over how component configurations are interpreted, e.g., if you do not want to use the standard 'viewModel/template' pair format.
|
||||
* @see {@link https://knockoutjs.com/documentation/component-loaders.html}
|
||||
*/
|
||||
loadComponent?(componentName: string, config: ComponentConfig, callback: (result: Definition | null) => void): void;
|
||||
/**
|
||||
* Define this if: you want to use custom logic to supply DOM nodes for a given template configuration (e.g., using an ajax request to fetch a template by URL).
|
||||
* @see {@link https://knockoutjs.com/documentation/component-loaders.html}
|
||||
*/
|
||||
loadTemplate?(componentName: string, templateConfig: any, callback: (result: Node[] | null) => void): void;
|
||||
/**
|
||||
* Define this if: you want to use custom logic to supply a viewmodel factory for a given viewmodel configuration (e.g., integrating with a third-party module loader or dependency injection system).
|
||||
* @see {@link https://knockoutjs.com/documentation/component-loaders.html}
|
||||
*/
|
||||
loadViewModel?(componentName: string, viewModelConfig: any, callback: (result: any) => void): void;
|
||||
suppressLoaderExceptions?: boolean;
|
||||
}
|
||||
@@ -941,7 +1023,7 @@ interface KnockoutComponents {
|
||||
|
||||
/**
|
||||
* Registers a component, in the default component loader, to be used by name in the component binding.
|
||||
* @param componentName Component name.
|
||||
* @param componentName Component name. Will be used for your custom HTML tag name.
|
||||
* @param config Component configuration.
|
||||
*/
|
||||
register(componentName: string, config: KnockoutComponentTypes.Config | KnockoutComponentTypes.EmptyConfig): void;
|
||||
@@ -956,7 +1038,7 @@ interface KnockoutComponents {
|
||||
*/
|
||||
unregister(componentName: string): void;
|
||||
/**
|
||||
* Searchs each registered component loader by component name, and returns the viewmodel/template declaration via callback parameter
|
||||
* Searchs each registered component loader by component name, and returns the viewmodel/template declaration via callback parameter.
|
||||
* @param componentName Component name.
|
||||
* @param callback Function to be called with the viewmodel/template declaration parameter.
|
||||
*/
|
||||
@@ -968,6 +1050,10 @@ interface KnockoutComponents {
|
||||
clearCachedDefinition(componentName: string): void
|
||||
defaultLoader: KnockoutComponentTypes.Loader;
|
||||
loaders: KnockoutComponentTypes.Loader[];
|
||||
/**
|
||||
* Returns the registered component name for a HTML element. Can be overwriten to to control dynamically which HTML element map to which component name.
|
||||
* @param node html element that corresponds to a custom component.
|
||||
*/
|
||||
getComponentNameForNode(node: Node): string;
|
||||
}
|
||||
|
||||
|
||||
Vendored
+4
-4
@@ -30,10 +30,10 @@ declare namespace KoaBouncer {
|
||||
isNotIn(arr: any[], tip?: string): Validator
|
||||
isArray(tip?: string): Validator
|
||||
eq(otherVal: string, tip?: string): Validator
|
||||
gt(otherVal: string, tip?: string): Validator
|
||||
gte(otherVal: string, tip?: string): Validator
|
||||
lt(otherVal: string, tip?: string): Validator
|
||||
lte(otherVal: string, tip?: string): Validator
|
||||
gt(otherVal: number, tip?: string): Validator
|
||||
gte(otherVal: number, tip?: string): Validator
|
||||
lt(otherVal: number, tip?: string): Validator
|
||||
lte(otherVal: number, tip?: string): Validator
|
||||
isLength(min: number, max: number, tip?: string): Validator
|
||||
defaultTo(valueOrFunction: any): Validator
|
||||
isString(tip?: string): Validator
|
||||
|
||||
@@ -29,6 +29,9 @@ router.post('/users', async (ctx) => {
|
||||
.isString()
|
||||
.eq(ctx.vals.password1, 'Passwords must match')
|
||||
|
||||
ctx.validateBody('age')
|
||||
.gte(18, 'Must be 18 or older')
|
||||
|
||||
console.log(ctx.vals)
|
||||
})
|
||||
|
||||
|
||||
@@ -3,13 +3,13 @@ import mount = require("koa-mount");
|
||||
|
||||
const a = new Koa();
|
||||
|
||||
a.use((next) => {
|
||||
a.use(function(next) {
|
||||
this.body = "Hello";
|
||||
});
|
||||
|
||||
const b = new Koa();
|
||||
|
||||
b.use((next) => {
|
||||
b.use(function(next) {
|
||||
this.body = "World";
|
||||
});
|
||||
|
||||
|
||||
Vendored
+121
@@ -193,6 +193,17 @@ declare class Router<StateT = any, CustomT = {}> {
|
||||
path: string | RegExp | (string | RegExp)[],
|
||||
...middleware: Array<Router.IMiddleware<StateT, CustomT>>
|
||||
): Router<StateT, CustomT>;
|
||||
get<T, U>(
|
||||
name: string,
|
||||
path: string | RegExp,
|
||||
middleware: Koa.Middleware<T, U>,
|
||||
routeHandler: Router.IMiddleware<StateT & T, CustomT & U>
|
||||
): Router<StateT & T, CustomT & U>;
|
||||
get<T, U>(
|
||||
path: string | RegExp | (string | RegExp)[],
|
||||
middleware: Koa.Middleware<T, U>,
|
||||
routeHandler: Router.IMiddleware<StateT & T, CustomT & U>
|
||||
): Router<StateT & T, CustomT & U>;
|
||||
|
||||
/**
|
||||
* HTTP post method
|
||||
@@ -206,6 +217,17 @@ declare class Router<StateT = any, CustomT = {}> {
|
||||
path: string | RegExp | (string | RegExp)[],
|
||||
...middleware: Array<Router.IMiddleware<StateT, CustomT>>
|
||||
): Router<StateT, CustomT>;
|
||||
post<T, U>(
|
||||
name: string,
|
||||
path: string | RegExp,
|
||||
middleware: Koa.Middleware<T, U>,
|
||||
routeHandler: Router.IMiddleware<StateT & T, CustomT & U>
|
||||
): Router<StateT & T, CustomT & U>;
|
||||
post<T, U>(
|
||||
path: string | RegExp | (string | RegExp)[],
|
||||
middleware: Koa.Middleware<T, U>,
|
||||
routeHandler: Router.IMiddleware<StateT & T, CustomT & U>
|
||||
): Router<StateT & T, CustomT & U>;
|
||||
|
||||
/**
|
||||
* HTTP put method
|
||||
@@ -219,6 +241,17 @@ declare class Router<StateT = any, CustomT = {}> {
|
||||
path: string | RegExp | (string | RegExp)[],
|
||||
...middleware: Array<Router.IMiddleware<StateT, CustomT>>
|
||||
): Router<StateT, CustomT>;
|
||||
put<T, U>(
|
||||
name: string,
|
||||
path: string | RegExp,
|
||||
middleware: Koa.Middleware<T, U>,
|
||||
routeHandler: Router.IMiddleware<StateT & T, CustomT & U>
|
||||
): Router<StateT & T, CustomT & U>;
|
||||
put<T, U>(
|
||||
path: string | RegExp | (string | RegExp)[],
|
||||
middleware: Koa.Middleware<T, U>,
|
||||
routeHandler: Router.IMiddleware<StateT & T, CustomT & U>
|
||||
): Router<StateT & T, CustomT & U>;
|
||||
|
||||
/**
|
||||
* HTTP link method
|
||||
@@ -232,6 +265,17 @@ declare class Router<StateT = any, CustomT = {}> {
|
||||
path: string | RegExp | (string | RegExp)[],
|
||||
...middleware: Array<Router.IMiddleware<StateT, CustomT>>
|
||||
): Router<StateT, CustomT>;
|
||||
link<T, U>(
|
||||
name: string,
|
||||
path: string | RegExp,
|
||||
middleware: Koa.Middleware<T, U>,
|
||||
routeHandler: Router.IMiddleware<StateT & T, CustomT & U>
|
||||
): Router<StateT & T, CustomT & U>;
|
||||
link<T, U>(
|
||||
path: string | RegExp | (string | RegExp)[],
|
||||
middleware: Koa.Middleware<T, U>,
|
||||
routeHandler: Router.IMiddleware<StateT & T, CustomT & U>
|
||||
): Router<StateT & T, CustomT & U>;
|
||||
|
||||
/**
|
||||
* HTTP unlink method
|
||||
@@ -245,6 +289,17 @@ declare class Router<StateT = any, CustomT = {}> {
|
||||
path: string | RegExp | (string | RegExp)[],
|
||||
...middleware: Array<Router.IMiddleware<StateT, CustomT>>
|
||||
): Router<StateT, CustomT>;
|
||||
unlink<T, U>(
|
||||
name: string,
|
||||
path: string | RegExp,
|
||||
middleware: Koa.Middleware<T, U>,
|
||||
routeHandler: Router.IMiddleware<StateT & T, CustomT & U>
|
||||
): Router<StateT & T, CustomT & U>;
|
||||
unlink<T, U>(
|
||||
path: string | RegExp | (string | RegExp)[],
|
||||
middleware: Koa.Middleware<T, U>,
|
||||
routeHandler: Router.IMiddleware<StateT & T, CustomT & U>
|
||||
): Router<StateT & T, CustomT & U>;
|
||||
|
||||
/**
|
||||
* HTTP delete method
|
||||
@@ -258,6 +313,17 @@ declare class Router<StateT = any, CustomT = {}> {
|
||||
path: string | RegExp | (string | RegExp)[],
|
||||
...middleware: Array<Router.IMiddleware<StateT, CustomT>>
|
||||
): Router<StateT, CustomT>;
|
||||
delete<T, U>(
|
||||
name: string,
|
||||
path: string | RegExp,
|
||||
middleware: Koa.Middleware<T, U>,
|
||||
routeHandler: Router.IMiddleware<StateT & T, CustomT & U>
|
||||
): Router<StateT & T, CustomT & U>;
|
||||
delete<T, U>(
|
||||
path: string | RegExp | (string | RegExp)[],
|
||||
middleware: Koa.Middleware<T, U>,
|
||||
routeHandler: Router.IMiddleware<StateT & T, CustomT & U>
|
||||
): Router<StateT & T, CustomT & U>;
|
||||
|
||||
/**
|
||||
* Alias for `router.delete()` because delete is a reserved word
|
||||
@@ -271,6 +337,17 @@ declare class Router<StateT = any, CustomT = {}> {
|
||||
path: string | RegExp | (string | RegExp)[],
|
||||
...middleware: Array<Router.IMiddleware<StateT, CustomT>>
|
||||
): Router<StateT, CustomT>;
|
||||
del<T, U>(
|
||||
name: string,
|
||||
path: string | RegExp,
|
||||
middleware: Koa.Middleware<T, U>,
|
||||
routeHandler: Router.IMiddleware<StateT & T, CustomT & U>
|
||||
): Router<StateT & T, CustomT & U>;
|
||||
del<T, U>(
|
||||
path: string | RegExp | (string | RegExp)[],
|
||||
middleware: Koa.Middleware<T, U>,
|
||||
routeHandler: Router.IMiddleware<StateT & T, CustomT & U>
|
||||
): Router<StateT & T, CustomT & U>;
|
||||
|
||||
/**
|
||||
* HTTP head method
|
||||
@@ -284,6 +361,17 @@ declare class Router<StateT = any, CustomT = {}> {
|
||||
path: string | RegExp | (string | RegExp)[],
|
||||
...middleware: Array<Router.IMiddleware<StateT, CustomT>>
|
||||
): Router<StateT, CustomT>;
|
||||
head<T, U>(
|
||||
name: string,
|
||||
path: string | RegExp,
|
||||
middleware: Koa.Middleware<T, U>,
|
||||
routeHandler: Router.IMiddleware<StateT & T, CustomT & U>
|
||||
): Router<StateT & T, CustomT & U>;
|
||||
head<T, U>(
|
||||
path: string | RegExp | (string | RegExp)[],
|
||||
middleware: Koa.Middleware<T, U>,
|
||||
routeHandler: Router.IMiddleware<StateT & T, CustomT & U>
|
||||
): Router<StateT & T, CustomT & U>;
|
||||
|
||||
/**
|
||||
* HTTP options method
|
||||
@@ -297,6 +385,17 @@ declare class Router<StateT = any, CustomT = {}> {
|
||||
path: string | RegExp | (string | RegExp)[],
|
||||
...middleware: Array<Router.IMiddleware<StateT, CustomT>>
|
||||
): Router<StateT, CustomT>;
|
||||
options<T, U>(
|
||||
name: string,
|
||||
path: string | RegExp,
|
||||
middleware: Koa.Middleware<T, U>,
|
||||
routeHandler: Router.IMiddleware<StateT & T, CustomT & U>
|
||||
): Router<StateT & T, CustomT & U>;
|
||||
options<T, U>(
|
||||
path: string | RegExp | (string | RegExp)[],
|
||||
middleware: Koa.Middleware<T, U>,
|
||||
routeHandler: Router.IMiddleware<StateT & T, CustomT & U>
|
||||
): Router<StateT & T, CustomT & U>;
|
||||
|
||||
/**
|
||||
* HTTP path method
|
||||
@@ -310,6 +409,17 @@ declare class Router<StateT = any, CustomT = {}> {
|
||||
path: string | RegExp | (string | RegExp)[],
|
||||
...middleware: Array<Router.IMiddleware<StateT, CustomT>>
|
||||
): Router<StateT, CustomT>;
|
||||
patch<T, U>(
|
||||
name: string,
|
||||
path: string | RegExp,
|
||||
middleware: Koa.Middleware<T, U>,
|
||||
routeHandler: Router.IMiddleware<StateT & T, CustomT & U>
|
||||
): Router<StateT & T, CustomT & U>;
|
||||
patch<T, U>(
|
||||
path: string | RegExp | (string | RegExp)[],
|
||||
middleware: Koa.Middleware<T, U>,
|
||||
routeHandler: Router.IMiddleware<StateT & T, CustomT & U>
|
||||
): Router<StateT & T, CustomT & U>;
|
||||
|
||||
/**
|
||||
* Register route with all methods.
|
||||
@@ -323,6 +433,17 @@ declare class Router<StateT = any, CustomT = {}> {
|
||||
path: string | RegExp | (string | RegExp)[],
|
||||
...middleware: Array<Router.IMiddleware<StateT, CustomT>>
|
||||
): Router<StateT, CustomT>;
|
||||
all<T, U>(
|
||||
name: string,
|
||||
path: string | RegExp,
|
||||
middleware: Koa.Middleware<T, U>,
|
||||
routeHandler: Router.IMiddleware<StateT & T, CustomT & U>
|
||||
): Router<StateT & T, CustomT & U>;
|
||||
all<T, U>(
|
||||
path: string | RegExp | (string | RegExp)[],
|
||||
middleware: Koa.Middleware<T, U>,
|
||||
routeHandler: Router.IMiddleware<StateT & T, CustomT & U>
|
||||
): Router<StateT & T, CustomT & U>;
|
||||
|
||||
/**
|
||||
* Set the path prefix for a Router instance that was already initialized.
|
||||
|
||||
@@ -125,3 +125,66 @@ app2.use((ctx: Context, next: any) => {
|
||||
});
|
||||
|
||||
app2.listen(8000);
|
||||
|
||||
// Prepending middlewares tests
|
||||
|
||||
type IBlah = { blah: string; }
|
||||
type IWooh = { wooh: string; }
|
||||
|
||||
const router4 = new Router<MyState, MyContext>({prefix: "/users"});
|
||||
|
||||
router4.get('/',
|
||||
(ctx: Koa.ParameterizedContext<IBlah & IWooh>, next) => {
|
||||
ctx.state.blah = "blah";
|
||||
ctx.state.wooh = "wooh";
|
||||
return next();
|
||||
},
|
||||
(ctx, next) => {
|
||||
console.log(ctx.state.blah);
|
||||
console.log(ctx.state.wooh);
|
||||
console.log(ctx.state.foo);
|
||||
ctx.body = 'Hello World!';
|
||||
return next();
|
||||
})
|
||||
|
||||
const middleware1: Koa.Middleware<IBlah> = (ctx, next) => {
|
||||
ctx.state.blah = "blah";
|
||||
}
|
||||
|
||||
const middleware2: Koa.Middleware<IWooh> = (ctx, next) => {
|
||||
ctx.state.wooh = "blah";
|
||||
}
|
||||
|
||||
const emptyMiddleware: Koa.Middleware<{}> = (ctx, next) => {
|
||||
}
|
||||
|
||||
function routeHandler1(ctx: Koa.ParameterizedContext<IWooh>): void {
|
||||
ctx.body = "234";
|
||||
}
|
||||
|
||||
function routeHandler2(ctx: Koa.ParameterizedContext<IBlah>): void {
|
||||
ctx.body = "234";
|
||||
}
|
||||
|
||||
function routeHandler3(ctx: Koa.ParameterizedContext<{}>): void {
|
||||
ctx.body = "234";
|
||||
}
|
||||
|
||||
function routeHandler4(ctx: Router.RouterContext<MyState, MyContext>): void {
|
||||
ctx.body = "234";
|
||||
}
|
||||
|
||||
const middleware3 = compose([middleware1, middleware2]);
|
||||
|
||||
router4.get('/foo', middleware3, routeHandler1);
|
||||
router4.post('/foo', middleware1, routeHandler2);
|
||||
router4.put('/foo', middleware2, routeHandler3);
|
||||
|
||||
router4.patch("foo", '/foo', middleware3, routeHandler1);
|
||||
router4.delete('/foo', middleware1, routeHandler2);
|
||||
router4.head('/foo', middleware2, routeHandler3);
|
||||
|
||||
router4.post('/foo', emptyMiddleware, emptyMiddleware, routeHandler4);
|
||||
router4.post('/foo', emptyMiddleware, emptyMiddleware, emptyMiddleware, routeHandler4);
|
||||
router4.get('name', '/foo', emptyMiddleware, emptyMiddleware, routeHandler4);
|
||||
router4.get('name', '/foo', emptyMiddleware, emptyMiddleware, emptyMiddleware, routeHandler4);
|
||||
Vendored
+69
-14
@@ -1,25 +1,80 @@
|
||||
// Type definitions for koa-sslify 2.1
|
||||
// Type definitions for koa-sslify 4.0
|
||||
// Project: https://github.com/turboMaCk/koa-sslify#readme
|
||||
// Definitions by: Matthew Bull <https://github.com/wingsbob>
|
||||
// Mihkel Sokk <https://github.com/msokk>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
import * as koa from 'koa';
|
||||
import * as koa from "koa";
|
||||
|
||||
declare namespace sslify {
|
||||
interface Options {
|
||||
trustProtoHeader?: boolean;
|
||||
trustAzureHeader?: boolean;
|
||||
port?: number;
|
||||
hostname?: string;
|
||||
ignoreUrl?: boolean;
|
||||
temporary?: boolean;
|
||||
redirectMethods?: string[];
|
||||
internalRedirectMethods?: string[];
|
||||
specCompliantDisallow?: boolean;
|
||||
}
|
||||
interface Options {
|
||||
/**
|
||||
* Function used to test if request is secure
|
||||
*/
|
||||
resolver?: (ctx: koa.Context) => boolean;
|
||||
/**
|
||||
* Hostname for redirect (uses request host if not set)
|
||||
*/
|
||||
hostname?: string;
|
||||
/**
|
||||
* Port of HTTPS server
|
||||
*/
|
||||
port?: number;
|
||||
/**
|
||||
* Avoid :443 port in redirect url
|
||||
*/
|
||||
skipDefaultPort?: boolean;
|
||||
/**
|
||||
* Ignore url path (redirect to domain)
|
||||
*/
|
||||
ignoreUrl?: boolean;
|
||||
/**
|
||||
* Temporary mode (use 307 Temporary Redirect)
|
||||
*/
|
||||
temporary?: boolean;
|
||||
/**
|
||||
* Whitelist methods that should be redirected
|
||||
*/
|
||||
redirectMethods?: string[];
|
||||
/**
|
||||
* Status returned for disallowed methods
|
||||
*/
|
||||
disallowStatus?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Default HTTPS resolver
|
||||
* This works when using node.js TLS support
|
||||
*/
|
||||
function httpsResolver(ctx: koa.Context): boolean;
|
||||
|
||||
/**
|
||||
* x-forwarded-proto header resolver
|
||||
* common for heroku gcp (ingress) etc
|
||||
*/
|
||||
function xForwardedProtoResolver(ctx: koa.Context): boolean;
|
||||
|
||||
/**
|
||||
* Azure resolver
|
||||
* Azure is using `x-att-ssl` header
|
||||
*/
|
||||
function azureResolver(ctx: koa.Context): boolean;
|
||||
|
||||
/**
|
||||
* Custom proto header factory
|
||||
*/
|
||||
function customProtoHeaderResolver(
|
||||
header: string
|
||||
): (ctx: koa.Context) => boolean;
|
||||
|
||||
/**
|
||||
* Resolver for `Forwarded` header
|
||||
* see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Forwarded
|
||||
*/
|
||||
function forwardedResolver(ctx: koa.Context): boolean;
|
||||
}
|
||||
|
||||
declare function sslify(options: sslify.Options): koa.Middleware;
|
||||
declare function sslify(options?: sslify.Options): koa.Middleware;
|
||||
|
||||
export = sslify;
|
||||
|
||||
@@ -1,40 +1,50 @@
|
||||
import Koa = require('koa');
|
||||
import sslify = require('koa-sslify');
|
||||
|
||||
new Koa().use(sslify());
|
||||
|
||||
new Koa().use(sslify({}));
|
||||
|
||||
new Koa().use(sslify({
|
||||
trustAzureHeader: true,
|
||||
resolver: sslify.xForwardedProtoResolver,
|
||||
}));
|
||||
|
||||
new Koa().use(sslify({
|
||||
trustProtoHeader: true,
|
||||
resolver: sslify.azureResolver,
|
||||
}));
|
||||
|
||||
new Koa().use(sslify({
|
||||
specCompliantDisallow: true,
|
||||
resolver: sslify.customProtoHeaderResolver('x-protocol'),
|
||||
}));
|
||||
|
||||
new Koa().use(sslify({
|
||||
port: 1234,
|
||||
resolver: sslify.forwardedResolver,
|
||||
}));
|
||||
|
||||
new Koa().use(sslify({
|
||||
hostname: 'my-host',
|
||||
disallowStatus: 405,
|
||||
}));
|
||||
|
||||
new Koa().use(sslify({
|
||||
temporary: false,
|
||||
port: 1234,
|
||||
}));
|
||||
|
||||
new Koa().use(sslify({
|
||||
internalRedirectMethods: ['GET'],
|
||||
hostname: 'my-host',
|
||||
}));
|
||||
|
||||
new Koa().use(sslify({
|
||||
redirectMethods: ['GET'],
|
||||
temporary: false,
|
||||
}));
|
||||
|
||||
new Koa().use(sslify({
|
||||
ignoreUrl: true,
|
||||
redirectMethods: ['GET'],
|
||||
}));
|
||||
|
||||
new Koa().use(sslify({
|
||||
skipDefaultPort: false,
|
||||
}));
|
||||
|
||||
new Koa().use(sslify({
|
||||
ignoreUrl: true,
|
||||
}));
|
||||
|
||||
@@ -1,23 +1,16 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"lib": ["es6"],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"typeRoots": ["../"],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"koa-sslify-tests.ts"
|
||||
]
|
||||
}
|
||||
"files": ["index.d.ts", "koa-sslify-tests.ts"]
|
||||
}
|
||||
|
||||
+2
-2
@@ -1774,7 +1774,7 @@ declare namespace MangoPay {
|
||||
/**
|
||||
* This is the URL where to redirect users to proceed to 3D secure validation
|
||||
*/
|
||||
SecureModeRedirectUrl: string;
|
||||
SecureModeRedirectURL: string;
|
||||
|
||||
/**
|
||||
* This is the URL where users are automatically redirected after 3D secure validation (if activated)
|
||||
@@ -2596,7 +2596,7 @@ declare namespace MangoPay {
|
||||
/**
|
||||
* This is the URL where to redirect users to proceed to 3D secure validation
|
||||
*/
|
||||
SecureModeRedirectUrl: string;
|
||||
SecureModeRedirectURL: string;
|
||||
}
|
||||
|
||||
interface CreateCardDirectPayIn {
|
||||
|
||||
@@ -4227,7 +4227,7 @@ function wrapState(ComposedComponent: ComponentClass<__MaterialUI.List.Selectabl
|
||||
};
|
||||
}
|
||||
|
||||
const SelectableList = wrapState(makeSelectable(List));
|
||||
const SelectableList = wrapState(makeSelectable<{}>(List));
|
||||
|
||||
const ListExampleSelectable = () => (
|
||||
<Paper>
|
||||
|
||||
+1
@@ -65,6 +65,7 @@ declare module "meteor/universe:i18n" {
|
||||
|
||||
// events
|
||||
function onChangeLocale(callback: (locale: string) => void): void;
|
||||
function offChangeLocale(callback: (locale: string) => void): void;
|
||||
}
|
||||
|
||||
interface ReactComponentProps {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// Type definitions for mongoose-paginate-v2 1.0
|
||||
// Project: https://github.com/aravindnc/mongoose-paginate-v2
|
||||
// Project: https://github.com/webgangster/mongoose-paginate-v2
|
||||
// Definitions by: Linus Brolin <https://github.com/linusbrolin>
|
||||
// simonxca <https://github.com/simonxca>
|
||||
// woutgg <https://github.com/woutgg>
|
||||
|
||||
Vendored
+14
@@ -18,6 +18,7 @@
|
||||
// Emmanuel Gautier <https://github.com/emmanuelgautier>
|
||||
// Frontend Monster <https://github.com/frontendmonster>
|
||||
// Ming Chen <https://github.com/mingchen>
|
||||
// Olga Isakova <https://github.com/penumbra1>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@@ -1060,12 +1061,25 @@ declare module "mongoose" {
|
||||
validateBeforeSave?: boolean;
|
||||
/** defaults to "__v" */
|
||||
versionKey?: string | boolean;
|
||||
/**
|
||||
* By default, Mongoose will automatically
|
||||
* select() any populated paths.
|
||||
* To opt out, set selectPopulatedPaths to false.
|
||||
*/
|
||||
selectPopulatedPaths?: boolean;
|
||||
/**
|
||||
* skipVersioning allows excluding paths from
|
||||
* versioning (the internal revision will not be
|
||||
* incremented even if these paths are updated).
|
||||
*/
|
||||
skipVersioning?: any;
|
||||
/**
|
||||
* Validation errors in a single nested schema are reported
|
||||
* both on the child and on the parent schema.
|
||||
* Set storeSubdocValidationError to false on the child schema
|
||||
* to make Mongoose only report the parent error.
|
||||
*/
|
||||
storeSubdocValidationError?: boolean;
|
||||
/**
|
||||
* If set timestamps, mongoose assigns createdAt
|
||||
* and updatedAt fields to your schema, the type
|
||||
|
||||
Vendored
+4
-4
@@ -105,7 +105,7 @@ export interface MUIDataTableColumnOptions {
|
||||
hint?: string;
|
||||
customHeadRender?: (columnMeta: MUIDataTableCustomHeadRenderer, updateDirection: (params: any) => any) => string;
|
||||
customBodyRender?: (value: any, tableMeta: MUIDataTableMeta, updateValue: (s: any, c: any, p: any) => any) => string | React.ReactNode;
|
||||
setCellProps?: (cellValue: string, rowIndex: number, columnIndex: number) => string;
|
||||
setCellProps?: (cellValue: string, rowIndex: number, columnIndex: number) => object;
|
||||
}
|
||||
|
||||
export interface MUIDataTableOptions {
|
||||
@@ -117,7 +117,7 @@ export interface MUIDataTableOptions {
|
||||
textLabels?: MUIDataTableTextLabels;
|
||||
pagination?: boolean;
|
||||
selectableRows?: boolean;
|
||||
IsRowSelectable?: (dataIndex: any) => boolean;
|
||||
IsRowSelectable?: (dataIndex: number) => boolean;
|
||||
resizableColumns?: boolean;
|
||||
expandableRows?: boolean;
|
||||
renderExpandableRow?: (rowData: string[], rowMeta: { dataIndex: number; rowIndex: number }) => React.ReactNode;
|
||||
@@ -143,7 +143,7 @@ export interface MUIDataTableOptions {
|
||||
onRowsSelect?: (currentRowsSelected: any[], rowsSelected: any[]) => void;
|
||||
onRowsDelete?: (rowsDeleted: any[]) => void;
|
||||
onRowClick?: (rowData: string[], rowMeta: { dataIndex: number; rowIndex: number }) => void;
|
||||
onCellClick?: (colIndex: number, rowIndex: number) => void;
|
||||
onCellClick?: (colData: any, cellMeta: { colIndex: number, rowIndex: number, dataIndex: number }) => void;
|
||||
onChangePage?: (currentPage: number) => void;
|
||||
onChangeRowsPerPage?: (numberOfRows: number) => void;
|
||||
onSearchChange?: (searchText: string) => void;
|
||||
@@ -151,7 +151,7 @@ export interface MUIDataTableOptions {
|
||||
onColumnSortChange?: (changedColumn: string, direction: string) => void;
|
||||
onColumnViewChange?: (changedColumn: string, action: string) => void;
|
||||
onTableChange?: (action: string, tableState: object) => void;
|
||||
setRowProps?: (row: any[], rowIndex: number) => any;
|
||||
setRowProps?: (row: any[], rowIndex: number) => object;
|
||||
}
|
||||
|
||||
export type MUIDataTableColumnDef = string | MUIDataTableColumn;
|
||||
|
||||
@@ -311,7 +311,7 @@ var scope = nock('http://www.google.com')
|
||||
/// Access original request and headers
|
||||
var scope = nock('http://www.google.com')
|
||||
.get('/cat-poems')
|
||||
.reply((uri, requestBody) => {
|
||||
.reply(function (uri, requestBody) {
|
||||
console.log('path:', this.req.path);
|
||||
console.log('headers:', this.req.headers);
|
||||
// ...
|
||||
|
||||
Vendored
+2
-2
@@ -16,8 +16,8 @@ declare class GetText {
|
||||
gettext(msgid: string): string;
|
||||
ngettext(msgid: string, msgidPlural: string, count: number): string;
|
||||
npgettext(msgctxt: string, msgid: string, msgidPlural: string, count: number): string;
|
||||
off(eventName: string, callback: (params: any) => void): string;
|
||||
on(eventName: string, callback: (params: any) => void): void;
|
||||
off(eventName: 'error', callback: (error: string) => void): void;
|
||||
on(eventName: 'error', callback: (error: string) => void): void;
|
||||
pgettext(msgctxt: string, msgid: string): string;
|
||||
setLocale(locale: string): void;
|
||||
setTextDomain(domain: string): void;
|
||||
|
||||
Vendored
+2
-2
@@ -10,7 +10,7 @@
|
||||
* @param options options is for xlsx
|
||||
* @returns worksheets data, like: { name: 'worksheets', data: [[1,2,3],['1', '2','word']] }
|
||||
*/
|
||||
export declare function parse(
|
||||
export function parse(
|
||||
mixed: string | ArrayBuffer,
|
||||
options?: {}
|
||||
): Array<{
|
||||
@@ -24,7 +24,7 @@ export declare function parse(
|
||||
* @param options spannig multiple rows A1:A4
|
||||
* @returns returns a buffer of worksheets
|
||||
*/
|
||||
export declare function build(
|
||||
export function build(
|
||||
worksheets: Array<{ name: string; data: any[][] }>,
|
||||
options?: {}
|
||||
): ArrayBuffer;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user