Merge branch 'master' into ember-ts-3.4-workarounds

This commit is contained in:
Nathan Shively-Sanders
2019-02-28 07:22:30 -08:00
110 changed files with 1480 additions and 1044 deletions
+12
View File
@@ -1146,6 +1146,12 @@
"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",
@@ -1800,6 +1806,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",
+5
View File
@@ -512,5 +512,10 @@ declare module 'angular' {
}
type IStickyService = (scope: IScope, element: JQuery, elementClone?: JQuery) => void;
interface IInteractionService {
getLastInteractionType(): string|null;
isUserInvoked(checkDelay?: number): boolean;
}
}
}
@@ -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
View File
@@ -1,4 +1,4 @@
// Type definitions for assets-webpack-plugin 3.5
// Type definitions for assets-webpack-plugin 3.9
// Project: https://github.com/ztoben/assets-webpack-plugin
// Definitions by: Michael Strobel <https://github.com/kryops>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -16,18 +16,36 @@ declare namespace AssetsWebpackPlugin {
type ProcessOutputFn = (assets: Assets) => string;
interface Options {
/**
* If the "entrypoints" option is given, the output will be limited to the entrypoints and the chunks associated with them.
* false by default
*/
entrypoints?: boolean;
/**
* Name for the created json file.
* "webpack-assets.json" by default
*/
filename?: string;
/**
* When set and "includeAllFileTypes" is set false, only assets matching these types will be included in the assets file.
* ['js', 'css'] by default
*/
fileTypes?: string[];
/**
* If false the output will not include the full path of the generated file.
* true by default
*/
fullPath?: boolean;
/**
* When set false, falls back to the "fileTypes" option array to decide which file types to include in the assets file.
* true by default
*/
includeAllFileTypes?: boolean;
/**
* Inserts the manifest javascript as a text property in your assets.
* Accepts the name of your manifest chunk.
@@ -38,6 +56,19 @@ declare namespace AssetsWebpackPlugin {
*/
includeManifest?: boolean;
/**
* When set the assets file will only be generated in memory while running webpack-dev-server and not written to disk.
* false by default
*/
keepInMemory?: boolean;
/**
* Orders the assets output so that manifest is the first entry.
* This is useful for cases where script tags are generated from the assets json output, and order of import is important.
* false by default
*/
manifestFirst?: boolean;
/**
* Inject metadata into the output file. All values will be injected into the key "metadata"
*/
@@ -66,6 +97,12 @@ declare namespace AssetsWebpackPlugin {
* false by default
*/
update?: boolean;
/**
* Will override the path to use the compiler output path set in your webpack config.
* false by default
*/
useCompilerPath?: boolean;
}
}
+6
View File
@@ -53,6 +53,12 @@ traverse(ast, {
}
});
// Node type checks
t.isIdentifier(t.identifier("id"));
t.isIdentifier(exp);
t.isIdentifier(null);
t.isIdentifier(undefined);
// TypeScript Types
// TODO: Test all variants of these functions' signatures
+464 -464
View File
@@ -1514,246 +1514,246 @@ export function TSUndefinedKeyword(): TSUndefinedKeyword;
export function TSUnionType(types: TSType[]): TSUnionType;
export function TSVoidKeyword(): TSVoidKeyword;
export function isArrayExpression(node: object, opts?: object): node is ArrayExpression;
export function isAssignmentExpression(node: object, opts?: object): node is AssignmentExpression;
export function isBinaryExpression(node: object, opts?: object): node is BinaryExpression;
export function isDirective(node: object, opts?: object): node is Directive;
export function isDirectiveLiteral(node: object, opts?: object): node is DirectiveLiteral;
export function isBlockStatement(node: object, opts?: object): node is BlockStatement;
export function isBreakStatement(node: object, opts?: object): node is BreakStatement;
export function isCallExpression(node: object, opts?: object): node is CallExpression;
export function isCatchClause(node: object, opts?: object): node is CatchClause;
export function isConditionalExpression(node: object, opts?: object): node is ConditionalExpression;
export function isContinueStatement(node: object, opts?: object): node is ContinueStatement;
export function isDebuggerStatement(node: object, opts?: object): node is DebuggerStatement;
export function isDoWhileStatement(node: object, opts?: object): node is DoWhileStatement;
export function isEmptyStatement(node: object, opts?: object): node is EmptyStatement;
export function isExpressionStatement(node: object, opts?: object): node is ExpressionStatement;
export function isFile(node: object, opts?: object): node is File;
export function isForInStatement(node: object, opts?: object): node is ForInStatement;
export function isForStatement(node: object, opts?: object): node is ForStatement;
export function isFunctionDeclaration(node: object, opts?: object): node is FunctionDeclaration;
export function isFunctionExpression(node: object, opts?: object): node is FunctionExpression;
export function isIdentifier(node: object, opts?: object): node is Identifier;
export function isIfStatement(node: object, opts?: object): node is IfStatement;
export function isLabeledStatement(node: object, opts?: object): node is LabeledStatement;
export function isStringLiteral(node: object, opts?: object): node is StringLiteral;
export function isNumericLiteral(node: object, opts?: object): node is NumericLiteral;
export function isNullLiteral(node: object, opts?: object): node is NullLiteral;
export function isBooleanLiteral(node: object, opts?: object): node is BooleanLiteral;
export function isRegExpLiteral(node: object, opts?: object): node is RegExpLiteral;
export function isLogicalExpression(node: object, opts?: object): node is LogicalExpression;
export function isMemberExpression(node: object, opts?: object): node is MemberExpression;
export function isNewExpression(node: object, opts?: object): node is NewExpression;
export function isProgram(node: object, opts?: object): node is Program;
export function isObjectExpression(node: object, opts?: object): node is ObjectExpression;
export function isObjectMethod(node: object, opts?: object): node is ObjectMethod;
export function isObjectProperty(node: object, opts?: object): node is ObjectProperty;
export function isRestElement(node: object, opts?: object): node is RestElement;
export function isReturnStatement(node: object, opts?: object): node is ReturnStatement;
export function isSequenceExpression(node: object, opts?: object): node is SequenceExpression;
export function isSwitchCase(node: object, opts?: object): node is SwitchCase;
export function isSwitchStatement(node: object, opts?: object): node is SwitchStatement;
export function isThisExpression(node: object, opts?: object): node is ThisExpression;
export function isThrowStatement(node: object, opts?: object): node is ThrowStatement;
export function isTryStatement(node: object, opts?: object): node is TryStatement;
export function isUnaryExpression(node: object, opts?: object): node is UnaryExpression;
export function isUpdateExpression(node: object, opts?: object): node is UpdateExpression;
export function isVariableDeclaration(node: object, opts?: object): node is VariableDeclaration;
export function isVariableDeclarator(node: object, opts?: object): node is VariableDeclarator;
export function isWhileStatement(node: object, opts?: object): node is WhileStatement;
export function isWithStatement(node: object, opts?: object): node is WithStatement;
export function isAssignmentPattern(node: object, opts?: object): node is AssignmentPattern;
export function isArrayPattern(node: object, opts?: object): node is ArrayPattern;
export function isArrowFunctionExpression(node: object, opts?: object): node is ArrowFunctionExpression;
export function isClassBody(node: object, opts?: object): node is ClassBody;
export function isClassDeclaration(node: object, opts?: object): node is ClassDeclaration;
export function isClassExpression(node: object, opts?: object): node is ClassExpression;
export function isExportAllDeclaration(node: object, opts?: object): node is ExportAllDeclaration;
export function isExportDefaultDeclaration(node: object, opts?: object): node is ExportDefaultDeclaration;
export function isExportNamedDeclaration(node: object, opts?: object): node is ExportNamedDeclaration;
export function isExportSpecifier(node: object, opts?: object): node is ExportSpecifier;
export function isForOfStatement(node: object, opts?: object): node is ForOfStatement;
export function isImportDeclaration(node: object, opts?: object): node is ImportDeclaration;
export function isImportDefaultSpecifier(node: object, opts?: object): node is ImportDefaultSpecifier;
export function isImportNamespaceSpecifier(node: object, opts?: object): node is ImportNamespaceSpecifier;
export function isImportSpecifier(node: object, opts?: object): node is ImportSpecifier;
export function isMetaProperty(node: object, opts?: object): node is MetaProperty;
export function isClassMethod(node: object, opts?: object): node is ClassMethod;
export function isObjectPattern(node: object, opts?: object): node is ObjectPattern;
export function isSpreadElement(node: object, opts?: object): node is SpreadElement;
export function isSuper(node: object, opts?: object): node is Super;
export function isTaggedTemplateExpression(node: object, opts?: object): node is TaggedTemplateExpression;
export function isTemplateElement(node: object, opts?: object): node is TemplateElement;
export function isTemplateLiteral(node: object, opts?: object): node is TemplateLiteral;
export function isYieldExpression(node: object, opts?: object): node is YieldExpression;
export function isAnyTypeAnnotation(node: object, opts?: object): node is AnyTypeAnnotation;
export function isArrayTypeAnnotation(node: object, opts?: object): node is ArrayTypeAnnotation;
export function isBooleanTypeAnnotation(node: object, opts?: object): node is BooleanTypeAnnotation;
export function isBooleanLiteralTypeAnnotation(node: object, opts?: object): node is BooleanLiteralTypeAnnotation;
export function isNullLiteralTypeAnnotation(node: object, opts?: object): node is NullLiteralTypeAnnotation;
export function isClassImplements(node: object, opts?: object): node is ClassImplements;
export function isClassProperty(node: object, opts?: object): node is ClassProperty;
export function isDeclareClass(node: object, opts?: object): node is DeclareClass;
export function isDeclareFunction(node: object, opts?: object): node is DeclareFunction;
export function isDeclareInterface(node: object, opts?: object): node is DeclareInterface;
export function isDeclareModule(node: object, opts?: object): node is DeclareModule;
export function isDeclareTypeAlias(node: object, opts?: object): node is DeclareTypeAlias;
export function isDeclareVariable(node: object, opts?: object): node is DeclareVariable;
export function isExistentialTypeParam(node: object, opts?: object): node is ExistentialTypeParam;
export function isFunctionTypeAnnotation(node: object, opts?: object): node is FunctionTypeAnnotation;
export function isFunctionTypeParam(node: object, opts?: object): node is FunctionTypeParam;
export function isGenericTypeAnnotation(node: object, opts?: object): node is GenericTypeAnnotation;
export function isInterfaceExtends(node: object, opts?: object): node is InterfaceExtends;
export function isInterfaceDeclaration(node: object, opts?: object): node is InterfaceDeclaration;
export function isIntersectionTypeAnnotation(node: object, opts?: object): node is IntersectionTypeAnnotation;
export function isMixedTypeAnnotation(node: object, opts?: object): node is MixedTypeAnnotation;
export function isNullableTypeAnnotation(node: object, opts?: object): node is NullableTypeAnnotation;
export function isNumericLiteralTypeAnnotation(node: object, opts?: object): node is NumericLiteralTypeAnnotation;
export function isNumberTypeAnnotation(node: object, opts?: object): node is NumberTypeAnnotation;
export function isStringLiteralTypeAnnotation(node: object, opts?: object): node is StringLiteralTypeAnnotation;
export function isStringTypeAnnotation(node: object, opts?: object): node is StringTypeAnnotation;
export function isThisTypeAnnotation(node: object, opts?: object): node is ThisTypeAnnotation;
export function isTupleTypeAnnotation(node: object, opts?: object): node is TupleTypeAnnotation;
export function isTypeofTypeAnnotation(node: object, opts?: object): node is TypeofTypeAnnotation;
export function isTypeAlias(node: object, opts?: object): node is TypeAlias;
export function isTypeAnnotation(node: object, opts?: object): node is TypeAnnotation;
export function isTypeCastExpression(node: object, opts?: object): node is TypeCastExpression;
export function isTypeParameter(node: object, opts?: object): node is TypeParameter;
export function isTypeParameterDeclaration(node: object, opts?: object): node is TypeParameterDeclaration;
export function isTypeParameterInstantiation(node: object, opts?: object): node is TypeParameterInstantiation;
export function isObjectTypeAnnotation(node: object, opts?: object): node is ObjectTypeAnnotation;
export function isObjectTypeCallProperty(node: object, opts?: object): node is ObjectTypeCallProperty;
export function isObjectTypeIndexer(node: object, opts?: object): node is ObjectTypeIndexer;
export function isObjectTypeProperty(node: object, opts?: object): node is ObjectTypeProperty;
export function isQualifiedTypeIdentifier(node: object, opts?: object): node is QualifiedTypeIdentifier;
export function isUnionTypeAnnotation(node: object, opts?: object): node is UnionTypeAnnotation;
export function isVoidTypeAnnotation(node: object, opts?: object): node is VoidTypeAnnotation;
export function isJSXAttribute(node: object, opts?: object): node is JSXAttribute;
export function isJSXClosingElement(node: object, opts?: object): node is JSXClosingElement;
export function isJSXElement(node: object, opts?: object): node is JSXElement;
export function isJSXEmptyExpression(node: object, opts?: object): node is JSXEmptyExpression;
export function isJSXExpressionContainer(node: object, opts?: object): node is JSXExpressionContainer;
export function isJSXIdentifier(node: object, opts?: object): node is JSXIdentifier;
export function isJSXMemberExpression(node: object, opts?: object): node is JSXMemberExpression;
export function isJSXNamespacedName(node: object, opts?: object): node is JSXNamespacedName;
export function isJSXOpeningElement(node: object, opts?: object): node is JSXOpeningElement;
export function isJSXSpreadAttribute(node: object, opts?: object): node is JSXSpreadAttribute;
export function isJSXText(node: object, opts?: object): node is JSXText;
export function isNoop(node: object, opts?: object): node is Noop;
export function isParenthesizedExpression(node: object, opts?: object): node is ParenthesizedExpression;
export function isAwaitExpression(node: object, opts?: object): node is AwaitExpression;
export function isBindExpression(node: object, opts?: object): node is BindExpression;
export function isDecorator(node: object, opts?: object): node is Decorator;
export function isDoExpression(node: object, opts?: object): node is DoExpression;
export function isExportDefaultSpecifier(node: object, opts?: object): node is ExportDefaultSpecifier;
export function isExportNamespaceSpecifier(node: object, opts?: object): node is ExportNamespaceSpecifier;
export function isRestProperty(node: object, opts?: object): node is RestProperty;
export function isSpreadProperty(node: object, opts?: object): node is SpreadProperty;
export function isExpression(node: object, opts?: object): node is Expression;
export function isBinary(node: object, opts?: object): node is Binary;
export function isScopable(node: object, opts?: object): node is Scopable;
export function isBlockParent(node: object, opts?: object): node is BlockParent;
export function isBlock(node: object, opts?: object): node is Block;
export function isStatement(node: object, opts?: object): node is Statement;
export function isTerminatorless(node: object, opts?: object): node is Terminatorless;
export function isCompletionStatement(node: object, opts?: object): node is CompletionStatement;
export function isConditional(node: object, opts?: object): node is Conditional;
export function isLoop(node: object, opts?: object): node is Loop;
export function isWhile(node: object, opts?: object): node is While;
export function isExpressionWrapper(node: object, opts?: object): node is ExpressionWrapper;
export function isFor(node: object, opts?: object): node is For;
export function isForXStatement(node: object, opts?: object): node is ForXStatement;
export function isArrayExpression(node: object | null | undefined, opts?: object): node is ArrayExpression;
export function isAssignmentExpression(node: object | null | undefined, opts?: object): node is AssignmentExpression;
export function isBinaryExpression(node: object | null | undefined, opts?: object): node is BinaryExpression;
export function isDirective(node: object | null | undefined, opts?: object): node is Directive;
export function isDirectiveLiteral(node: object | null | undefined, opts?: object): node is DirectiveLiteral;
export function isBlockStatement(node: object | null | undefined, opts?: object): node is BlockStatement;
export function isBreakStatement(node: object | null | undefined, opts?: object): node is BreakStatement;
export function isCallExpression(node: object | null | undefined, opts?: object): node is CallExpression;
export function isCatchClause(node: object | null | undefined, opts?: object): node is CatchClause;
export function isConditionalExpression(node: object | null | undefined, opts?: object): node is ConditionalExpression;
export function isContinueStatement(node: object | null | undefined, opts?: object): node is ContinueStatement;
export function isDebuggerStatement(node: object | null | undefined, opts?: object): node is DebuggerStatement;
export function isDoWhileStatement(node: object | null | undefined, opts?: object): node is DoWhileStatement;
export function isEmptyStatement(node: object | null | undefined, opts?: object): node is EmptyStatement;
export function isExpressionStatement(node: object | null | undefined, opts?: object): node is ExpressionStatement;
export function isFile(node: object | null | undefined, opts?: object): node is File;
export function isForInStatement(node: object | null | undefined, opts?: object): node is ForInStatement;
export function isForStatement(node: object | null | undefined, opts?: object): node is ForStatement;
export function isFunctionDeclaration(node: object | null | undefined, opts?: object): node is FunctionDeclaration;
export function isFunctionExpression(node: object | null | undefined, opts?: object): node is FunctionExpression;
export function isIdentifier(node: object | null | undefined, opts?: object): node is Identifier;
export function isIfStatement(node: object | null | undefined, opts?: object): node is IfStatement;
export function isLabeledStatement(node: object | null | undefined, opts?: object): node is LabeledStatement;
export function isStringLiteral(node: object | null | undefined, opts?: object): node is StringLiteral;
export function isNumericLiteral(node: object | null | undefined, opts?: object): node is NumericLiteral;
export function isNullLiteral(node: object | null | undefined, opts?: object): node is NullLiteral;
export function isBooleanLiteral(node: object | null | undefined, opts?: object): node is BooleanLiteral;
export function isRegExpLiteral(node: object | null | undefined, opts?: object): node is RegExpLiteral;
export function isLogicalExpression(node: object | null | undefined, opts?: object): node is LogicalExpression;
export function isMemberExpression(node: object | null | undefined, opts?: object): node is MemberExpression;
export function isNewExpression(node: object | null | undefined, opts?: object): node is NewExpression;
export function isProgram(node: object | null | undefined, opts?: object): node is Program;
export function isObjectExpression(node: object | null | undefined, opts?: object): node is ObjectExpression;
export function isObjectMethod(node: object | null | undefined, opts?: object): node is ObjectMethod;
export function isObjectProperty(node: object | null | undefined, opts?: object): node is ObjectProperty;
export function isRestElement(node: object | null | undefined, opts?: object): node is RestElement;
export function isReturnStatement(node: object | null | undefined, opts?: object): node is ReturnStatement;
export function isSequenceExpression(node: object | null | undefined, opts?: object): node is SequenceExpression;
export function isSwitchCase(node: object | null | undefined, opts?: object): node is SwitchCase;
export function isSwitchStatement(node: object | null | undefined, opts?: object): node is SwitchStatement;
export function isThisExpression(node: object | null | undefined, opts?: object): node is ThisExpression;
export function isThrowStatement(node: object | null | undefined, opts?: object): node is ThrowStatement;
export function isTryStatement(node: object | null | undefined, opts?: object): node is TryStatement;
export function isUnaryExpression(node: object | null | undefined, opts?: object): node is UnaryExpression;
export function isUpdateExpression(node: object | null | undefined, opts?: object): node is UpdateExpression;
export function isVariableDeclaration(node: object | null | undefined, opts?: object): node is VariableDeclaration;
export function isVariableDeclarator(node: object | null | undefined, opts?: object): node is VariableDeclarator;
export function isWhileStatement(node: object | null | undefined, opts?: object): node is WhileStatement;
export function isWithStatement(node: object | null | undefined, opts?: object): node is WithStatement;
export function isAssignmentPattern(node: object | null | undefined, opts?: object): node is AssignmentPattern;
export function isArrayPattern(node: object | null | undefined, opts?: object): node is ArrayPattern;
export function isArrowFunctionExpression(node: object | null | undefined, opts?: object): node is ArrowFunctionExpression;
export function isClassBody(node: object | null | undefined, opts?: object): node is ClassBody;
export function isClassDeclaration(node: object | null | undefined, opts?: object): node is ClassDeclaration;
export function isClassExpression(node: object | null | undefined, opts?: object): node is ClassExpression;
export function isExportAllDeclaration(node: object | null | undefined, opts?: object): node is ExportAllDeclaration;
export function isExportDefaultDeclaration(node: object | null | undefined, opts?: object): node is ExportDefaultDeclaration;
export function isExportNamedDeclaration(node: object | null | undefined, opts?: object): node is ExportNamedDeclaration;
export function isExportSpecifier(node: object | null | undefined, opts?: object): node is ExportSpecifier;
export function isForOfStatement(node: object | null | undefined, opts?: object): node is ForOfStatement;
export function isImportDeclaration(node: object | null | undefined, opts?: object): node is ImportDeclaration;
export function isImportDefaultSpecifier(node: object | null | undefined, opts?: object): node is ImportDefaultSpecifier;
export function isImportNamespaceSpecifier(node: object | null | undefined, opts?: object): node is ImportNamespaceSpecifier;
export function isImportSpecifier(node: object | null | undefined, opts?: object): node is ImportSpecifier;
export function isMetaProperty(node: object | null | undefined, opts?: object): node is MetaProperty;
export function isClassMethod(node: object | null | undefined, opts?: object): node is ClassMethod;
export function isObjectPattern(node: object | null | undefined, opts?: object): node is ObjectPattern;
export function isSpreadElement(node: object | null | undefined, opts?: object): node is SpreadElement;
export function isSuper(node: object | null | undefined, opts?: object): node is Super;
export function isTaggedTemplateExpression(node: object | null | undefined, opts?: object): node is TaggedTemplateExpression;
export function isTemplateElement(node: object | null | undefined, opts?: object): node is TemplateElement;
export function isTemplateLiteral(node: object | null | undefined, opts?: object): node is TemplateLiteral;
export function isYieldExpression(node: object | null | undefined, opts?: object): node is YieldExpression;
export function isAnyTypeAnnotation(node: object | null | undefined, opts?: object): node is AnyTypeAnnotation;
export function isArrayTypeAnnotation(node: object | null | undefined, opts?: object): node is ArrayTypeAnnotation;
export function isBooleanTypeAnnotation(node: object | null | undefined, opts?: object): node is BooleanTypeAnnotation;
export function isBooleanLiteralTypeAnnotation(node: object | null | undefined, opts?: object): node is BooleanLiteralTypeAnnotation;
export function isNullLiteralTypeAnnotation(node: object | null | undefined, opts?: object): node is NullLiteralTypeAnnotation;
export function isClassImplements(node: object | null | undefined, opts?: object): node is ClassImplements;
export function isClassProperty(node: object | null | undefined, opts?: object): node is ClassProperty;
export function isDeclareClass(node: object | null | undefined, opts?: object): node is DeclareClass;
export function isDeclareFunction(node: object | null | undefined, opts?: object): node is DeclareFunction;
export function isDeclareInterface(node: object | null | undefined, opts?: object): node is DeclareInterface;
export function isDeclareModule(node: object | null | undefined, opts?: object): node is DeclareModule;
export function isDeclareTypeAlias(node: object | null | undefined, opts?: object): node is DeclareTypeAlias;
export function isDeclareVariable(node: object | null | undefined, opts?: object): node is DeclareVariable;
export function isExistentialTypeParam(node: object | null | undefined, opts?: object): node is ExistentialTypeParam;
export function isFunctionTypeAnnotation(node: object | null | undefined, opts?: object): node is FunctionTypeAnnotation;
export function isFunctionTypeParam(node: object | null | undefined, opts?: object): node is FunctionTypeParam;
export function isGenericTypeAnnotation(node: object | null | undefined, opts?: object): node is GenericTypeAnnotation;
export function isInterfaceExtends(node: object | null | undefined, opts?: object): node is InterfaceExtends;
export function isInterfaceDeclaration(node: object | null | undefined, opts?: object): node is InterfaceDeclaration;
export function isIntersectionTypeAnnotation(node: object | null | undefined, opts?: object): node is IntersectionTypeAnnotation;
export function isMixedTypeAnnotation(node: object | null | undefined, opts?: object): node is MixedTypeAnnotation;
export function isNullableTypeAnnotation(node: object | null | undefined, opts?: object): node is NullableTypeAnnotation;
export function isNumericLiteralTypeAnnotation(node: object | null | undefined, opts?: object): node is NumericLiteralTypeAnnotation;
export function isNumberTypeAnnotation(node: object | null | undefined, opts?: object): node is NumberTypeAnnotation;
export function isStringLiteralTypeAnnotation(node: object | null | undefined, opts?: object): node is StringLiteralTypeAnnotation;
export function isStringTypeAnnotation(node: object | null | undefined, opts?: object): node is StringTypeAnnotation;
export function isThisTypeAnnotation(node: object | null | undefined, opts?: object): node is ThisTypeAnnotation;
export function isTupleTypeAnnotation(node: object | null | undefined, opts?: object): node is TupleTypeAnnotation;
export function isTypeofTypeAnnotation(node: object | null | undefined, opts?: object): node is TypeofTypeAnnotation;
export function isTypeAlias(node: object | null | undefined, opts?: object): node is TypeAlias;
export function isTypeAnnotation(node: object | null | undefined, opts?: object): node is TypeAnnotation;
export function isTypeCastExpression(node: object | null | undefined, opts?: object): node is TypeCastExpression;
export function isTypeParameter(node: object | null | undefined, opts?: object): node is TypeParameter;
export function isTypeParameterDeclaration(node: object | null | undefined, opts?: object): node is TypeParameterDeclaration;
export function isTypeParameterInstantiation(node: object | null | undefined, opts?: object): node is TypeParameterInstantiation;
export function isObjectTypeAnnotation(node: object | null | undefined, opts?: object): node is ObjectTypeAnnotation;
export function isObjectTypeCallProperty(node: object | null | undefined, opts?: object): node is ObjectTypeCallProperty;
export function isObjectTypeIndexer(node: object | null | undefined, opts?: object): node is ObjectTypeIndexer;
export function isObjectTypeProperty(node: object | null | undefined, opts?: object): node is ObjectTypeProperty;
export function isQualifiedTypeIdentifier(node: object | null | undefined, opts?: object): node is QualifiedTypeIdentifier;
export function isUnionTypeAnnotation(node: object | null | undefined, opts?: object): node is UnionTypeAnnotation;
export function isVoidTypeAnnotation(node: object | null | undefined, opts?: object): node is VoidTypeAnnotation;
export function isJSXAttribute(node: object | null | undefined, opts?: object): node is JSXAttribute;
export function isJSXClosingElement(node: object | null | undefined, opts?: object): node is JSXClosingElement;
export function isJSXElement(node: object | null | undefined, opts?: object): node is JSXElement;
export function isJSXEmptyExpression(node: object | null | undefined, opts?: object): node is JSXEmptyExpression;
export function isJSXExpressionContainer(node: object | null | undefined, opts?: object): node is JSXExpressionContainer;
export function isJSXIdentifier(node: object | null | undefined, opts?: object): node is JSXIdentifier;
export function isJSXMemberExpression(node: object | null | undefined, opts?: object): node is JSXMemberExpression;
export function isJSXNamespacedName(node: object | null | undefined, opts?: object): node is JSXNamespacedName;
export function isJSXOpeningElement(node: object | null | undefined, opts?: object): node is JSXOpeningElement;
export function isJSXSpreadAttribute(node: object | null | undefined, opts?: object): node is JSXSpreadAttribute;
export function isJSXText(node: object | null | undefined, opts?: object): node is JSXText;
export function isNoop(node: object | null | undefined, opts?: object): node is Noop;
export function isParenthesizedExpression(node: object | null | undefined, opts?: object): node is ParenthesizedExpression;
export function isAwaitExpression(node: object | null | undefined, opts?: object): node is AwaitExpression;
export function isBindExpression(node: object | null | undefined, opts?: object): node is BindExpression;
export function isDecorator(node: object | null | undefined, opts?: object): node is Decorator;
export function isDoExpression(node: object | null | undefined, opts?: object): node is DoExpression;
export function isExportDefaultSpecifier(node: object | null | undefined, opts?: object): node is ExportDefaultSpecifier;
export function isExportNamespaceSpecifier(node: object | null | undefined, opts?: object): node is ExportNamespaceSpecifier;
export function isRestProperty(node: object | null | undefined, opts?: object): node is RestProperty;
export function isSpreadProperty(node: object | null | undefined, opts?: object): node is SpreadProperty;
export function isExpression(node: object | null | undefined, opts?: object): node is Expression;
export function isBinary(node: object | null | undefined, opts?: object): node is Binary;
export function isScopable(node: object | null | undefined, opts?: object): node is Scopable;
export function isBlockParent(node: object | null | undefined, opts?: object): node is BlockParent;
export function isBlock(node: object | null | undefined, opts?: object): node is Block;
export function isStatement(node: object | null | undefined, opts?: object): node is Statement;
export function isTerminatorless(node: object | null | undefined, opts?: object): node is Terminatorless;
export function isCompletionStatement(node: object | null | undefined, opts?: object): node is CompletionStatement;
export function isConditional(node: object | null | undefined, opts?: object): node is Conditional;
export function isLoop(node: object | null | undefined, opts?: object): node is Loop;
export function isWhile(node: object | null | undefined, opts?: object): node is While;
export function isExpressionWrapper(node: object | null | undefined, opts?: object): node is ExpressionWrapper;
export function isFor(node: object | null | undefined, opts?: object): node is For;
export function isForXStatement(node: object | null | undefined, opts?: object): node is ForXStatement;
// tslint:disable-next-line ban-types
export function isFunction(node: object, opts?: object): node is Function;
export function isFunctionParent(node: object, opts?: object): node is FunctionParent;
export function isPureish(node: object, opts?: object): node is Pureish;
export function isDeclaration(node: object, opts?: object): node is Declaration;
export function isLVal(node: object, opts?: object): node is LVal;
export function isLiteral(node: object, opts?: object): node is Literal;
export function isImmutable(node: object, opts?: object): node is Immutable;
export function isUserWhitespacable(node: object, opts?: object): node is UserWhitespacable;
export function isMethod(node: object, opts?: object): node is Method;
export function isObjectMember(node: object, opts?: object): node is ObjectMember;
export function isProperty(node: object, opts?: object): node is Property;
export function isUnaryLike(node: object, opts?: object): node is UnaryLike;
export function isPattern(node: object, opts?: object): node is Pattern;
export function isClass(node: object, opts?: object): node is Class;
export function isModuleDeclaration(node: object, opts?: object): node is ModuleDeclaration;
export function isExportDeclaration(node: object, opts?: object): node is ExportDeclaration;
export function isModuleSpecifier(node: object, opts?: object): node is ModuleSpecifier;
export function isFlow(node: object, opts?: object): node is Flow;
export function isFlowBaseAnnotation(node: object, opts?: object): node is FlowBaseAnnotation;
export function isFlowDeclaration(node: object, opts?: object): node is FlowDeclaration;
export function isJSX(node: object, opts?: object): node is JSX;
export function isNumberLiteral(node: object, opts?: object): node is NumericLiteral;
export function isRegexLiteral(node: object, opts?: object): node is RegExpLiteral;
export function isFunction(node: object | null | undefined, opts?: object): node is Function;
export function isFunctionParent(node: object | null | undefined, opts?: object): node is FunctionParent;
export function isPureish(node: object | null | undefined, opts?: object): node is Pureish;
export function isDeclaration(node: object | null | undefined, opts?: object): node is Declaration;
export function isLVal(node: object | null | undefined, opts?: object): node is LVal;
export function isLiteral(node: object | null | undefined, opts?: object): node is Literal;
export function isImmutable(node: object | null | undefined, opts?: object): node is Immutable;
export function isUserWhitespacable(node: object | null | undefined, opts?: object): node is UserWhitespacable;
export function isMethod(node: object | null | undefined, opts?: object): node is Method;
export function isObjectMember(node: object | null | undefined, opts?: object): node is ObjectMember;
export function isProperty(node: object | null | undefined, opts?: object): node is Property;
export function isUnaryLike(node: object | null | undefined, opts?: object): node is UnaryLike;
export function isPattern(node: object | null | undefined, opts?: object): node is Pattern;
export function isClass(node: object | null | undefined, opts?: object): node is Class;
export function isModuleDeclaration(node: object | null | undefined, opts?: object): node is ModuleDeclaration;
export function isExportDeclaration(node: object | null | undefined, opts?: object): node is ExportDeclaration;
export function isModuleSpecifier(node: object | null | undefined, opts?: object): node is ModuleSpecifier;
export function isFlow(node: object | null | undefined, opts?: object): node is Flow;
export function isFlowBaseAnnotation(node: object | null | undefined, opts?: object): node is FlowBaseAnnotation;
export function isFlowDeclaration(node: object | null | undefined, opts?: object): node is FlowDeclaration;
export function isJSX(node: object | null | undefined, opts?: object): node is JSX;
export function isNumberLiteral(node: object | null | undefined, opts?: object): node is NumericLiteral;
export function isRegexLiteral(node: object | null | undefined, opts?: object): node is RegExpLiteral;
export function isReferencedIdentifier(node: object, opts?: object): node is Identifier | JSXIdentifier;
export function isReferencedMemberExpression(node: object, opts?: object): node is MemberExpression;
export function isBindingIdentifier(node: object, opts?: object): node is Identifier;
export function isScope(node: object, opts?: object): node is Scopable;
export function isReferenced(node: object, opts?: object): boolean;
export function isBlockScoped(node: object, opts?: object): node is FunctionDeclaration | ClassDeclaration | VariableDeclaration;
export function isVar(node: object, opts?: object): node is VariableDeclaration;
export function isUser(node: object, opts?: object): boolean;
export function isGenerated(node: object, opts?: object): boolean;
export function isPure(node: object, opts?: object): boolean;
export function isReferencedIdentifier(node: object | null | undefined, opts?: object): node is Identifier | JSXIdentifier;
export function isReferencedMemberExpression(node: object | null | undefined, opts?: object): node is MemberExpression;
export function isBindingIdentifier(node: object | null | undefined, opts?: object): node is Identifier;
export function isScope(node: object | null | undefined, opts?: object): node is Scopable;
export function isReferenced(node: object | null | undefined, opts?: object): boolean;
export function isBlockScoped(node: object | null | undefined, opts?: object): node is FunctionDeclaration | ClassDeclaration | VariableDeclaration;
export function isVar(node: object | null | undefined, opts?: object): node is VariableDeclaration;
export function isUser(node: object | null | undefined, opts?: object): boolean;
export function isGenerated(node: object | null | undefined, opts?: object): boolean;
export function isPure(node: object | null | undefined, opts?: object): boolean;
export function isTSAnyKeyword(node: object, opts?: object): node is TSAnyKeyword;
export function isTSArrayType(node: object, opts?: object): node is TSArrayType;
export function isTSAsExpression(node: object, opts?: object): node is TSAsExpression;
export function isTSBooleanKeyword(node: object, opts?: object): node is TSBooleanKeyword;
export function isTSCallSignatureDeclaration(node: object, opts?: object): node is TSCallSignatureDeclaration;
export function isTSConstructSignatureDeclaration(node: object, opts?: object): node is TSTypeElement;
export function isTSConstructorType(node: object, opts?: object): node is TSConstructorType;
export function isTSDeclareFunction(node: object, opts?: object): node is TSDeclareFunction;
export function isTSDeclareMethod(node: object, opts?: object): node is TSDeclareMethod;
export function isTSEnumDeclaration(node: object, opts?: object): node is TSEnumDeclaration;
export function isTSEnumMember(node: object, opts?: object): node is TSEnumMember;
export function isTSExportAssignment(node: object, opts?: object): node is TSExportAssignment;
export function isTSExpressionWithTypeArguments(node: object, opts?: object): node is TSExpressionWithTypeArguments;
export function isTSExternalModuleReference(node: object, opts?: object): node is TSExternalModuleReference;
export function isTSFunctionType(node: object, opts?: object): node is TSFunctionType;
export function isTSImportEqualsDeclaration(node: object, opts?: object): node is TSImportEqualsDeclaration;
export function isTSIndexSignature(node: object, opts?: object): node is TSIndexSignature;
export function isTSIndexedAccessType(node: object, opts?: object): node is TSIndexedAccessType;
export function isTSInterfaceBody(node: object, opts?: object): node is TSInterfaceBody;
export function isTSInterfaceDeclaration(node: object, opts?: object): node is TSInterfaceDeclaration;
export function isTSIntersectionType(node: object, opts?: object): node is TSIntersectionType;
export function isTSLiteralType(node: object, opts?: object): node is TSLiteralType;
export function isTSMappedType(node: object, opts?: object): node is TSMappedType;
export function isTSMethodSignature(node: object, opts?: object): node is TSMethodSignature;
export function isTSModuleBlock(node: object, opts?: object): node is TSModuleBlock;
export function isTSModuleDeclaration(node: object, opts?: object): node is TSModuleDeclaration;
export function isTSNamespaceExportDeclaration(node: object, opts?: object): node is TSNamespaceExportDeclaration;
export function isTSNeverKeyword(node: object, opts?: object): node is TSNeverKeyword;
export function isTSNonNullExpression(node: object, opts?: object): node is TSNonNullExpression;
export function isTSNullKeyword(node: object, opts?: object): node is TSNullKeyword;
export function isTSNumberKeyword(node: object, opts?: object): node is TSNumberKeyword;
export function isTSObjectKeyword(node: object, opts?: object): node is TSObjectKeyword;
export function isTSParameterProperty(node: object, opts?: object): node is TSParameterProperty;
export function isTSParenthesizedType(node: object, opts?: object): node is TSParenthesizedType;
export function isTSPropertySignature(node: object, opts?: object): node is TSPropertySignature;
export function isTSQualifiedName(node: object, opts?: object): node is TSQualifiedName;
export function isTSStringKeyword(node: object, opts?: object): node is TSStringKeyword;
export function isTSSymbolKeyword(node: object, opts?: object): node is TSSymbolKeyword;
export function isTSThisType(node: object, opts?: object): node is TSThisType;
export function isTSTupleType(node: object, opts?: object): node is TSTupleType;
export function isTSTypeAliasDeclaration(node: object, opts?: object): node is TSTypeAliasDeclaration;
export function isTSTypeAnnotation(node: object, opts?: object): node is TSTypeAnnotation;
export function isTSTypeAssertion(node: object, opts?: object): node is TSTypeAssertion;
export function isTSTypeLiteral(node: object, opts?: object): node is TSTypeLiteral;
export function isTSTypeOperator(node: object, opts?: object): node is TSTypeOperator;
export function isTSTypeParameter(node: object, opts?: object): node is TSTypeParameter;
export function isTSTypeParameterDeclaration(node: object, opts?: object): node is TSTypeParameterDeclaration;
export function isTSTypeParameterInstantiation(node: object, opts?: object): node is TSTypeParameterInstantiation;
export function isTSTypePredicate(node: object, opts?: object): node is TSTypePredicate;
export function isTSTypeQuery(node: object, opts?: object): node is TSTypeQuery;
export function isTSTypeReference(node: object, opts?: object): node is TSTypeReference;
export function isTSUndefinedKeyword(node: object, opts?: object): node is TSUndefinedKeyword;
export function isTSUnionType(node: object, opts?: object): node is TSUnionType;
export function isTSVoidKeyword(node: object, opts?: object): node is TSVoidKeyword;
export function isTSAnyKeyword(node: object | null | undefined, opts?: object): node is TSAnyKeyword;
export function isTSArrayType(node: object | null | undefined, opts?: object): node is TSArrayType;
export function isTSAsExpression(node: object | null | undefined, opts?: object): node is TSAsExpression;
export function isTSBooleanKeyword(node: object | null | undefined, opts?: object): node is TSBooleanKeyword;
export function isTSCallSignatureDeclaration(node: object | null | undefined, opts?: object): node is TSCallSignatureDeclaration;
export function isTSConstructSignatureDeclaration(node: object | null | undefined, opts?: object): node is TSTypeElement;
export function isTSConstructorType(node: object | null | undefined, opts?: object): node is TSConstructorType;
export function isTSDeclareFunction(node: object | null | undefined, opts?: object): node is TSDeclareFunction;
export function isTSDeclareMethod(node: object | null | undefined, opts?: object): node is TSDeclareMethod;
export function isTSEnumDeclaration(node: object | null | undefined, opts?: object): node is TSEnumDeclaration;
export function isTSEnumMember(node: object | null | undefined, opts?: object): node is TSEnumMember;
export function isTSExportAssignment(node: object | null | undefined, opts?: object): node is TSExportAssignment;
export function isTSExpressionWithTypeArguments(node: object | null | undefined, opts?: object): node is TSExpressionWithTypeArguments;
export function isTSExternalModuleReference(node: object | null | undefined, opts?: object): node is TSExternalModuleReference;
export function isTSFunctionType(node: object | null | undefined, opts?: object): node is TSFunctionType;
export function isTSImportEqualsDeclaration(node: object | null | undefined, opts?: object): node is TSImportEqualsDeclaration;
export function isTSIndexSignature(node: object | null | undefined, opts?: object): node is TSIndexSignature;
export function isTSIndexedAccessType(node: object | null | undefined, opts?: object): node is TSIndexedAccessType;
export function isTSInterfaceBody(node: object | null | undefined, opts?: object): node is TSInterfaceBody;
export function isTSInterfaceDeclaration(node: object | null | undefined, opts?: object): node is TSInterfaceDeclaration;
export function isTSIntersectionType(node: object | null | undefined, opts?: object): node is TSIntersectionType;
export function isTSLiteralType(node: object | null | undefined, opts?: object): node is TSLiteralType;
export function isTSMappedType(node: object | null | undefined, opts?: object): node is TSMappedType;
export function isTSMethodSignature(node: object | null | undefined, opts?: object): node is TSMethodSignature;
export function isTSModuleBlock(node: object | null | undefined, opts?: object): node is TSModuleBlock;
export function isTSModuleDeclaration(node: object | null | undefined, opts?: object): node is TSModuleDeclaration;
export function isTSNamespaceExportDeclaration(node: object | null | undefined, opts?: object): node is TSNamespaceExportDeclaration;
export function isTSNeverKeyword(node: object | null | undefined, opts?: object): node is TSNeverKeyword;
export function isTSNonNullExpression(node: object | null | undefined, opts?: object): node is TSNonNullExpression;
export function isTSNullKeyword(node: object | null | undefined, opts?: object): node is TSNullKeyword;
export function isTSNumberKeyword(node: object | null | undefined, opts?: object): node is TSNumberKeyword;
export function isTSObjectKeyword(node: object | null | undefined, opts?: object): node is TSObjectKeyword;
export function isTSParameterProperty(node: object | null | undefined, opts?: object): node is TSParameterProperty;
export function isTSParenthesizedType(node: object | null | undefined, opts?: object): node is TSParenthesizedType;
export function isTSPropertySignature(node: object | null | undefined, opts?: object): node is TSPropertySignature;
export function isTSQualifiedName(node: object | null | undefined, opts?: object): node is TSQualifiedName;
export function isTSStringKeyword(node: object | null | undefined, opts?: object): node is TSStringKeyword;
export function isTSSymbolKeyword(node: object | null | undefined, opts?: object): node is TSSymbolKeyword;
export function isTSThisType(node: object | null | undefined, opts?: object): node is TSThisType;
export function isTSTupleType(node: object | null | undefined, opts?: object): node is TSTupleType;
export function isTSTypeAliasDeclaration(node: object | null | undefined, opts?: object): node is TSTypeAliasDeclaration;
export function isTSTypeAnnotation(node: object | null | undefined, opts?: object): node is TSTypeAnnotation;
export function isTSTypeAssertion(node: object | null | undefined, opts?: object): node is TSTypeAssertion;
export function isTSTypeLiteral(node: object | null | undefined, opts?: object): node is TSTypeLiteral;
export function isTSTypeOperator(node: object | null | undefined, opts?: object): node is TSTypeOperator;
export function isTSTypeParameter(node: object | null | undefined, opts?: object): node is TSTypeParameter;
export function isTSTypeParameterDeclaration(node: object | null | undefined, opts?: object): node is TSTypeParameterDeclaration;
export function isTSTypeParameterInstantiation(node: object | null | undefined, opts?: object): node is TSTypeParameterInstantiation;
export function isTSTypePredicate(node: object | null | undefined, opts?: object): node is TSTypePredicate;
export function isTSTypeQuery(node: object | null | undefined, opts?: object): node is TSTypeQuery;
export function isTSTypeReference(node: object | null | undefined, opts?: object): node is TSTypeReference;
export function isTSUndefinedKeyword(node: object | null | undefined, opts?: object): node is TSUndefinedKeyword;
export function isTSUnionType(node: object | null | undefined, opts?: object): node is TSUnionType;
export function isTSVoidKeyword(node: object | null | undefined, opts?: object): node is TSVoidKeyword;
// React specific
export interface ReactHelpers {
@@ -1762,231 +1762,231 @@ export interface ReactHelpers {
}
export const react: ReactHelpers;
export function assertArrayExpression(node: object, opts?: object): void;
export function assertAssignmentExpression(node: object, opts?: object): void;
export function assertBinaryExpression(node: object, opts?: object): void;
export function assertDirective(node: object, opts?: object): void;
export function assertDirectiveLiteral(node: object, opts?: object): void;
export function assertBlockStatement(node: object, opts?: object): void;
export function assertBreakStatement(node: object, opts?: object): void;
export function assertCallExpression(node: object, opts?: object): void;
export function assertCatchClause(node: object, opts?: object): void;
export function assertConditionalExpression(node: object, opts?: object): void;
export function assertContinueStatement(node: object, opts?: object): void;
export function assertDebuggerStatement(node: object, opts?: object): void;
export function assertDoWhileStatement(node: object, opts?: object): void;
export function assertEmptyStatement(node: object, opts?: object): void;
export function assertExpressionStatement(node: object, opts?: object): void;
export function assertFile(node: object, opts?: object): void;
export function assertForInStatement(node: object, opts?: object): void;
export function assertForStatement(node: object, opts?: object): void;
export function assertFunctionDeclaration(node: object, opts?: object): void;
export function assertFunctionExpression(node: object, opts?: object): void;
export function assertIdentifier(node: object, opts?: object): void;
export function assertIfStatement(node: object, opts?: object): void;
export function assertLabeledStatement(node: object, opts?: object): void;
export function assertStringLiteral(node: object, opts?: object): void;
export function assertNumericLiteral(node: object, opts?: object): void;
export function assertNullLiteral(node: object, opts?: object): void;
export function assertBooleanLiteral(node: object, opts?: object): void;
export function assertRegExpLiteral(node: object, opts?: object): void;
export function assertLogicalExpression(node: object, opts?: object): void;
export function assertMemberExpression(node: object, opts?: object): void;
export function assertNewExpression(node: object, opts?: object): void;
export function assertProgram(node: object, opts?: object): void;
export function assertObjectExpression(node: object, opts?: object): void;
export function assertObjectMethod(node: object, opts?: object): void;
export function assertObjectProperty(node: object, opts?: object): void;
export function assertRestElement(node: object, opts?: object): void;
export function assertReturnStatement(node: object, opts?: object): void;
export function assertSequenceExpression(node: object, opts?: object): void;
export function assertSwitchCase(node: object, opts?: object): void;
export function assertSwitchStatement(node: object, opts?: object): void;
export function assertThisExpression(node: object, opts?: object): void;
export function assertThrowStatement(node: object, opts?: object): void;
export function assertTryStatement(node: object, opts?: object): void;
export function assertUnaryExpression(node: object, opts?: object): void;
export function assertUpdateExpression(node: object, opts?: object): void;
export function assertVariableDeclaration(node: object, opts?: object): void;
export function assertVariableDeclarator(node: object, opts?: object): void;
export function assertWhileStatement(node: object, opts?: object): void;
export function assertWithStatement(node: object, opts?: object): void;
export function assertAssignmentPattern(node: object, opts?: object): void;
export function assertArrayPattern(node: object, opts?: object): void;
export function assertArrowFunctionExpression(node: object, opts?: object): void;
export function assertClassBody(node: object, opts?: object): void;
export function assertClassDeclaration(node: object, opts?: object): void;
export function assertClassExpression(node: object, opts?: object): void;
export function assertExportAllDeclaration(node: object, opts?: object): void;
export function assertExportDefaultDeclaration(node: object, opts?: object): void;
export function assertExportNamedDeclaration(node: object, opts?: object): void;
export function assertExportSpecifier(node: object, opts?: object): void;
export function assertForOfStatement(node: object, opts?: object): void;
export function assertImportDeclaration(node: object, opts?: object): void;
export function assertImportDefaultSpecifier(node: object, opts?: object): void;
export function assertImportNamespaceSpecifier(node: object, opts?: object): void;
export function assertImportSpecifier(node: object, opts?: object): void;
export function assertMetaProperty(node: object, opts?: object): void;
export function assertClassMethod(node: object, opts?: object): void;
export function assertObjectPattern(node: object, opts?: object): void;
export function assertSpreadElement(node: object, opts?: object): void;
export function assertSuper(node: object, opts?: object): void;
export function assertTaggedTemplateExpression(node: object, opts?: object): void;
export function assertTemplateElement(node: object, opts?: object): void;
export function assertTemplateLiteral(node: object, opts?: object): void;
export function assertYieldExpression(node: object, opts?: object): void;
export function assertAnyTypeAnnotation(node: object, opts?: object): void;
export function assertArrayTypeAnnotation(node: object, opts?: object): void;
export function assertBooleanTypeAnnotation(node: object, opts?: object): void;
export function assertBooleanLiteralTypeAnnotation(node: object, opts?: object): void;
export function assertNullLiteralTypeAnnotation(node: object, opts?: object): void;
export function assertClassImplements(node: object, opts?: object): void;
export function assertClassProperty(node: object, opts?: object): void;
export function assertDeclareClass(node: object, opts?: object): void;
export function assertDeclareFunction(node: object, opts?: object): void;
export function assertDeclareInterface(node: object, opts?: object): void;
export function assertDeclareModule(node: object, opts?: object): void;
export function assertDeclareTypeAlias(node: object, opts?: object): void;
export function assertDeclareVariable(node: object, opts?: object): void;
export function assertExistentialTypeParam(node: object, opts?: object): void;
export function assertFunctionTypeAnnotation(node: object, opts?: object): void;
export function assertFunctionTypeParam(node: object, opts?: object): void;
export function assertGenericTypeAnnotation(node: object, opts?: object): void;
export function assertInterfaceExtends(node: object, opts?: object): void;
export function assertInterfaceDeclaration(node: object, opts?: object): void;
export function assertIntersectionTypeAnnotation(node: object, opts?: object): void;
export function assertMixedTypeAnnotation(node: object, opts?: object): void;
export function assertNullableTypeAnnotation(node: object, opts?: object): void;
export function assertNumericLiteralTypeAnnotation(node: object, opts?: object): void;
export function assertNumberTypeAnnotation(node: object, opts?: object): void;
export function assertStringLiteralTypeAnnotation(node: object, opts?: object): void;
export function assertStringTypeAnnotation(node: object, opts?: object): void;
export function assertThisTypeAnnotation(node: object, opts?: object): void;
export function assertTupleTypeAnnotation(node: object, opts?: object): void;
export function assertTypeofTypeAnnotation(node: object, opts?: object): void;
export function assertTypeAlias(node: object, opts?: object): void;
export function assertTypeAnnotation(node: object, opts?: object): void;
export function assertTypeCastExpression(node: object, opts?: object): void;
export function assertTypeParameter(node: object, opts?: object): void;
export function assertTypeParameterDeclaration(node: object, opts?: object): void;
export function assertTypeParameterInstantiation(node: object, opts?: object): void;
export function assertObjectTypeAnnotation(node: object, opts?: object): void;
export function assertObjectTypeCallProperty(node: object, opts?: object): void;
export function assertObjectTypeIndexer(node: object, opts?: object): void;
export function assertObjectTypeProperty(node: object, opts?: object): void;
export function assertQualifiedTypeIdentifier(node: object, opts?: object): void;
export function assertUnionTypeAnnotation(node: object, opts?: object): void;
export function assertVoidTypeAnnotation(node: object, opts?: object): void;
export function assertJSXAttribute(node: object, opts?: object): void;
export function assertJSXClosingElement(node: object, opts?: object): void;
export function assertJSXElement(node: object, opts?: object): void;
export function assertJSXEmptyExpression(node: object, opts?: object): void;
export function assertJSXExpressionContainer(node: object, opts?: object): void;
export function assertJSXIdentifier(node: object, opts?: object): void;
export function assertJSXMemberExpression(node: object, opts?: object): void;
export function assertJSXNamespacedName(node: object, opts?: object): void;
export function assertJSXOpeningElement(node: object, opts?: object): void;
export function assertJSXSpreadAttribute(node: object, opts?: object): void;
export function assertJSXText(node: object, opts?: object): void;
export function assertNoop(node: object, opts?: object): void;
export function assertParenthesizedExpression(node: object, opts?: object): void;
export function assertAwaitExpression(node: object, opts?: object): void;
export function assertBindExpression(node: object, opts?: object): void;
export function assertDecorator(node: object, opts?: object): void;
export function assertDoExpression(node: object, opts?: object): void;
export function assertExportDefaultSpecifier(node: object, opts?: object): void;
export function assertExportNamespaceSpecifier(node: object, opts?: object): void;
export function assertRestProperty(node: object, opts?: object): void;
export function assertSpreadProperty(node: object, opts?: object): void;
export function assertExpression(node: object, opts?: object): void;
export function assertBinary(node: object, opts?: object): void;
export function assertScopable(node: object, opts?: object): void;
export function assertBlockParent(node: object, opts?: object): void;
export function assertBlock(node: object, opts?: object): void;
export function assertStatement(node: object, opts?: object): void;
export function assertTerminatorless(node: object, opts?: object): void;
export function assertCompletionStatement(node: object, opts?: object): void;
export function assertConditional(node: object, opts?: object): void;
export function assertLoop(node: object, opts?: object): void;
export function assertWhile(node: object, opts?: object): void;
export function assertExpressionWrapper(node: object, opts?: object): void;
export function assertFor(node: object, opts?: object): void;
export function assertForXStatement(node: object, opts?: object): void;
export function assertFunction(node: object, opts?: object): void;
export function assertFunctionParent(node: object, opts?: object): void;
export function assertPureish(node: object, opts?: object): void;
export function assertDeclaration(node: object, opts?: object): void;
export function assertLVal(node: object, opts?: object): void;
export function assertLiteral(node: object, opts?: object): void;
export function assertImmutable(node: object, opts?: object): void;
export function assertUserWhitespacable(node: object, opts?: object): void;
export function assertMethod(node: object, opts?: object): void;
export function assertObjectMember(node: object, opts?: object): void;
export function assertProperty(node: object, opts?: object): void;
export function assertUnaryLike(node: object, opts?: object): void;
export function assertPattern(node: object, opts?: object): void;
export function assertClass(node: object, opts?: object): void;
export function assertModuleDeclaration(node: object, opts?: object): void;
export function assertExportDeclaration(node: object, opts?: object): void;
export function assertModuleSpecifier(node: object, opts?: object): void;
export function assertFlow(node: object, opts?: object): void;
export function assertFlowBaseAnnotation(node: object, opts?: object): void;
export function assertFlowDeclaration(node: object, opts?: object): void;
export function assertJSX(node: object, opts?: object): void;
export function assertNumberLiteral(node: object, opts?: object): void;
export function assertRegexLiteral(node: object, opts?: object): void;
export function assertArrayExpression(node: object | null | undefined, opts?: object): void;
export function assertAssignmentExpression(node: object | null | undefined, opts?: object): void;
export function assertBinaryExpression(node: object | null | undefined, opts?: object): void;
export function assertDirective(node: object | null | undefined, opts?: object): void;
export function assertDirectiveLiteral(node: object | null | undefined, opts?: object): void;
export function assertBlockStatement(node: object | null | undefined, opts?: object): void;
export function assertBreakStatement(node: object | null | undefined, opts?: object): void;
export function assertCallExpression(node: object | null | undefined, opts?: object): void;
export function assertCatchClause(node: object | null | undefined, opts?: object): void;
export function assertConditionalExpression(node: object | null | undefined, opts?: object): void;
export function assertContinueStatement(node: object | null | undefined, opts?: object): void;
export function assertDebuggerStatement(node: object | null | undefined, opts?: object): void;
export function assertDoWhileStatement(node: object | null | undefined, opts?: object): void;
export function assertEmptyStatement(node: object | null | undefined, opts?: object): void;
export function assertExpressionStatement(node: object | null | undefined, opts?: object): void;
export function assertFile(node: object | null | undefined, opts?: object): void;
export function assertForInStatement(node: object | null | undefined, opts?: object): void;
export function assertForStatement(node: object | null | undefined, opts?: object): void;
export function assertFunctionDeclaration(node: object | null | undefined, opts?: object): void;
export function assertFunctionExpression(node: object | null | undefined, opts?: object): void;
export function assertIdentifier(node: object | null | undefined, opts?: object): void;
export function assertIfStatement(node: object | null | undefined, opts?: object): void;
export function assertLabeledStatement(node: object | null | undefined, opts?: object): void;
export function assertStringLiteral(node: object | null | undefined, opts?: object): void;
export function assertNumericLiteral(node: object | null | undefined, opts?: object): void;
export function assertNullLiteral(node: object | null | undefined, opts?: object): void;
export function assertBooleanLiteral(node: object | null | undefined, opts?: object): void;
export function assertRegExpLiteral(node: object | null | undefined, opts?: object): void;
export function assertLogicalExpression(node: object | null | undefined, opts?: object): void;
export function assertMemberExpression(node: object | null | undefined, opts?: object): void;
export function assertNewExpression(node: object | null | undefined, opts?: object): void;
export function assertProgram(node: object | null | undefined, opts?: object): void;
export function assertObjectExpression(node: object | null | undefined, opts?: object): void;
export function assertObjectMethod(node: object | null | undefined, opts?: object): void;
export function assertObjectProperty(node: object | null | undefined, opts?: object): void;
export function assertRestElement(node: object | null | undefined, opts?: object): void;
export function assertReturnStatement(node: object | null | undefined, opts?: object): void;
export function assertSequenceExpression(node: object | null | undefined, opts?: object): void;
export function assertSwitchCase(node: object | null | undefined, opts?: object): void;
export function assertSwitchStatement(node: object | null | undefined, opts?: object): void;
export function assertThisExpression(node: object | null | undefined, opts?: object): void;
export function assertThrowStatement(node: object | null | undefined, opts?: object): void;
export function assertTryStatement(node: object | null | undefined, opts?: object): void;
export function assertUnaryExpression(node: object | null | undefined, opts?: object): void;
export function assertUpdateExpression(node: object | null | undefined, opts?: object): void;
export function assertVariableDeclaration(node: object | null | undefined, opts?: object): void;
export function assertVariableDeclarator(node: object | null | undefined, opts?: object): void;
export function assertWhileStatement(node: object | null | undefined, opts?: object): void;
export function assertWithStatement(node: object | null | undefined, opts?: object): void;
export function assertAssignmentPattern(node: object | null | undefined, opts?: object): void;
export function assertArrayPattern(node: object | null | undefined, opts?: object): void;
export function assertArrowFunctionExpression(node: object | null | undefined, opts?: object): void;
export function assertClassBody(node: object | null | undefined, opts?: object): void;
export function assertClassDeclaration(node: object | null | undefined, opts?: object): void;
export function assertClassExpression(node: object | null | undefined, opts?: object): void;
export function assertExportAllDeclaration(node: object | null | undefined, opts?: object): void;
export function assertExportDefaultDeclaration(node: object | null | undefined, opts?: object): void;
export function assertExportNamedDeclaration(node: object | null | undefined, opts?: object): void;
export function assertExportSpecifier(node: object | null | undefined, opts?: object): void;
export function assertForOfStatement(node: object | null | undefined, opts?: object): void;
export function assertImportDeclaration(node: object | null | undefined, opts?: object): void;
export function assertImportDefaultSpecifier(node: object | null | undefined, opts?: object): void;
export function assertImportNamespaceSpecifier(node: object | null | undefined, opts?: object): void;
export function assertImportSpecifier(node: object | null | undefined, opts?: object): void;
export function assertMetaProperty(node: object | null | undefined, opts?: object): void;
export function assertClassMethod(node: object | null | undefined, opts?: object): void;
export function assertObjectPattern(node: object | null | undefined, opts?: object): void;
export function assertSpreadElement(node: object | null | undefined, opts?: object): void;
export function assertSuper(node: object | null | undefined, opts?: object): void;
export function assertTaggedTemplateExpression(node: object | null | undefined, opts?: object): void;
export function assertTemplateElement(node: object | null | undefined, opts?: object): void;
export function assertTemplateLiteral(node: object | null | undefined, opts?: object): void;
export function assertYieldExpression(node: object | null | undefined, opts?: object): void;
export function assertAnyTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertArrayTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertBooleanTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertBooleanLiteralTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertNullLiteralTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertClassImplements(node: object | null | undefined, opts?: object): void;
export function assertClassProperty(node: object | null | undefined, opts?: object): void;
export function assertDeclareClass(node: object | null | undefined, opts?: object): void;
export function assertDeclareFunction(node: object | null | undefined, opts?: object): void;
export function assertDeclareInterface(node: object | null | undefined, opts?: object): void;
export function assertDeclareModule(node: object | null | undefined, opts?: object): void;
export function assertDeclareTypeAlias(node: object | null | undefined, opts?: object): void;
export function assertDeclareVariable(node: object | null | undefined, opts?: object): void;
export function assertExistentialTypeParam(node: object | null | undefined, opts?: object): void;
export function assertFunctionTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertFunctionTypeParam(node: object | null | undefined, opts?: object): void;
export function assertGenericTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertInterfaceExtends(node: object | null | undefined, opts?: object): void;
export function assertInterfaceDeclaration(node: object | null | undefined, opts?: object): void;
export function assertIntersectionTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertMixedTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertNullableTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertNumericLiteralTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertNumberTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertStringLiteralTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertStringTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertThisTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertTupleTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertTypeofTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertTypeAlias(node: object | null | undefined, opts?: object): void;
export function assertTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertTypeCastExpression(node: object | null | undefined, opts?: object): void;
export function assertTypeParameter(node: object | null | undefined, opts?: object): void;
export function assertTypeParameterDeclaration(node: object | null | undefined, opts?: object): void;
export function assertTypeParameterInstantiation(node: object | null | undefined, opts?: object): void;
export function assertObjectTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertObjectTypeCallProperty(node: object | null | undefined, opts?: object): void;
export function assertObjectTypeIndexer(node: object | null | undefined, opts?: object): void;
export function assertObjectTypeProperty(node: object | null | undefined, opts?: object): void;
export function assertQualifiedTypeIdentifier(node: object | null | undefined, opts?: object): void;
export function assertUnionTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertVoidTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertJSXAttribute(node: object | null | undefined, opts?: object): void;
export function assertJSXClosingElement(node: object | null | undefined, opts?: object): void;
export function assertJSXElement(node: object | null | undefined, opts?: object): void;
export function assertJSXEmptyExpression(node: object | null | undefined, opts?: object): void;
export function assertJSXExpressionContainer(node: object | null | undefined, opts?: object): void;
export function assertJSXIdentifier(node: object | null | undefined, opts?: object): void;
export function assertJSXMemberExpression(node: object | null | undefined, opts?: object): void;
export function assertJSXNamespacedName(node: object | null | undefined, opts?: object): void;
export function assertJSXOpeningElement(node: object | null | undefined, opts?: object): void;
export function assertJSXSpreadAttribute(node: object | null | undefined, opts?: object): void;
export function assertJSXText(node: object | null | undefined, opts?: object): void;
export function assertNoop(node: object | null | undefined, opts?: object): void;
export function assertParenthesizedExpression(node: object | null | undefined, opts?: object): void;
export function assertAwaitExpression(node: object | null | undefined, opts?: object): void;
export function assertBindExpression(node: object | null | undefined, opts?: object): void;
export function assertDecorator(node: object | null | undefined, opts?: object): void;
export function assertDoExpression(node: object | null | undefined, opts?: object): void;
export function assertExportDefaultSpecifier(node: object | null | undefined, opts?: object): void;
export function assertExportNamespaceSpecifier(node: object | null | undefined, opts?: object): void;
export function assertRestProperty(node: object | null | undefined, opts?: object): void;
export function assertSpreadProperty(node: object | null | undefined, opts?: object): void;
export function assertExpression(node: object | null | undefined, opts?: object): void;
export function assertBinary(node: object | null | undefined, opts?: object): void;
export function assertScopable(node: object | null | undefined, opts?: object): void;
export function assertBlockParent(node: object | null | undefined, opts?: object): void;
export function assertBlock(node: object | null | undefined, opts?: object): void;
export function assertStatement(node: object | null | undefined, opts?: object): void;
export function assertTerminatorless(node: object | null | undefined, opts?: object): void;
export function assertCompletionStatement(node: object | null | undefined, opts?: object): void;
export function assertConditional(node: object | null | undefined, opts?: object): void;
export function assertLoop(node: object | null | undefined, opts?: object): void;
export function assertWhile(node: object | null | undefined, opts?: object): void;
export function assertExpressionWrapper(node: object | null | undefined, opts?: object): void;
export function assertFor(node: object | null | undefined, opts?: object): void;
export function assertForXStatement(node: object | null | undefined, opts?: object): void;
export function assertFunction(node: object | null | undefined, opts?: object): void;
export function assertFunctionParent(node: object | null | undefined, opts?: object): void;
export function assertPureish(node: object | null | undefined, opts?: object): void;
export function assertDeclaration(node: object | null | undefined, opts?: object): void;
export function assertLVal(node: object | null | undefined, opts?: object): void;
export function assertLiteral(node: object | null | undefined, opts?: object): void;
export function assertImmutable(node: object | null | undefined, opts?: object): void;
export function assertUserWhitespacable(node: object | null | undefined, opts?: object): void;
export function assertMethod(node: object | null | undefined, opts?: object): void;
export function assertObjectMember(node: object | null | undefined, opts?: object): void;
export function assertProperty(node: object | null | undefined, opts?: object): void;
export function assertUnaryLike(node: object | null | undefined, opts?: object): void;
export function assertPattern(node: object | null | undefined, opts?: object): void;
export function assertClass(node: object | null | undefined, opts?: object): void;
export function assertModuleDeclaration(node: object | null | undefined, opts?: object): void;
export function assertExportDeclaration(node: object | null | undefined, opts?: object): void;
export function assertModuleSpecifier(node: object | null | undefined, opts?: object): void;
export function assertFlow(node: object | null | undefined, opts?: object): void;
export function assertFlowBaseAnnotation(node: object | null | undefined, opts?: object): void;
export function assertFlowDeclaration(node: object | null | undefined, opts?: object): void;
export function assertJSX(node: object | null | undefined, opts?: object): void;
export function assertNumberLiteral(node: object | null | undefined, opts?: object): void;
export function assertRegexLiteral(node: object | null | undefined, opts?: object): void;
export function assertTSAnyKeyword(node: object, opts?: object): void;
export function assertTSArrayType(node: object, opts?: object): void;
export function assertTSAsExpression(node: object, opts?: object): void;
export function assertTSBooleanKeyword(node: object, opts?: object): void;
export function assertTSCallSignatureDeclaration(node: object, opts?: object): void;
export function assertTSConstructSignatureDeclaration(node: object, opts?: object): void;
export function assertTSConstructorType(node: object, opts?: object): void;
export function assertTSDeclareFunction(node: object, opts?: object): void;
export function assertTSDeclareMethod(node: object, opts?: object): void;
export function assertTSEnumDeclaration(node: object, opts?: object): void;
export function assertTSEnumMember(node: object, opts?: object): void;
export function assertTSExportAssignment(node: object, opts?: object): void;
export function assertTSExpressionWithTypeArguments(node: object, opts?: object): void;
export function assertTSExternalModuleReference(node: object, opts?: object): void;
export function assertTSFunctionType(node: object, opts?: object): void;
export function assertTSImportEqualsDeclaration(node: object, opts?: object): void;
export function assertTSIndexSignature(node: object, opts?: object): void;
export function assertTSIndexedAccessType(node: object, opts?: object): void;
export function assertTSInterfaceBody(node: object, opts?: object): void;
export function assertTSInterfaceDeclaration(node: object, opts?: object): void;
export function assertTSIntersectionType(node: object, opts?: object): void;
export function assertTSLiteralType(node: object, opts?: object): void;
export function assertTSMappedType(node: object, opts?: object): void;
export function assertTSMethodSignature(node: object, opts?: object): void;
export function assertTSModuleBlock(node: object, opts?: object): void;
export function assertTSModuleDeclaration(node: object, opts?: object): void;
export function assertTSNamespaceExportDeclaration(node: object, opts?: object): void;
export function assertTSNeverKeyword(node: object, opts?: object): void;
export function assertTSNonNullExpression(node: object, opts?: object): void;
export function assertTSNullKeyword(node: object, opts?: object): void;
export function assertTSNumberKeyword(node: object, opts?: object): void;
export function assertTSObjectKeyword(node: object, opts?: object): void;
export function assertTSParameterProperty(node: object, opts?: object): void;
export function assertTSParenthesizedType(node: object, opts?: object): void;
export function assertTSPropertySignature(node: object, opts?: object): void;
export function assertTSQualifiedName(node: object, opts?: object): void;
export function assertTSStringKeyword(node: object, opts?: object): void;
export function assertTSSymbolKeyword(node: object, opts?: object): void;
export function assertTSThisType(node: object, opts?: object): void;
export function assertTSTupleType(node: object, opts?: object): void;
export function assertTSTypeAliasDeclaration(node: object, opts?: object): void;
export function assertTSTypeAnnotation(node: object, opts?: object): void;
export function assertTSTypeAssertion(node: object, opts?: object): void;
export function assertTSTypeLiteral(node: object, opts?: object): void;
export function assertTSTypeOperator(node: object, opts?: object): void;
export function assertTSTypeParameter(node: object, opts?: object): void;
export function assertTSTypeParameterDeclaration(node: object, opts?: object): void;
export function assertTSTypeParameterInstantiation(node: object, opts?: object): void;
export function assertTSTypePredicate(node: object, opts?: object): void;
export function assertTSTypeQuery(node: object, opts?: object): void;
export function assertTSTypeReference(node: object, opts?: object): void;
export function assertTSUndefinedKeyword(node: object, opts?: object): void;
export function assertTSUnionType(node: object, opts?: object): void;
export function assertTSVoidKeyword(node: object, opts?: object): void;
export function assertTSAnyKeyword(node: object | null | undefined, opts?: object): void;
export function assertTSArrayType(node: object | null | undefined, opts?: object): void;
export function assertTSAsExpression(node: object | null | undefined, opts?: object): void;
export function assertTSBooleanKeyword(node: object | null | undefined, opts?: object): void;
export function assertTSCallSignatureDeclaration(node: object | null | undefined, opts?: object): void;
export function assertTSConstructSignatureDeclaration(node: object | null | undefined, opts?: object): void;
export function assertTSConstructorType(node: object | null | undefined, opts?: object): void;
export function assertTSDeclareFunction(node: object | null | undefined, opts?: object): void;
export function assertTSDeclareMethod(node: object | null | undefined, opts?: object): void;
export function assertTSEnumDeclaration(node: object | null | undefined, opts?: object): void;
export function assertTSEnumMember(node: object | null | undefined, opts?: object): void;
export function assertTSExportAssignment(node: object | null | undefined, opts?: object): void;
export function assertTSExpressionWithTypeArguments(node: object | null | undefined, opts?: object): void;
export function assertTSExternalModuleReference(node: object | null | undefined, opts?: object): void;
export function assertTSFunctionType(node: object | null | undefined, opts?: object): void;
export function assertTSImportEqualsDeclaration(node: object | null | undefined, opts?: object): void;
export function assertTSIndexSignature(node: object | null | undefined, opts?: object): void;
export function assertTSIndexedAccessType(node: object | null | undefined, opts?: object): void;
export function assertTSInterfaceBody(node: object | null | undefined, opts?: object): void;
export function assertTSInterfaceDeclaration(node: object | null | undefined, opts?: object): void;
export function assertTSIntersectionType(node: object | null | undefined, opts?: object): void;
export function assertTSLiteralType(node: object | null | undefined, opts?: object): void;
export function assertTSMappedType(node: object | null | undefined, opts?: object): void;
export function assertTSMethodSignature(node: object | null | undefined, opts?: object): void;
export function assertTSModuleBlock(node: object | null | undefined, opts?: object): void;
export function assertTSModuleDeclaration(node: object | null | undefined, opts?: object): void;
export function assertTSNamespaceExportDeclaration(node: object | null | undefined, opts?: object): void;
export function assertTSNeverKeyword(node: object | null | undefined, opts?: object): void;
export function assertTSNonNullExpression(node: object | null | undefined, opts?: object): void;
export function assertTSNullKeyword(node: object | null | undefined, opts?: object): void;
export function assertTSNumberKeyword(node: object | null | undefined, opts?: object): void;
export function assertTSObjectKeyword(node: object | null | undefined, opts?: object): void;
export function assertTSParameterProperty(node: object | null | undefined, opts?: object): void;
export function assertTSParenthesizedType(node: object | null | undefined, opts?: object): void;
export function assertTSPropertySignature(node: object | null | undefined, opts?: object): void;
export function assertTSQualifiedName(node: object | null | undefined, opts?: object): void;
export function assertTSStringKeyword(node: object | null | undefined, opts?: object): void;
export function assertTSSymbolKeyword(node: object | null | undefined, opts?: object): void;
export function assertTSThisType(node: object | null | undefined, opts?: object): void;
export function assertTSTupleType(node: object | null | undefined, opts?: object): void;
export function assertTSTypeAliasDeclaration(node: object | null | undefined, opts?: object): void;
export function assertTSTypeAnnotation(node: object | null | undefined, opts?: object): void;
export function assertTSTypeAssertion(node: object | null | undefined, opts?: object): void;
export function assertTSTypeLiteral(node: object | null | undefined, opts?: object): void;
export function assertTSTypeOperator(node: object | null | undefined, opts?: object): void;
export function assertTSTypeParameter(node: object | null | undefined, opts?: object): void;
export function assertTSTypeParameterDeclaration(node: object | null | undefined, opts?: object): void;
export function assertTSTypeParameterInstantiation(node: object | null | undefined, opts?: object): void;
export function assertTSTypePredicate(node: object | null | undefined, opts?: object): void;
export function assertTSTypeQuery(node: object | null | undefined, opts?: object): void;
export function assertTSTypeReference(node: object | null | undefined, opts?: object): void;
export function assertTSUndefinedKeyword(node: object | null | undefined, opts?: object): void;
export function assertTSUnionType(node: object | null | undefined, opts?: object): void;
export function assertTSVoidKeyword(node: object | null | undefined, opts?: object): void;
+1 -1
View File
@@ -6,7 +6,7 @@
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
@@ -43,3 +43,12 @@ confetti({
y: 0.6
}
});
const canvas = document.createElement('canvas');
const myConfetti = confetti.create(canvas);
myConfetti();
myConfetti({
particleCount: 150
});
+9 -1
View File
@@ -1,4 +1,4 @@
// Type definitions for canvas-confetti 0.0
// Type definitions for canvas-confetti 0.1
// Project: https://github.com/catdad/canvas-confetti#readme
// Definitions by: Martin Tracey <https://github.com/matracey>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -81,6 +81,14 @@ declare namespace confetti {
*/
y?: number;
}
interface GlobalOptions {
resize: boolean;
}
function create(
canvas: HTMLCanvasElement,
options?: GlobalOptions
): (options?: Options) => Promise<null> | null;
}
export = confetti;
+2 -1
View File
@@ -2,7 +2,8 @@
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
@@ -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');
+3 -1
View File
@@ -35,6 +35,7 @@ class Readme {
});
const req = {
__subset: 'subset',
type: 'randomRequest',
payload: {
val: Math.floor(Math.random() * 10)
@@ -52,7 +53,8 @@ class Readme {
name: 'Random Responder',
namespace: 'rnd',
key: 'a certain key',
respondsTo: ['randomRequest']
respondsTo: ['randomRequest'],
subset: 'subset'
});
interface RandomRequest {
+6 -1
View File
@@ -1,4 +1,4 @@
// Type definitions for cote 0.17
// Type definitions for cote 0.19
// Project: https://github.com/dashersw/cote#readme
// Definitions by: makepost <https://github.com/makepost>
// Labat Robin <https://github.com/roblabat>
@@ -115,6 +115,11 @@ export interface ResponderAdvertisement extends Advertisement {
* Request types that a Responder can listen to.
*/
respondsTo?: string[];
/**
* Advertisement attribute that lets you target a subgroup of responders using the __subset property of a request.
*/
subset?: string;
}
export class Publisher extends Component {
+15 -1
View File
@@ -1,5 +1,7 @@
import cron = require('cron');
import moment = require('moment');
var CronJob = cron.CronJob;
var CronTime = cron.CronTime;
@@ -34,6 +36,16 @@ var job = new CronJob(new Date(), () => {
timeZone /* Time zone of this job. */
);
// Another example with Moment
var job = new CronJob(moment(), () => {
/* runs once at the specified moment. */
}, () => {
/* This function is executed when the job stops */
},
true, /* Start the job right now */
timeZone /* Time zone of this job. */
);
// For good measure
var job = new CronJob({
cronTime: '00 30 11 * * 1-5',
@@ -48,7 +60,8 @@ var job = new CronJob({
timeZone: 'America/Los_Angeles'
});
console.log(job.lastDate());
console.log(job.nextDates(1));
console.log(job.nextDates());// Should be a Moment object
console.log(job.nextDates(1));// Should be an array of Moment object
console.log(job.running);
job.setTime(new CronTime('00 30 11 * * 1-2'));
job.start();
@@ -67,4 +80,5 @@ try {
// Check cronTime fomat
new CronTime('* * * * * *');
new CronTime(new Date());
new CronTime(moment());
+13 -9
View File
@@ -4,6 +4,8 @@
// Lundarl Gholoi <https://github.com/winup>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import { Moment } from 'moment';
export declare class CronTime {
/**
* Create a new ```CronTime```.
@@ -11,13 +13,14 @@ export declare class CronTime {
* @param zone Timezone name. You can check all timezones available at [Moment Timezone Website](http://momentjs.com/timezone/).
* @param utcOffset UTC offset. Don't use both ```zone``` and ```utcOffset``` together or weird things may happen.
*/
constructor(source: string | Date, zone?: string, utcOffset?: string | number);
constructor(source: string | Date | Moment, zone?: string, utcOffset?: string | number);
/**
* Tells you when ```CronTime``` will be run.
* @param i Indicate which turn of run after now. If not given return next run time.
*/
public sendAt(i?: number): Date;
public sendAt(): Moment;
public sendAt(i?: number): Moment[];
/**
* Get the number of milliseconds in the future at which to fire our callbacks.
*/
@@ -28,7 +31,7 @@ export declare interface CronJobParameters {
/**
* The time to fire off your job. This can be in the form of cron syntax or a JS ```Date``` object.
*/
cronTime: string | Date;
cronTime: string | Date | Moment;
/**
* The function to fire at the specified time. If an ```onComplete``` callback was provided, ```onTick``` will receive it as an argument. ```onTick``` may call ```onComplete``` when it has finished its work.
*/
@@ -85,7 +88,7 @@ export declare class CronJob {
* @param utcOffset This allows you to specify the offset of your timezone rather than using the ```timeZone``` param. Probably don't use both ```timeZone``` and ```utcOffset``` together or weird things may happen.
* @param unrefTimeout If you have code that keeps the event loop running and want to stop the node process when that finishes regardless of the state of your cronjob, you can do so making use of this parameter. This is off by default and cron will run as if it needs to control the event loop. For more information take a look at [timers#timers_timeout_unref](https://nodejs.org/api/timers.html#timers_timeout_unref) from the NodeJS docs.
*/
constructor(cronTime: string | Date, onTick: () => void, onComplete?: () => void, start?: boolean, timeZone?: string, context?: any, runOnInit?: boolean, utcOffset?: string | number, unrefTimeout?: boolean);
constructor(cronTime: string | Date | Moment, onTick: () => void, onComplete?: () => void, start?: boolean, timeZone?: string, context?: any, runOnInit?: boolean, utcOffset?: string | number, unrefTimeout?: boolean);
/**
* Create a new ```CronJob```.
* @param options Job parameters.
@@ -113,7 +116,8 @@ export declare class CronJob {
* Tells you when a ```CronTime``` will be run.
* @param i Indicate which turn of run after now. If not given return next run time.
*/
public nextDates(i?: number): Date;
public nextDates(): Moment;
public nextDates(i?: number): Moment[];
/**
* Add another ```onTick``` function.
* @param callback Target function.
@@ -122,8 +126,8 @@ export declare class CronJob {
}
export declare var job:
((cronTime: string | Date, onTick: () => void, onComplete?: () => void, start?: boolean, timeZone?: string, context?: any, runOnInit?: boolean, utcOffset?: string | number, unrefTimeout?: boolean) => CronJob)
((cronTime: string | Date | Moment, onTick: () => void, onComplete?: () => void, start?: boolean, timeZone?: string, context?: any, runOnInit?: boolean, utcOffset?: string | number, unrefTimeout?: boolean) => CronJob)
| ((options: CronJobParameters) => CronJob);
export declare var time: (source: string | Date, zone?: string) => CronTime;
export declare var sendAt: (cronTime: CronTime) => Date;
export declare var timeout: (cronTime: CronTime) => number;
export declare var time: (source: string | Date | Moment, zone?: string) => CronTime;
export declare var sendAt: (cronTime: string | Date | Moment) => Moment;
export declare var timeout: (cronTime: string | Date | Moment) => number;
+6
View File
@@ -0,0 +1,6 @@
{
"private": true,
"dependencies": {
"moment": ">=2.14.0"
}
}
+2 -2
View File
@@ -578,7 +578,7 @@ $('#example tbody').on('click', 'td', () => {
const cell_invalidate_1 = cell.invalidate();
const cell_invalidate_2 = cell.invalidate("data");
$('#example tbody').on('click', 'td', () => {
$('#example tbody').on('click', 'td', function() {
this.innerHTML = (parseInt(this.innerHTML, 10) + 1).toString();
dt.cell(this).invalidate().draw();
});
@@ -773,7 +773,7 @@ let column_search_set = column.search("string");
column_search_set = column.search("string", true);
column_search_set = column.search("string", true, false);
column_search_set = column.search("string", true, false, true);
$('#column3_search').on('keyup', () => {
$('#column3_search').on('keyup', function() {
dt
.columns(3)
.search((this as HTMLInputElement).value)
+2 -2
View File
@@ -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();
}
+3 -2
View File
@@ -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"
]
}
}
+1 -1
View File
@@ -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
+9
View File
@@ -2302,6 +2302,15 @@ interface IObjectOptions {
* Describes the object's corner position in canvas object absolute properties.
*/
aCoords?: {bl: Point, br: Point, tl: Point, tr: Point};
/**
* Describe object's corner position in canvas element coordinates. properties are tl,mt,tr,ml,mr,bl,mb,br,mtr for
* the main controls. each property is an object with x, y and corner. The `corner` property contains in a similar
* manner the 4 points of the interactive area of the corner. The coordinates depends from this properties: width,
* height, scaleX, scaleY skewX, skewY, angle, strokeWidth, viewportTransform, top, left, padding. The coordinates
* get updated with @method setCoords. You can calculate them without updating with @method calcCoords;
*/
oCoords?: { tl: Point, mt: Point, tr: Point, ml: Point, mr: Point, bl: Point, mb: Point, br: Point, mtr: Point }
}
export interface Object extends IObservable<Object>, IObjectOptions, IObjectAnimation<Object> { }
export class Object {
+1
View File
@@ -7,6 +7,7 @@
// Brian Martinson <https://github.com/bmartinson>
// Rogerio Teixeira <https://github.com/RogerioTeixeira>
// Bradley Hill <https://github.com/BradleyHill>
// Glenn Gartner <https://github.com/glenngartner>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1
export import fabric = require("./fabric-impl");
+3 -3
View File
@@ -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
});
});
});
+1 -1
View File
@@ -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'];
});
+1
View File
@@ -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>
+1 -1
View File
@@ -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
View File
@@ -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();
+2 -2
View File
@@ -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>>,
+1 -1
View File
@@ -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;
+80 -80
View File
@@ -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);
@@ -1197,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');
});
+2 -2
View File
@@ -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";
});
+69 -14
View File
@@ -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;
+19 -9
View File
@@ -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,
}));
+4 -11
View File
@@ -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"]
}
+1 -1
View File
@@ -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>
+4 -4
View File
@@ -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;
+1 -1
View File
@@ -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);
// ...
+2 -2
View File
@@ -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;
+2 -2
View File
@@ -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;
+139 -6
View File
@@ -1,4 +1,4 @@
// Type definitions for normalize-url 3.3
// Type definitions for normalize-url 4.1
// Project: https://github.com/sindresorhus/normalize-url
// Definitions by: odin3 <https://github.com/odin3>
// BendingBender <https://github.com/BendingBender>
@@ -7,21 +7,154 @@
declare namespace normalizeUrl {
interface Options {
/**
* @default 'http:'
*/
defaultProtocol?: string;
forceHttp?: boolean;
forceHttps?: boolean;
/**
* Prepends `defaultProtocol` to the URL if it's protocol-relative.
*
* @default true
* @example
* normalizeUrl('//sindresorhus.com:80/');
* //=> 'http://sindresorhus.com'
*
* normalizeUrl('//sindresorhus.com:80/', {normalizeProtocol: false});
* //=> '//sindresorhus.com'
*/
normalizeProtocol?: boolean;
normalizeHttps?: boolean;
sortQueryParameters?: boolean;
stripFragment?: boolean;
/**
* Normalizes `https:` URLs to `http:`.
*
* @default false
* @example
* normalizeUrl('https://sindresorhus.com:80/');
* //=> 'https://sindresorhus.com'
*
* normalizeUrl('https://sindresorhus.com:80/', {forceHttp: true});
* //=> 'http://sindresorhus.com'
*/
forceHttp?: boolean;
/**
* Normalizes `http:` URLs to `https:`.
*
* This option can't be used with the `forceHttp` option at the same time.
*
* @default false
* @example
* normalizeUrl('https://sindresorhus.com:80/');
* //=> 'https://sindresorhus.com'
*
* normalizeUrl('http://sindresorhus.com:80/', {forceHttps: true});
* //=> 'https://sindresorhus.com'
*/
forceHttps?: boolean;
/**
* Strip the [authentication](https://en.wikipedia.org/wiki/Basic_access_authentication) part of a URL.
*
* @default true
* @example
* normalizeUrl('user:password@sindresorhus.com');
* //=> 'https://sindresorhus.com'
*
* normalizeUrl('user:password@sindresorhus.com', {stripAuthentication: false});
* //=> 'https://user:password@sindresorhus.com'
*/
stripAuthentication?: boolean;
/**
* Removes hash from the URL.
*
* @default false
* @example
* normalizeUrl('sindresorhus.com/about.html#contact');
* //=> 'http://sindresorhus.com/about.html#contact'
*
* normalizeUrl('sindresorhus.com/about.html#contact', {stripHash: true});
* //=> 'http://sindresorhus.com/about.html'
*/
stripHash?: boolean;
/**
* Removes HTTP(S) protocol from an URL `http://sindresorhus.com` → `sindresorhus.com`.
*
* @default false
* @example
* normalizeUrl('https://sindresorhus.com');
* //=> 'https://sindresorhus.com'
*
* normalizeUrl('sindresorhus.com', {stripProtocol: true});
* //=> 'sindresorhus.com'
*/
stripProtocol?: boolean;
/**
* Removes `www.` from the URL.
*
* @default true
* @example
* normalizeUrl('http://www.sindresorhus.com');
* //=> 'http://sindresorhus.com'
*
* normalizeUrl('http://www.sindresorhus.com', {stripWWW: false});
* //=> 'http://www.sindresorhus.com'
*/
stripWWW?: boolean;
/**
* Removes query parameters that matches any of the provided strings or regexes.
*
* @default [/^utm_\w+/i]
* @example
* normalizeUrl('www.sindresorhus.com?foo=bar&ref=test_ref', {
* removeQueryParameters: ['ref']
* });
* //=> 'http://sindresorhus.com/?foo=bar'
*/
removeQueryParameters?: Array<RegExp | string>;
/**
* Removes trailing slash.
*
* **Note**: Trailing slash is always removed if the URL doesn't have a pathname.
*
* @default true
* @example
* normalizeUrl('http://sindresorhus.com/redirect/');
* //=> 'http://sindresorhus.com/redirect'
*
* normalizeUrl('http://sindresorhus.com/redirect/', {removeTrailingSlash: false});
* //=> 'http://sindresorhus.com/redirect/'
*
* normalizeUrl('http://sindresorhus.com/', {removeTrailingSlash: false});
* //=> 'http://sindresorhus.com'
*/
removeTrailingSlash?: boolean;
/**
* Removes the default directory index file from path that matches any of the provided strings or regexes.
* When `true`, the regex `/^index\.[a-z]+$/` is used.
*
* @default false
* @example
* normalizeUrl('www.sindresorhus.com/foo/default.php', {
* removeDirectoryIndex: [/^default\.[a-z]+$/]
* });
* //=> 'http://sindresorhus.com/foo'
*/
removeDirectoryIndex?: Array<RegExp | string>;
/**
* Sorts the query parameters alphabetically by key.
*
* @default true
* @example
* normalizeUrl('www.sindresorhus.com?b=two&a=one&c=three', {
* sortQueryParameters: false
* });
* //=> 'http://sindresorhus.com/?b=two&a=one&c=three'
*/
sortQueryParameters?: boolean;
}
}
/**
* [Normalize](https://en.wikipedia.org/wiki/URL_normalization) a URL.
* @param url URL to normalize.
*/
declare function normalizeUrl(url: string, options?: normalizeUrl.Options): string;
export = normalizeUrl;
+16 -10
View File
@@ -1,17 +1,23 @@
import normalizeUrl = require('normalize-url');
let str: string;
str = normalizeUrl('sindresorhus.com');
str = normalizeUrl('HTTP://xn--xample-hva.com:80/?b=bar&a=foo');
normalizeUrl('sindresorhus.com'); // $ExpectType string
normalizeUrl('HTTP://xn--xample-hva.com:80/?b=bar&a=foo'); // $ExpectType string
normalizeUrl('//sindresorhus.com:80/', {normalizeProtocol: false});
normalizeUrl('https://sindresorhus.com:80/', {normalizeHttps: true});
normalizeUrl('sindresorhus.com/about.html#contact', {stripFragment: false});
normalizeUrl('http://www.sindresorhus.com/about.html#contact', {stripWWW: false});
normalizeUrl('//sindresorhus.com:80/', { defaultProtocol: 'https:' });
normalizeUrl('//sindresorhus.com:80/', { normalizeProtocol: false });
normalizeUrl('https://sindresorhus.com:80/', { forceHttp: true });
normalizeUrl('http://sindresorhus.com:80/', { forceHttps: true });
normalizeUrl('user:password@sindresorhus.com', { stripAuthentication: false });
normalizeUrl('sindresorhus.com/about.html#contact', { stripHash: true });
normalizeUrl('https://sindresorhus.com', { stripProtocol: true });
normalizeUrl('http://www.sindresorhus.com', { stripWWW: false });
normalizeUrl('www.sindresorhus.com?foo=bar&ref=test_ref', {
removeQueryParameters: ['ref', /test/]
removeQueryParameters: ['ref', /test/],
});
normalizeUrl('http://sindresorhus.com/', {removeTrailingSlash: false});
normalizeUrl('http://sindresorhus.com/', { removeTrailingSlash: false });
normalizeUrl('www.sindresorhus.com/foo/default.php', {
removeDirectoryIndex: [/^default\.[a-z]+$/, 'foo']
removeDirectoryIndex: [/^default\.[a-z]+$/, 'foo'],
});
normalizeUrl('www.sindresorhus.com?b=two&a=one&c=three', {
sortQueryParameters: false,
});
+2 -2
View File
@@ -6,7 +6,7 @@
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
@@ -20,4 +20,4 @@
"index.d.ts",
"normalize-url-tests.ts"
]
}
}
+1 -5
View File
@@ -1,7 +1,3 @@
{
"extends": "dtslint/dt.json",
"rules": {
// This package uses the Function type, and it will take effort to fix.
"ban-types": false
}
"extends": "dtslint/dt.json"
}
+27
View File
@@ -0,0 +1,27 @@
// Type definitions for normalize-url 3.3
// Project: https://github.com/sindresorhus/normalize-url
// Definitions by: odin3 <https://github.com/odin3>
// BendingBender <https://github.com/BendingBender>
// Mathieu M-Gosselin <https://github.com/mathieumg>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace normalizeUrl {
interface Options {
defaultProtocol?: string;
forceHttp?: boolean;
forceHttps?: boolean;
normalizeProtocol?: boolean;
normalizeHttps?: boolean;
sortQueryParameters?: boolean;
stripFragment?: boolean;
stripHash?: boolean;
stripWWW?: boolean;
removeQueryParameters?: Array<RegExp | string>;
removeTrailingSlash?: boolean;
removeDirectoryIndex?: Array<RegExp | string>;
}
}
declare function normalizeUrl(url: string, options?: normalizeUrl.Options): string;
export = normalizeUrl;
@@ -0,0 +1,17 @@
import normalizeUrl = require('normalize-url');
let str: string;
str = normalizeUrl('sindresorhus.com');
str = normalizeUrl('HTTP://xn--xample-hva.com:80/?b=bar&a=foo');
normalizeUrl('//sindresorhus.com:80/', {normalizeProtocol: false});
normalizeUrl('https://sindresorhus.com:80/', {normalizeHttps: true});
normalizeUrl('sindresorhus.com/about.html#contact', {stripFragment: false});
normalizeUrl('http://www.sindresorhus.com/about.html#contact', {stripWWW: false});
normalizeUrl('www.sindresorhus.com?foo=bar&ref=test_ref', {
removeQueryParameters: ['ref', /test/]
});
normalizeUrl('http://sindresorhus.com/', {removeTrailingSlash: false});
normalizeUrl('www.sindresorhus.com/foo/default.php', {
removeDirectoryIndex: [/^default\.[a-z]+$/, 'foo']
});
@@ -6,18 +6,23 @@
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictNullChecks": false,
"strictFunctionTypes": true,
"baseUrl": "../",
"baseUrl": "../../",
"typeRoots": [
"../"
"../../"
],
"paths": {
"normalize-url": [
"normalize-url/v3"
]
},
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"wait-for-localhost-tests.ts"
"normalize-url-tests.ts"
]
}
+3
View File
@@ -0,0 +1,3 @@
{
"extends": "dtslint/dt.json"
}
+17 -16
View File
@@ -12576,7 +12576,7 @@ declare namespace Office {
*
* @param data - The data to be inserted. Data is not to exceed 1,000,000 characters.
* If more than 1,000,000 characters are passed in, an ArgumentOutOfRange exception is thrown.
* @param options - An object literal that contains one or more of the following properties.
* @param options - Optional. An object literal that contains one or more of the following properties.
* asyncContext: Developers can provide any object they wish to access in the callback method.
* coercionType: If text, the current style is applied in Outlook Web App and Outlook.
* If the field is an HTML editor, only the text data is inserted, even if the data is HTML.
@@ -12585,10 +12585,10 @@ declare namespace Office {
* If the field is a text field, an InvalidDataFormat error is returned.
* If coercionType is not set, the result depends on the field: if the field is HTML then HTML is used;
* if the field is text, then plain text is used.
* @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter of
* @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of
* type Office.AsyncResult.
*/
setSelectedDataAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions, callback: (asyncResult: Office.AsyncResult<void>) => void): void;
setSelectedDataAsync(data: string, options?: Office.AsyncContextOptions & CoercionTypeOptions, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
/**
* Asynchronously inserts data into the body or subject of a message.
*
@@ -12608,10 +12608,10 @@ declare namespace Office {
*
* @param data - The data to be inserted. Data is not to exceed 1,000,000 characters.
* If more than 1,000,000 characters are passed in, an ArgumentOutOfRange exception is thrown.
* @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter of
* @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of
* type Office.AsyncResult.
*/
setSelectedDataAsync(data: string, callback: (asyncResult: Office.AsyncResult<void>) => void): void;
setSelectedDataAsync(data: string, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
}
/**
@@ -14269,7 +14269,7 @@ declare namespace Office {
*
* @param data - The data to be inserted. Data is not to exceed 1,000,000 characters.
* If more than 1,000,000 characters are passed in, an ArgumentOutOfRange exception is thrown.
* @param options - An object literal that contains one or more of the following properties.
* @param options - Optional. An object literal that contains one or more of the following properties.
* asyncContext: Developers can provide any object they wish to access in the callback method.
* coercionType: If text, the current style is applied in Outlook Web App and Outlook.
* If the field is an HTML editor, only the text data is inserted, even if the data is HTML.
@@ -14278,10 +14278,10 @@ declare namespace Office {
* If the field is a text field, an InvalidDataFormat error is returned.
* If coercionType is not set, the result depends on the field: if the field is HTML then HTML is used;
* if the field is text, then plain text is used.
* @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter of
* @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of
* type Office.AsyncResult.
*/
setSelectedDataAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions, callback: (asyncResult: Office.AsyncResult<void>) => void): void;
setSelectedDataAsync(data: string, options?: Office.AsyncContextOptions & CoercionTypeOptions, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
/**
* Asynchronously inserts data into the body or subject of a message.
*
@@ -14301,10 +14301,10 @@ declare namespace Office {
*
* @param data - The data to be inserted. Data is not to exceed 1,000,000 characters.
* If more than 1,000,000 characters are passed in, an ArgumentOutOfRange exception is thrown.
* @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter of
* @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of
* type Office.AsyncResult.
*/
setSelectedDataAsync(data: string, callback: (asyncResult: Office.AsyncResult<void>) => void): void;
setSelectedDataAsync(data: string, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
}
/**
* The read mode of {@link Office.Item | Office.context.mailbox.item}.
@@ -15570,7 +15570,7 @@ declare namespace Office {
*
* @param data - The data to be inserted. Data is not to exceed 1,000,000 characters.
* If more than 1,000,000 characters are passed in, an ArgumentOutOfRange exception is thrown.
* @param options - An object literal that contains one or more of the following properties.
* @param options - Optional. An object literal that contains one or more of the following properties.
* asyncContext: Developers can provide any object they wish to access in the callback method.
* coercionType: If text, the current style is applied in Outlook Web App and Outlook.
* If the field is an HTML editor, only the text data is inserted, even if the data is HTML.
@@ -15578,10 +15578,10 @@ declare namespace Office {
* applied in Outlook. If the field is a text field, an InvalidDataFormat error is returned.
* If coercionType is not set, the result depends on the field: if the field is HTML then HTML is used;
* if the field is text, then plain text is used.
* @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter of
* @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of
* type Office.AsyncResult.
*/
setSelectedDataAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions, callback: (asyncResult: Office.AsyncResult<void>) => void): void;
setSelectedDataAsync(data: string, options?: Office.AsyncContextOptions & CoercionTypeOptions, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
/**
* Asynchronously inserts data into the body or subject of a message.
*
@@ -15601,10 +15601,10 @@ declare namespace Office {
*
* @param data - The data to be inserted. Data is not to exceed 1,000,000 characters.
* If more than 1,000,000 characters are passed in, an ArgumentOutOfRange exception is thrown.
* @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter of
* @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of
* type Office.AsyncResult.
*/
setSelectedDataAsync(data: string, callback: (asyncResult: Office.AsyncResult<void>) => void): void;
setSelectedDataAsync(data: string, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
}
/**
* The message read mode of {@link Office.Item | Office.context.mailbox.item}.
@@ -15995,7 +15995,8 @@ declare namespace Office {
* Adds an event handler for a supported event.
*
* Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and
* `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported.
* `Office.EventType.RecurrenceChanged`.
* In Preview, `Office.EventType.AttachmentsChanged` and `Office.EventType.EnhancedLocationsChanged` are also supported.
*
* [Api set: Mailbox 1.7]
*
+17 -16
View File
@@ -12576,7 +12576,7 @@ declare namespace Office {
*
* @param data - The data to be inserted. Data is not to exceed 1,000,000 characters.
* If more than 1,000,000 characters are passed in, an ArgumentOutOfRange exception is thrown.
* @param options - An object literal that contains one or more of the following properties.
* @param options - Optional. An object literal that contains one or more of the following properties.
* asyncContext: Developers can provide any object they wish to access in the callback method.
* coercionType: If text, the current style is applied in Outlook Web App and Outlook.
* If the field is an HTML editor, only the text data is inserted, even if the data is HTML.
@@ -12585,10 +12585,10 @@ declare namespace Office {
* If the field is a text field, an InvalidDataFormat error is returned.
* If coercionType is not set, the result depends on the field: if the field is HTML then HTML is used;
* if the field is text, then plain text is used.
* @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter of
* @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of
* type Office.AsyncResult.
*/
setSelectedDataAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions, callback: (asyncResult: Office.AsyncResult<void>) => void): void;
setSelectedDataAsync(data: string, options?: Office.AsyncContextOptions & CoercionTypeOptions, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
/**
* Asynchronously inserts data into the body or subject of a message.
*
@@ -12608,10 +12608,10 @@ declare namespace Office {
*
* @param data - The data to be inserted. Data is not to exceed 1,000,000 characters.
* If more than 1,000,000 characters are passed in, an ArgumentOutOfRange exception is thrown.
* @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter of
* @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of
* type Office.AsyncResult.
*/
setSelectedDataAsync(data: string, callback: (asyncResult: Office.AsyncResult<void>) => void): void;
setSelectedDataAsync(data: string, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
}
/**
@@ -14269,7 +14269,7 @@ declare namespace Office {
*
* @param data - The data to be inserted. Data is not to exceed 1,000,000 characters.
* If more than 1,000,000 characters are passed in, an ArgumentOutOfRange exception is thrown.
* @param options - An object literal that contains one or more of the following properties.
* @param options - Optional. An object literal that contains one or more of the following properties.
* asyncContext: Developers can provide any object they wish to access in the callback method.
* coercionType: If text, the current style is applied in Outlook Web App and Outlook.
* If the field is an HTML editor, only the text data is inserted, even if the data is HTML.
@@ -14278,10 +14278,10 @@ declare namespace Office {
* If the field is a text field, an InvalidDataFormat error is returned.
* If coercionType is not set, the result depends on the field: if the field is HTML then HTML is used;
* if the field is text, then plain text is used.
* @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter of
* @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of
* type Office.AsyncResult.
*/
setSelectedDataAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions, callback: (asyncResult: Office.AsyncResult<void>) => void): void;
setSelectedDataAsync(data: string, options?: Office.AsyncContextOptions & CoercionTypeOptions, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
/**
* Asynchronously inserts data into the body or subject of a message.
*
@@ -14301,10 +14301,10 @@ declare namespace Office {
*
* @param data - The data to be inserted. Data is not to exceed 1,000,000 characters.
* If more than 1,000,000 characters are passed in, an ArgumentOutOfRange exception is thrown.
* @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter of
* @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of
* type Office.AsyncResult.
*/
setSelectedDataAsync(data: string, callback: (asyncResult: Office.AsyncResult<void>) => void): void;
setSelectedDataAsync(data: string, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
}
/**
* The read mode of {@link Office.Item | Office.context.mailbox.item}.
@@ -15570,7 +15570,7 @@ declare namespace Office {
*
* @param data - The data to be inserted. Data is not to exceed 1,000,000 characters.
* If more than 1,000,000 characters are passed in, an ArgumentOutOfRange exception is thrown.
* @param options - An object literal that contains one or more of the following properties.
* @param options - Optional. An object literal that contains one or more of the following properties.
* asyncContext: Developers can provide any object they wish to access in the callback method.
* coercionType: If text, the current style is applied in Outlook Web App and Outlook.
* If the field is an HTML editor, only the text data is inserted, even if the data is HTML.
@@ -15578,10 +15578,10 @@ declare namespace Office {
* applied in Outlook. If the field is a text field, an InvalidDataFormat error is returned.
* If coercionType is not set, the result depends on the field: if the field is HTML then HTML is used;
* if the field is text, then plain text is used.
* @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter of
* @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of
* type Office.AsyncResult.
*/
setSelectedDataAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions, callback: (asyncResult: Office.AsyncResult<void>) => void): void;
setSelectedDataAsync(data: string, options?: Office.AsyncContextOptions & CoercionTypeOptions, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
/**
* Asynchronously inserts data into the body or subject of a message.
*
@@ -15601,10 +15601,10 @@ declare namespace Office {
*
* @param data - The data to be inserted. Data is not to exceed 1,000,000 characters.
* If more than 1,000,000 characters are passed in, an ArgumentOutOfRange exception is thrown.
* @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter of
* @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of
* type Office.AsyncResult.
*/
setSelectedDataAsync(data: string, callback: (asyncResult: Office.AsyncResult<void>) => void): void;
setSelectedDataAsync(data: string, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
}
/**
* The message read mode of {@link Office.Item | Office.context.mailbox.item}.
@@ -15995,7 +15995,8 @@ declare namespace Office {
* Adds an event handler for a supported event.
*
* Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and
* `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported.
* `Office.EventType.RecurrenceChanged`.
* In Preview, `Office.EventType.AttachmentsChanged` and `Office.EventType.EnhancedLocationsChanged` are also supported.
*
* [Api set: Mailbox 1.7]
*
-86
View File
@@ -1,86 +0,0 @@
// Type definitions for p-pipe 1.2
// Project: https://github.com/sindresorhus/p-pipe#readme
// Definitions by: BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.0
export = pPipe;
// tslint:disable:no-unnecessary-generics
declare function pPipe<T1, R>(...args: Tasks1<T1, R>): PromiseTask<T1, R>;
declare function pPipe<T1, T2, R>(...args: Tasks2<T1, T2, R>): PromiseTask<T1, R>;
declare function pPipe<T1, T2, T3, R>(...args: Tasks3<T1, T2, T3, R>): PromiseTask<T1, R>;
declare function pPipe<T1, T2, T3, T4, R>(...args: Tasks4<T1, T2, T3, T4, R>): PromiseTask<T1, R>;
declare function pPipe<T1, T2, T3, T4, T5, R>(
...args: Tasks5<T1, T2, T3, T4, T5, R>
): PromiseTask<T1, R>;
declare function pPipe<T1, T2, T3, T4, T5, T6, R>(
...args: Tasks6<T1, T2, T3, T4, T5, T6, R>
): PromiseTask<T1, R>;
declare function pPipe<T1, T2, T3, T4, T5, T6, T7, R>(
...args: Tasks7<T1, T2, T3, T4, T5, T6, T7, R>
): PromiseTask<T1, R>;
declare function pPipe<T1, T2, T3, T4, T5, T6, T7, T8, R>(
...args: Tasks8<T1, T2, T3, T4, T5, T6, T7, T8, R>
): PromiseTask<T1, R>;
declare function pPipe(...args: Array<Task<any, any>>): PromiseTask<any, any>;
declare function pPipe<T1, R>(tasks: Tasks1<T1, R>): PromiseTask<T1, R>;
declare function pPipe<T1, T2, R>(tasks: Tasks2<T1, T2, R>): PromiseTask<T1, R>;
declare function pPipe<T1, T2, T3, R>(tasks: Tasks3<T1, T2, T3, R>): PromiseTask<T1, R>;
declare function pPipe<T1, T2, T3, T4, R>(tasks: Tasks4<T1, T2, T3, T4, R>): PromiseTask<T1, R>;
declare function pPipe<T1, T2, T3, T4, T5, R>(
tasks: Tasks5<T1, T2, T3, T4, T5, R>
): PromiseTask<T1, R>;
declare function pPipe<T1, T2, T3, T4, T5, T6, R>(
tasks: Tasks6<T1, T2, T3, T4, T5, T6, R>
): PromiseTask<T1, R>;
declare function pPipe<T1, T2, T3, T4, T5, T6, T7, R>(
tasks: Tasks7<T1, T2, T3, T4, T5, T6, T7, R>
): PromiseTask<T1, R>;
declare function pPipe<T1, T2, T3, T4, T5, T6, T7, T8, R>(
tasks: Tasks8<T1, T2, T3, T4, T5, T6, T7, T8, R>
): PromiseTask<T1, R>;
declare function pPipe(tasks: Array<Task<any, any>>): PromiseTask<any, any>;
type Tasks1<T1, R> = [PromiseTask<T1, R>];
type Tasks2<T1, T2, R> = [Task<T1, T2>, Task<T2, R>];
type Tasks3<T1, T2, T3, R> = [Task<T1, T2>, Task<T2, T3>, Task<T3, R>];
type Tasks4<T1, T2, T3, T4, R> = [Task<T1, T2>, Task<T2, T3>, Task<T3, T4>, Task<T4, R>];
type Tasks5<T1, T2, T3, T4, T5, R> = [
Task<T1, T2>,
Task<T2, T3>,
Task<T3, T4>,
Task<T4, T5>,
Task<T5, R>
];
type Tasks6<T1, T2, T3, T4, T5, T6, R> = [
Task<T1, T2>,
Task<T2, T3>,
Task<T3, T4>,
Task<T4, T5>,
Task<T5, T6>,
Task<T6, R>
];
type Tasks7<T1, T2, T3, T4, T5, T6, T7, R> = [
Task<T1, T2>,
Task<T2, T3>,
Task<T3, T4>,
Task<T4, T5>,
Task<T5, T6>,
Task<T6, T7>,
Task<T7, R>
];
type Tasks8<T1, T2, T3, T4, T5, T6, T7, T8, R> = [
Task<T1, T2>,
Task<T2, T3>,
Task<T3, T4>,
Task<T4, T5>,
Task<T5, T6>,
Task<T6, T7>,
Task<T7, T8>,
Task<T8, R>
];
type Task<T, R> = (input: T) => PromiseLike<R> | R;
type PromiseTask<T, R> = (input: T) => Promise<R>;
-57
View File
@@ -1,57 +0,0 @@
import pPipe = require('p-pipe');
const addUnicorn = (str: string) => Promise.resolve(`${str} Unicorn`);
const addRainbow = (str: string) => Promise.resolve(`${str} Rainbow`);
const pipeline = pPipe(addUnicorn, addRainbow);
pipeline('❤️'); // $ExpectType Promise<string>
const strToInt = (s: string) => Promise.resolve(1);
const intToBool = (i: number) => Promise.resolve(true);
const boolToObj = (b: boolean) => Promise.resolve({});
const objToNull = (o: object) => Promise.resolve(null);
const nullToVoid = (n: null) => Promise.resolve(undefined);
const voidToStr = (u: undefined) => Promise.resolve('');
pPipe(strToInt); // $ExpectType PromiseTask<string, number>
pPipe(strToInt, intToBool); // $ExpectType PromiseTask<string, boolean>
pPipe(strToInt, intToBool, boolToObj); // $ExpectType PromiseTask<string, {}>
pPipe(strToInt, intToBool, boolToObj, objToNull); // $ExpectType PromiseTask<string, null>
pPipe(strToInt, intToBool, boolToObj, objToNull, nullToVoid); // $ExpectType PromiseTask<string, undefined>
pPipe(strToInt, intToBool, boolToObj, objToNull, nullToVoid, voidToStr); // $ExpectType PromiseTask<string, string>
pPipe(strToInt, intToBool, boolToObj, objToNull, nullToVoid, voidToStr, strToInt); // $ExpectType PromiseTask<string, number>
pPipe(strToInt, intToBool, boolToObj, objToNull, nullToVoid, voidToStr, strToInt, intToBool); // $ExpectType PromiseTask<string, boolean>
// $ExpectType PromiseTask<any, any>
pPipe(
strToInt,
intToBool,
boolToObj,
objToNull,
nullToVoid,
voidToStr,
strToInt,
intToBool,
boolToObj
);
pPipe([strToInt]); // $ExpectType PromiseTask<string, number>
pPipe([strToInt, intToBool]); // $ExpectType PromiseTask<string, boolean>
pPipe([strToInt, intToBool, boolToObj]); // $ExpectType PromiseTask<string, {}>
pPipe([strToInt, intToBool, boolToObj, objToNull]); // $ExpectType PromiseTask<string, null>
pPipe([strToInt, intToBool, boolToObj, objToNull, nullToVoid]); // $ExpectType PromiseTask<string, undefined>
pPipe([strToInt, intToBool, boolToObj, objToNull, nullToVoid, voidToStr]); // $ExpectType PromiseTask<string, string>
pPipe([strToInt, intToBool, boolToObj, objToNull, nullToVoid, voidToStr, strToInt]); // $ExpectType PromiseTask<string, number>
pPipe([strToInt, intToBool, boolToObj, objToNull, nullToVoid, voidToStr, strToInt, intToBool]); // $ExpectType PromiseTask<string, boolean>
// $ExpectType PromiseTask<any, any>
pPipe([
strToInt,
intToBool,
boolToObj,
objToNull,
nullToVoid,
voidToStr,
strToInt,
intToBool,
boolToObj,
]);
-23
View File
@@ -1,23 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"p-pipe-tests.ts"
]
}
-1
View File
@@ -1 +0,0 @@
{ "extends": "dtslint/dt.json" }
+1 -1
View File
@@ -11,7 +11,7 @@
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
import "node";
/// <reference types="node" />
export as namespace Papa;
+1 -1
View File
@@ -96,7 +96,7 @@ phantom.create(["--web-security=no", "--ignore-ssl-errors=yes"]).then((ph) => {
phantom.create().then((ph) => {
return ph.createPage().then((page) => {
page.open("http://localhost:9901/cookie").then((status) => {
var someFunc = (aaa: string, my_obj: Object) => {
var someFunc = function (aaa: string, my_obj: Object) {
var attribute_to_want = aaa;
var h2Arr: string[] = [];
var results = document.querySelectorAll(attribute_to_want);
+8 -1
View File
@@ -1,7 +1,8 @@
// Type definitions for prop-types 15.5
// Type definitions for prop-types 15.7
// Project: https://github.com/reactjs/prop-types, https://facebook.github.io/react
// Definitions by: DovydasNavickas <https://github.com/DovydasNavickas>
// Ferdy Budhidharma <https://github.com/ferdaber>
// Sebastian Silbermann <https://github.com/eps1lon>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
@@ -62,6 +63,7 @@ export const string: Requireable<string>;
export const node: Requireable<ReactNodeLike>;
export const element: Requireable<ReactElementLike>;
export const symbol: Requireable<symbol>;
export const elementType: Requireable<ReactComponentLike>;
export function instanceOf<T>(expectedClass: new (...args: any[]) => T): Requireable<T>;
export function oneOf<T>(types: T[]): Requireable<T>;
export function oneOfType<T extends Validator<any>>(types: T[]): Requireable<NonNullable<InferType<T>>>;
@@ -81,3 +83,8 @@ export function exact<P extends ValidationMap<any>>(type: P): Requireable<Requir
* @param getStack Returns the component stack.
*/
export function checkPropTypes(typeSpecs: any, values: any, location: string, componentName: string, getStack?: () => any): void;
/**
* Only available if NODE_ENV=production
*/
export function resetWarningCache(): void;
+6 -2
View File
@@ -34,6 +34,7 @@ interface Props {
};
optionalNumber?: number | null;
customProp?: typeof uniqueType;
component: PropTypes.ReactComponentLike;
}
const innerProps = {
@@ -74,7 +75,8 @@ const propTypes: PropTypesMap = {
objectOf: PropTypes.objectOf(PropTypes.number.isRequired).isRequired,
shape: PropTypes.shape(innerProps).isRequired,
optionalNumber: PropTypes.number,
customProp: (() => null) as PropTypes.Validator<typeof uniqueType | undefined>
customProp: (() => null) as PropTypes.Validator<typeof uniqueType | undefined>,
component: PropTypes.elementType.isRequired
};
// JS checking
@@ -100,7 +102,8 @@ const propTypesWithoutAnnotation = {
objectOf: PropTypes.objectOf(PropTypes.number.isRequired).isRequired,
shape: PropTypes.shape(innerProps).isRequired,
optionalNumber: PropTypes.number,
customProp: (() => null) as PropTypes.Validator<typeof uniqueType | undefined>
customProp: (() => null) as PropTypes.Validator<typeof uniqueType | undefined>,
component: PropTypes.elementType.isRequired
};
const partialPropTypes = {
@@ -150,6 +153,7 @@ type ExtractFromOuterPropsMatch4 = Props extends ExtractedPropsFromOuterPropsWit
type ExtractPropsMismatch = ExtractedPartialProps extends Props ? true : false;
PropTypes.checkPropTypes({ xs: PropTypes.array }, { xs: [] }, 'location', 'componentName');
PropTypes.resetWarningCache();
// This would be the type that JSX sees
type Defaultize<T, D> =
+4
View File
@@ -1,6 +1,7 @@
// Type definitions for proper-lockfile 3.0
// Project: https://github.com/moxystudio/node-proper-lockfile
// Definitions by: Nikita Volodin <https://github.com/qlonik>
// Linus Unnebäck <https://github.com/LinusU>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export interface LockOptions {
@@ -10,17 +11,20 @@ export interface LockOptions {
realpath?: boolean; // default: true
fs?: any; // default: graceful-fs
onCompromised?: (err: Error) => any; // default: (err) => throw err
lockfilePath?: string; // default: `${file}.lock`
}
export interface UnlockOptions {
realpath?: boolean; // default: true
fs?: any; // default: graceful-fs
lockfilePath?: string; // default: `${file}.lock`
}
export interface CheckOptions {
stale?: number; // default: 10000
realpath?: boolean; // default: true
fs?: any; // default: graceful-fs
lockfilePath?: string; // default: `${file}.lock`
}
export function lock(file: string, options?: LockOptions): Promise<() => Promise<void>>;
@@ -39,7 +39,12 @@ check('some/file')
// isLocked will be true if 'some/file' is locked, false otherwise
});
lock('', { lockfilePath: 'some/file-lock' })
.then((release) => release());
const release = lockSync('some/file'); // $ExpectType () => void
release(); // $ExpectType void
unlockSync('some/file'); // $ExpectType void
unlockSync('', { lockfilePath: 'some/file-lock' }); // $ExpectType void
checkSync('some/file'); // $ExpectType boolean
checkSync('', { lockfilePath: 'some/file-lock' }); // $ExpectType boolean
+18 -18
View File
@@ -22,7 +22,7 @@ import { EditorProps, EditorView } from 'prosemirror-view';
* This is the type passed to the [`Plugin`](#state.Plugin)
* constructor. It provides a definition for a plugin.
*/
export interface PluginSpec<S extends Schema = any> {
export interface PluginSpec<T = any, S extends Schema = any> {
/**
* The [view props](#view.EditorProps) added by this plugin. Props
* that are functions will be bound to have the plugin instance as
@@ -33,14 +33,14 @@ export interface PluginSpec<S extends Schema = any> {
* Allows a plugin to define a [state field](#state.StateField), an
* extra slot in the state object in which it can keep its own data.
*/
state?: StateField<any, S> | null;
state?: StateField<T, S> | null;
/**
* Can be used to make this a keyed plugin. You can have only one
* plugin with a given key in a given state, but it is possible to
* access the plugin's configuration and state through the key,
* without having access to the plugin instance object.
*/
key?: PluginKey<S> | null;
key?: PluginKey<T, S> | null;
/**
* When the plugin needs to interact with the editor view, or
* set something up in the DOM, use this field. The function
@@ -82,11 +82,11 @@ export interface PluginSpec<S extends Schema = any> {
* They are part of the [editor state](#state.EditorState) and
* may influence that state and the view that contains it.
*/
export class Plugin<S extends Schema = any> {
export class Plugin<T = any, S extends Schema = any> {
/**
* Create a plugin.
*/
constructor(spec: PluginSpec<S>);
constructor(spec: PluginSpec<T, S>);
/**
* The [props](#view.EditorProps) exported by this plugin.
*/
@@ -94,11 +94,11 @@ export class Plugin<S extends Schema = any> {
/**
* The plugin's [spec object](#state.PluginSpec).
*/
spec: { [key: string]: any };
spec: PluginSpec<T, S>;
/**
* Extract the plugin's state field from an editor state.
*/
getState(state: EditorState<S>): any;
getState(state: EditorState<S>): T;
}
/**
* A plugin spec may provide a state field (under its
@@ -106,7 +106,7 @@ export class Plugin<S extends Schema = any> {
* describes the state it wants to keep. Functions provided here are
* always called with the plugin instance as their `this` binding.
*/
export interface StateField<T, S extends Schema = Schema> {
export interface StateField<T = any, S extends Schema = Schema> {
/**
* Initialize the value of the field. `config` will be the object
* passed to [`EditorState.create`](#state.EditorState^create). Note
@@ -138,7 +138,7 @@ export interface StateField<T, S extends Schema = Schema> {
* editor state. Assigning a key does mean only one plugin of that
* type can be active in a state.
*/
export class PluginKey<S extends Schema = any> {
export class PluginKey<T = any, S extends Schema = any> {
/**
* Create a plugin key.
*/
@@ -147,7 +147,7 @@ export class PluginKey<S extends Schema = any> {
* Get the active plugin with this key, if any, from an editor
* state.
*/
get(state: EditorState<S>): Plugin<S> | null | undefined;
get(state: EditorState<S>): Plugin<T, S> | null | undefined;
/**
* Get the plugin's state from an editor state.
*/
@@ -440,7 +440,7 @@ export class EditorState<S extends Schema = any> {
/**
* The plugins that are active in this state.
*/
plugins: Array<Plugin<S>>;
plugins: Array<Plugin<any, S>>;
/**
* Apply the given transaction to produce a new state.
*/
@@ -465,13 +465,13 @@ export class EditorState<S extends Schema = any> {
* [`init`](#state.StateField.init) method, passing in the new
* configuration object..
*/
reconfigure(config: { schema?: S | null; plugins?: Array<Plugin<S>> | null }): EditorState<S>;
reconfigure(config: { schema?: S | null; plugins?: Array<Plugin<any, S>> | null }): EditorState<S>;
/**
* Serialize this state to JSON. If you want to serialize the state
* of plugins, pass an object mapping property names to use in the
* resulting JSON object to plugin objects.
*/
toJSON(pluginFields?: { [name: string]: Plugin<S> } | string | number): { [key: string]: any };
toJSON(pluginFields?: { [name: string]: Plugin<any, S> } | string | number): { [key: string]: any };
/**
* Create a new state.
*/
@@ -480,7 +480,7 @@ export class EditorState<S extends Schema = any> {
doc?: ProsemirrorNode<S> | null;
selection?: Selection<S> | null;
storedMarks?: Mark[] | null;
plugins?: Array<Plugin<S>> | null;
plugins?: Array<Plugin<any, S>> | null;
}): EditorState<S>;
/**
* Deserialize a JSON representation of a state. `config` should
@@ -490,9 +490,9 @@ export class EditorState<S extends Schema = any> {
* instances with the property names they use in the JSON object.
*/
static fromJSON<S extends Schema = any>(
config: { schema: S; plugins?: Array<Plugin<S>> | null },
config: { schema: S; plugins?: Array<Plugin<any, S>> | null },
json: { [key: string]: any },
pluginFields?: { [name: string]: Plugin<S> }
pluginFields?: { [name: string]: Plugin<any, S> }
): EditorState<S>;
}
/**
@@ -589,11 +589,11 @@ export class Transaction<S extends Schema = any> extends Transform<S> {
* Store a metadata property in this transaction, keyed either by
* name or by plugin.
*/
setMeta(key: string | Plugin | PluginKey, value: any): Transaction;
setMeta(key: string | Plugin<any, S> | PluginKey<any, S>, value: any): Transaction;
/**
* Retrieve a metadata property for a given name or plugin.
*/
getMeta(key: string | Plugin | PluginKey): any;
getMeta(key: string | Plugin<any, S> | PluginKey<any, S>): any;
/**
* Returns true if this transaction doesn't contain any metadata,
* and can thus safely be extended.
+1
View File
@@ -79,6 +79,7 @@ export class Decoration {
pos: number,
toDOM: ((view: EditorView, getPos: () => number) => Node) | Node,
spec?: {
[key: string]: any;
side?: number | null;
marks?: Mark[] | null;
stopEvent?: ((event: Event) => boolean) | null;
+2 -2
View File
@@ -2180,7 +2180,7 @@ class Rectangle {
this.colors = Array.prototype.slice.call(arguments, 1);
}
Circle.prototype.area = () => Math.PI * Math.pow(this.r, 2);
Circle.prototype.area = function() { return Math.PI * Math.pow(this.r, 2); };
const circleN = R.constructN(2, Circle);
let c1 = circleN(1, "red");
@@ -2623,7 +2623,7 @@ class Rectangle {
const Why: any = ((val: boolean) => {
const why = {} as any;
why.val = val;
why.and = (x: boolean) => this.val && x;
why.and = function(x: boolean) { return this.val && x; };
return Why;
})(true);
const why = new Why(true);
+14
View File
@@ -0,0 +1,14 @@
import BigCalendar, { BigCalendarProps, Event, stringOrDate } from '../../index';
import * as React from 'react';
interface withDragAndDropProps<TEvent> {
onEventDrop?: (args: { event: TEvent, start: stringOrDate, end: stringOrDate, allDay: boolean }) => void;
onEventResize?: (args: { event: TEvent, start: stringOrDate, end: stringOrDate, allDay: boolean }) => void;
resizable?: boolean;
}
declare class DragAndDropCalendar<TEvent extends Event = Event, TResource extends object = object>
extends React.Component<BigCalendarProps<TEvent, TResource> & withDragAndDropProps<TEvent>> {}
declare function withDragAndDrop(calendar: typeof BigCalendar): typeof DragAndDropCalendar;
export default withDragAndDrop;
@@ -1,6 +1,7 @@
import * as React from "react";
import * as ReactDOM from "react-dom";
import BigCalendar, { BigCalendarProps, Navigate, View, DateRange, DateLocalizer, ToolbarProps, EventWrapperProps } from "react-big-calendar";
import withDragAndDrop from "react-big-calendar/lib/addons/dragAndDrop";
// Don't want to add this as a dependency, because it is only used for tests.
declare const globalize: any;
@@ -60,6 +61,30 @@ class CalendarResource {
ReactDOM.render(<Basic localizer={localizer} />, document.body);
}
// Drag and Drop Example Test
{
interface Props {
localizer: DateLocalizer;
}
const DragAndDropCalendar = withDragAndDrop(BigCalendar);
const DnD = ({ localizer }: Props) => (
<DragAndDropCalendar
events={getEvents()}
views={allViews}
step={60}
showMultiDayTimes
defaultDate={new Date(2015, 3, 1)}
localizer={localizer}
onEventDrop={console.log}
onEventResize={console.log}
/>
);
const localizer = BigCalendar.momentLocalizer(moment);
ReactDOM.render(<DnD localizer={localizer} />, document.body);
}
{
class MyCalendar extends BigCalendar<CalendarEvent, CalendarResource> {}
+3 -2
View File
@@ -20,6 +20,7 @@
},
"files": [
"index.d.ts",
"react-big-calendar-tests.tsx"
"react-big-calendar-tests.tsx",
"lib/addons/dragAndDrop.d.ts"
]
}
}
+1 -1
View File
@@ -51,7 +51,7 @@ declare namespace ReactCrop {
function getPixelCrop(image: HTMLImageElement, percentCrop: Crop): Crop;
function makeAspectCrop(crop: Crop, imageAspect: number): Crop;
function containCrop(crop: Crop, imageAspect: number): Crop;
function containCrop(previousCrop: Crop, crop: Crop, imageAspect: number): Crop;
}
declare class ReactCrop extends Component<ReactCrop.ReactCropProps> {
+11 -11
View File
@@ -33,11 +33,11 @@ export interface Polyfill {
Fetch: PolyfillFetch;
}
export declare class PolyfillFetch extends RNFetchBlobFetchPolyfill {
export class PolyfillFetch extends RNFetchBlobFetchPolyfill {
constructor(config: RNFetchBlobConfig);
}
export declare class RNFetchBlobFetchPolyfill {
export class RNFetchBlobFetchPolyfill {
constructor(config: RNFetchBlobConfig);
build(): (url: string, options: RNFetchBlobConfig) => StatefulPromise<RNFetchBlobFetchRepsonse>;
@@ -129,13 +129,13 @@ export interface PolyfillFileReader extends EventTarget {
result: number;
}
export declare namespace PolyfillFileReader {
export namespace PolyfillFileReader {
const EMPTY: number;
const LOADING: number;
const DONE: number;
}
export declare class PolyfillEvent {
export class PolyfillEvent {
}
export interface PolyfillProgressEvent extends EventTarget {
@@ -144,7 +144,7 @@ export interface PolyfillProgressEvent extends EventTarget {
total: number;
}
export declare class PolyfillBlob extends EventTarget {
export class PolyfillBlob extends EventTarget {
/**
* RNFetchBlob Blob polyfill, create a Blob directly from file path, BASE64
* encoded data, and string. The conversion is done implicitly according to
@@ -194,7 +194,7 @@ export declare class PolyfillBlob extends EventTarget {
close(): Promise<void>;
}
export declare namespace PolyfillBlob {
export namespace PolyfillBlob {
function clearCache(): void;
function build(data: any, cType: any): Promise<PolyfillBlob>;
@@ -202,7 +202,7 @@ export declare namespace PolyfillBlob {
function setLog(level: number): void;
}
export declare class PolyfillFile extends PolyfillBlob {
export class PolyfillFile extends PolyfillBlob {
}
export interface PolyfillXMLHttpRequest extends PolyfillXMLHttpRequestEventTarget {
@@ -252,7 +252,7 @@ export interface PolyfillXMLHttpRequest extends PolyfillXMLHttpRequestEventTarge
responseType: string;
}
export declare namespace PolyfillXMLHttpRequest {
export namespace PolyfillXMLHttpRequest {
const binaryContentTypes: string[];
const UNSENT: number;
const OPENED: number;
@@ -490,7 +490,7 @@ export interface StatefulPromise<T> extends Promise<T> {
expire(callback: () => void): StatefulPromise<void>;
}
export declare class RNFetchBlobSession {
export class RNFetchBlobSession {
constructor(name: string, list: string[]);
add(path: string): RNFetchBlobSession;
@@ -609,10 +609,10 @@ export interface RNFetchBlobStream {
onEnd(): void;
}
export declare class RNFetchBlobFile {
export class RNFetchBlobFile {
}
export declare class RNFetchBlobStat {
export class RNFetchBlobStat {
lastModified: string;
size: string;
type: "directory" | "file";
+1
View File
@@ -7,6 +7,7 @@
// Maxime Billemaz <https://github.com/MBillemaz>
// Georg Steinmetz <https://github.com/georg94>
// Troy Zarger <https://github.com/tzarger>
// Siya Mzam <https://github.com/vegtelenseg>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
+5
View File
@@ -166,6 +166,11 @@ interface DropdownListProps extends ReactWidgetsCommonDropdownProps<DropdownList
* when false the SelectList will render as a list of radio buttons, and checkboxes when true.
*/
multiple?: boolean;
/**
* Adds a css class to the input container element.
*/
containerClassName?: string;
}
interface DropdownListMessages {
@@ -94,6 +94,9 @@ class Test extends React.Component<React.Props<{}>> {
name="list"
multiple={false}
/>
<DropdownList
containerClassName="list-items"
/>
<Multiselect
autoFocus
allowCreate
+6
View File
@@ -0,0 +1,6 @@
{
"private": true,
"dependencies": {
"safe-buffer": "*"
}
}
+1 -1
View File
@@ -10,7 +10,7 @@ Rivets.configure({
// Template delimiters for text bindings
templateDelimiters: ['[[', ']]'],
// Augment the event handler of the on-* binder
handler: (target: any, event: any, binding: any) => {
handler(target: any, event: any, binding: any) {
this.call(target, event, binding.view.models);
}
});
+11 -11
View File
@@ -33,11 +33,11 @@ export interface Polyfill {
Fetch: PolyfillFetch;
}
export declare class PolyfillFetch extends RNFetchBlobFetchPolyfill {
export class PolyfillFetch extends RNFetchBlobFetchPolyfill {
constructor(config: RNFetchBlobConfig);
}
export declare class RNFetchBlobFetchPolyfill {
export class RNFetchBlobFetchPolyfill {
constructor(config: RNFetchBlobConfig);
build(): (url: string, options: RNFetchBlobConfig) => StatefulPromise<RNFetchBlobFetchRepsonse>;
@@ -129,13 +129,13 @@ export interface PolyfillFileReader extends EventTarget {
result: number;
}
export declare namespace PolyfillFileReader {
export namespace PolyfillFileReader {
const EMPTY: number;
const LOADING: number;
const DONE: number;
}
export declare class PolyfillEvent {
export class PolyfillEvent {
}
export interface PolyfillProgressEvent extends EventTarget {
@@ -144,7 +144,7 @@ export interface PolyfillProgressEvent extends EventTarget {
total: number;
}
export declare class PolyfillBlob extends EventTarget {
export class PolyfillBlob extends EventTarget {
/**
* RNFetchBlob Blob polyfill, create a Blob directly from file path, BASE64
* encoded data, and string. The conversion is done implicitly according to
@@ -194,7 +194,7 @@ export declare class PolyfillBlob extends EventTarget {
close(): Promise<void>;
}
export declare namespace PolyfillBlob {
export namespace PolyfillBlob {
function clearCache(): void;
function build(data: any, cType: any): Promise<PolyfillBlob>;
@@ -202,7 +202,7 @@ export declare namespace PolyfillBlob {
function setLog(level: number): void;
}
export declare class PolyfillFile extends PolyfillBlob {
export class PolyfillFile extends PolyfillBlob {
}
export interface PolyfillXMLHttpRequest extends PolyfillXMLHttpRequestEventTarget {
@@ -252,7 +252,7 @@ export interface PolyfillXMLHttpRequest extends PolyfillXMLHttpRequestEventTarge
responseType: string;
}
export declare namespace PolyfillXMLHttpRequest {
export namespace PolyfillXMLHttpRequest {
const binaryContentTypes: string[];
const UNSENT: number;
const OPENED: number;
@@ -490,7 +490,7 @@ export interface StatefulPromise<T> extends Promise<T> {
expire(callback: () => void): StatefulPromise<void>;
}
export declare class RNFetchBlobSession {
export class RNFetchBlobSession {
constructor(name: string, list: string[]);
add(path: string): RNFetchBlobSession;
@@ -609,10 +609,10 @@ export interface RNFetchBlobStream {
onEnd(): void;
}
export declare class RNFetchBlobFile {
export class RNFetchBlobFile {
}
export declare class RNFetchBlobStat {
export class RNFetchBlobStat {
lastModified: string;
size: string;
type: "directory" | "file";
+1 -1
View File
@@ -8,7 +8,7 @@ var app = angular.module('testModule');
interface AppScope extends rx.angular.IRxScope {
}
app.controller('Ctrl', ($scope: AppScope) => {
app.controller('Ctrl', function ($scope: AppScope) {
this.inputObservable = $scope.$toObservable('term')
.safeApply($scope, (results: any) => {
+1 -1
View File
@@ -1242,7 +1242,7 @@ s.query( '' );
s.query( '' ).then( function( res ) {} );
s.query( { query : 'select ? as foo, ? as bar', values : [1, 2] }, { raw : true, replacements : [1, 2] } );
s.query( '', { raw : true, nest : false } );
s.query( 'select ? as foo, ? as bar', { type : this.sequelize.QueryTypes.SELECT, replacements : [1, 2] } );
s.query( 'select ? as foo, ? as bar', { type : sequelize.QueryTypes.SELECT, replacements : [1, 2] } );
s.query( { query : 'select ? as foo, ? as bar', values : [1, 2] }, { type : s.QueryTypes.SELECT } );
s.query( 'select :one as foo, :two as bar', { raw : true, replacements : { one : 1, two : 2 } } );
s.transaction().then( function( t ) { s.set( { foo : 'bar' }, { transaction : t } ); } );
+1 -1
View File
@@ -1140,7 +1140,7 @@ s.query( '' );
s.query( '' ).then( function( res ) {} );
s.query( { query : 'select ? as foo, ? as bar', values : [1, 2] }, { raw : true, replacements : [1, 2] } );
s.query( '', { raw : true, nest : false } );
s.query( 'select ? as foo, ? as bar', { type : this.sequelize.QueryTypes.SELECT, replacements : [1, 2] } );
s.query( 'select ? as foo, ? as bar', { type : sequelize.QueryTypes.SELECT, replacements : [1, 2] } );
s.query( { query : 'select ? as foo, ? as bar', values : [1, 2] }, { type : s.QueryTypes.SELECT } );
s.query( 'select :one as foo, :two as bar', { raw : true, replacements : { one : 1, two : 2 } } );
s.transaction().then( function( t ) { s.set( { foo : 'bar' }, { transaction : t } ); } );
+1 -1
View File
@@ -1,5 +1,5 @@
// Type definitions for signale 1.2
// Project: https://github.com/klauscfhq/signale
// Project: https://github.com/klaussinani/signale
// Definitions by: Resi Respati <https://github.com/resir014>
// Kingdaro <https://github.com/kingdaro>
// Joydip Roy <https://github.com/rjoydip>
+3 -3
View File
@@ -10,7 +10,7 @@ server = simplesmtp.createSimpleServer({
name: "localhost",
secureConnection: false,
SMTPBanner: "Hoi dit is de test server",
timeout: this.timeout,
timeout: (this as any).timeout,
ignoreTLS: true
}, (req: simplesmtp.SimpleServerConnection) => {
req.on("data", (chunk: Buffer): void => {
@@ -21,10 +21,10 @@ server = simplesmtp.createSimpleServer({
});
req.accept("12");
});
this._server.server.on("authorizeUser",
(this as any)._server.server.on("authorizeUser",
(envelope: any, username: string|Buffer, password: string, callback: (error: Error, success: boolean) => void
): void => {
callback(null, true);
});
this._server.listen(this.port, "0.0.0.0", (error?: Error): void => {
(this as any)._server.listen(this.port, "0.0.0.0", (error?: Error): void => {
});
+1 -1
View File
@@ -399,7 +399,7 @@ declare namespace Sinon {
* The Promise library can be overwritten using the usingPromise method.
* Since sinon@2.0.0
*/
resolves(value?: TReturnValue extends Promise<infer TResolveValue> ? TResolveValue : never): SinonStub<TArgs, TReturnValue>;
resolves(value?: TReturnValue extends PromiseLike<infer TResolveValue> ? TResolveValue : never): SinonStub<TArgs, TReturnValue>;
/**
* Causes the stub to return a Promise which resolves to the argument at the provided index.
* stub.resolvesArg(0); causes the stub to return a Promise which resolves to the first argument.
+5 -1
View File
@@ -1,4 +1,5 @@
import sinon = require("sinon");
import Bluebird = require("bluebird");
function testSandbox() {
const obj = {};
@@ -426,6 +427,7 @@ function testStub() {
const obj = class {
foo() { }
promiseFunc() { return Promise.resolve('foo'); }
promiseLikeFunc() { return {} as any as Bluebird<string>; }
};
const instance = new obj();
@@ -434,10 +436,12 @@ function testStub() {
const spy: sinon.SinonSpy = stub;
function promiseFunc(n: number) { return Promise.resolve('foo'); }
const promiseStub = sinon.stub(instance, 'promiseFunc');
promiseStub.resolves('test');
const promiseLikeStub = sinon.stub(instance, 'promiseLikeFunc');
promiseLikeStub.resolves('test');
sinon.stub(instance);
stub.reset();
+1 -1
View File
@@ -289,7 +289,7 @@ export class Editor extends React.Component<EditorProps, EditorState> implements
moveToStartOfPreviousText: CoreEditor['moveToStartOfPreviousText'];
moveToStartOfText: CoreEditor['moveToStartOfText'];
moveToRangeOfDocument: CoreEditor['moveToRangeOfDocument'];
moveToRangeOf: CoreEditor['moveToRangeOf'];
moveToRangeOfNode: CoreEditor['moveToRangeOfNode'];
select: CoreEditor['select'];
addMarkAtRange: CoreEditor['addMarkAtRange'];
deleteAtRange: CoreEditor['deleteAtRange'];
+1 -1
View File
@@ -220,7 +220,7 @@ editor
.moveToEndOfPreviousText()
.moveToEndOfText()
.moveToFocus()
.moveToRangeOf(inline)
.moveToRangeOfNode(inline)
.moveToRangeOfDocument()
.moveToStart()
.moveToStartOfBlock()
+10 -5
View File
@@ -1,4 +1,4 @@
// Type definitions for slate 0.43
// Type definitions for slate 0.44
// Project: https://github.com/ianstormtaylor/slate
// Definitions by: Andy Kent <https://github.com/andykent>
// Jamie Talbot <https://github.com/majelbstoat>
@@ -8,6 +8,7 @@
// Francesco Agnoletto <https://github.com/Kornil>
// Irwan Fario Subastian <https://github.com/isubasti>
// Hanna Greaves <https://github.com/sgreav>
// Jack Allen <https://github.com/jackall3n>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
import * as Immutable from "immutable";
@@ -401,8 +402,6 @@ declare class BaseNode<
findDescendants(iterator: (node: Node) => boolean): Node | null;
getActiveMarksAtRange(range: Range): Immutable.Set<Mark>;
getAncestors(path: Path): Immutable.List<Node> | null;
getBlocksAtRange(range: Range): Immutable.List<Block>;
getBlocksAtRangeAsArray(range: Range): Block[];
getBlocks(): Immutable.List<Block>;
getBlocksAsArray(): Block[];
getBlocksByType(type: string): Immutable.List<Block>;
@@ -432,6 +431,8 @@ declare class BaseNode<
getInsertMarksAtRange(range: Range): Immutable.Set<Mark>;
getKeysToPathsTable(): object;
getLastText(): Text | null;
getLeafBlocksAtRange(range: Range): Immutable.List<Block>;
getLeafBlocksAtRangeAsArray(range: Range): Block[];
getMarks(): Immutable.Set<Mark>;
getMarksAsArray(): Mark[];
getMarksAtPosition(key: string, offset: number): Immutable.Set<Mark>;
@@ -460,6 +461,8 @@ declare class BaseNode<
getPreviousNode(path: Path): Node | null;
getPreviousSibling(path: Path): Node | null;
getPreviousText(path: Path): Text | null;
getRootBlocksAtRange(range: Range): Immutable.List<Block>;
getRootInlinesAtRange(range: Range): Immutable.List<Block>;
getSelectionIndexes(
range: Range,
isSelected?: boolean
@@ -883,6 +886,8 @@ export type ErrorCode =
| "child_required"
| "child_type_invalid"
| "child_unknown"
| "child_min_invalid"
| "child_max_invalid"
| "first_child_object_invalid"
| "first_child_type_invalid"
| "last_child_object_invalid"
@@ -1144,7 +1149,7 @@ export class Editor implements Controller {
moveToStartOfPreviousText(): Editor;
moveToStartOfText(): Editor;
moveToRangeOfDocument(): Editor;
moveToRangeOf(node: Node): Editor;
moveToRangeOfNode(node: Node): Editor;
select(properties: Range | RangeProperties): Editor;
addMarkAtRange(range: Range, mark: Mark | MarkProperties | string): Editor;
deleteAtRange(range: Range): Editor;
@@ -1933,7 +1938,7 @@ export interface Controller {
/**
* Move the current selection's anchor to the start of the provided node and its focus to the end of it.
*/
moveToRangeOf(node: Node): Controller;
moveToRangeOfNode(node: Node): Controller;
/**
* Merge the current selection with the provided properties
*/
+1 -1
View File
@@ -210,7 +210,7 @@ editor
.moveToEndOfPreviousText()
.moveToEndOfText()
.moveToFocus()
.moveToRangeOf(inline)
.moveToRangeOfNode(inline)
.moveToRangeOfDocument()
.moveToStart()
.moveToStartOfBlock()
+169 -72
View File
@@ -2,6 +2,7 @@
// Project: https://github.com/federicobond/solidity-parser-antlr
// Definitions by: Leonid Logvinov <https://github.com/LogvinovLeon>
// Alex Browne <https://github.com/albrow>
// Xiao Liang <https://github.com/yxliang01>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1
@@ -13,114 +14,208 @@ export interface Location {
start: LineColumn;
end: LineColumn;
}
// Note: This should be consistent with the definition of type ASTNode
export type ASTNodeTypeString = 'SourceUnit'
| 'PragmaDirective'
| 'PragmaName'
| 'PragmaValue'
| 'Version'
| 'VersionOperator'
| 'VersionConstraint'
| 'ImportDeclaration'
| 'ImportDirective'
| 'ContractDefinition'
| 'InheritanceSpecifier'
| 'ContractPart'
| 'StateVariableDeclaration'
| 'UsingForDeclaration'
| 'StructDefinition'
| 'ModifierDefinition'
| 'ModifierInvocation'
| 'FunctionDefinition'
| 'ReturnParameters'
| 'ModifierList'
| 'EventDefinition'
| 'EnumValue'
| 'EnumDefinition'
| 'ParameterList'
| 'Parameter'
| 'EventParameterList'
| 'EventParameter'
| 'FunctionTypeParameterList'
| 'FunctionTypeParameter'
| 'VariableDeclaration'
| 'TypeName'
| 'UserDefinedTypeName'
| 'Mapping'
| 'FunctionTypeName'
| 'StorageLocation'
| 'StateMutability'
| 'Block'
| 'Statement'
| 'ExpressionStatement'
| 'IfStatement'
| 'WhileStatement'
| 'SimpleStatement'
| 'ForStatement'
| 'InlineAssemblyStatement'
| 'DoWhileStatement'
| 'ContinueStatement'
| 'BreakStatement'
| 'ReturnStatement'
| 'ThrowStatement'
| 'VariableDeclarationStatement'
| 'IdentifierList'
| 'ElementaryTypeName'
| 'Expression'
| 'PrimaryExpression'
| 'ExpressionList'
| 'NameValueList'
| 'NameValue'
| 'FunctionCallArguments'
| 'AssemblyBlock'
| 'AssemblyItem'
| 'AssemblyExpression'
| 'AssemblyCall'
| 'AssemblyLocalDefinition'
| 'AssemblyAssignment'
| 'AssemblyIdentifierOrList'
| 'AssemblyIdentifierList'
| 'AssemblyStackAssignment'
| 'LabelDefinition'
| 'AssemblySwitch'
| 'AssemblyCase'
| 'AssemblyFunctionDefinition'
| 'AssemblyFunctionReturns'
| 'AssemblyFor'
| 'AssemblyIf'
| 'AssemblyLiteral'
| 'SubAssembly'
| 'TupleExpression'
| 'ElementaryTypeNameExpression'
| 'NumberLiteral'
| 'Identifier'
| 'BinaryOperation'
| 'Conditional';
export interface BaseASTNode {
type: string;
type: ASTNodeTypeString;
range?: [number, number];
loc?: Location;
}
export interface SourceUnit extends BaseASTNode {
type: 'SourceUnit';
children: ASTNode[]; // TODO: Can be more precise
} // tslint:disable-line:no-empty-interface
export interface PragmaDirective extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface PragmaName extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface PragmaValue extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface Version extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface VersionOperator extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface VersionConstraint extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface ImportDeclaration extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface ImportDirective extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface PragmaDirective extends BaseASTNode { type: 'PragmaDirective'; }
export interface PragmaName extends BaseASTNode { type: 'PragmaName'; }
export interface PragmaValue extends BaseASTNode { type: 'PragmaValue'; }
export interface Version extends BaseASTNode { type: 'Version'; }
export interface VersionOperator extends BaseASTNode { type: 'VersionOperator'; }
export interface VersionConstraint extends BaseASTNode { type: 'VersionConstraint'; }
export interface ImportDeclaration extends BaseASTNode { type: 'ImportDeclaration'; }
export interface ImportDirective extends BaseASTNode { type: 'ImportDirective'; }
export interface ContractDefinition extends BaseASTNode {
type: 'ContractDefinition';
name: string;
subNodes: ASTNode[]; // TODO: Can be more precise
}
export interface InheritanceSpecifier extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface ContractPart extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface InheritanceSpecifier extends BaseASTNode { type: 'InheritanceSpecifier'; }
export interface ContractPart extends BaseASTNode { type: 'ContractPart'; }
export interface StateVariableDeclaration extends BaseASTNode {
type: 'StateVariableDeclaration';
variables: VariableDeclaration[];
}
export interface UsingForDeclaration extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface StructDefinition extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface UsingForDeclaration extends BaseASTNode { type: 'UsingForDeclaration'; }
export interface StructDefinition extends BaseASTNode { type: 'StructDefinition'; }
export interface ModifierDefinition extends BaseASTNode {
type: 'ModifierDefinition';
name: string;
}
export interface ModifierInvocation extends BaseASTNode {
type: 'ModifierInvocation';
name: string;
}
export interface FunctionDefinition extends BaseASTNode {
type: 'FunctionDefinition';
name: string;
parameters: ParameterList;
body: Block | null;
}
export interface ReturnParameters extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface ModifierList extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface EventDefinition extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface EnumValue extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface EnumDefinition extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface ParameterList extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface Parameter extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface EventParameterList extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface EventParameter extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface FunctionTypeParameterList extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface FunctionTypeParameter extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface ReturnParameters extends BaseASTNode { type: 'ReturnParameters'; }
export interface ModifierList extends BaseASTNode { type: 'ModifierList'; }
export interface EventDefinition extends BaseASTNode { type: 'EventDefinition'; }
export interface EnumValue extends BaseASTNode { type: 'EnumValue'; }
export interface EnumDefinition extends BaseASTNode { type: 'EnumDefinition'; }
export interface ParameterList extends BaseASTNode { type: 'ParameterList'; }
export interface Parameter extends BaseASTNode { type: 'Parameter'; }
export interface EventParameterList extends BaseASTNode { type: 'EventParameterList'; }
export interface EventParameter extends BaseASTNode { type: 'EventParameter'; }
export interface FunctionTypeParameterList extends BaseASTNode { type: 'FunctionTypeParameterList'; }
export interface FunctionTypeParameter extends BaseASTNode { type: 'FunctionTypeParameter'; }
export interface VariableDeclaration extends BaseASTNode {
type: 'VariableDeclaration';
visibility: "public" | "private";
isStateVar: boolean;
}
export interface TypeName extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface UserDefinedTypeName extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface Mapping extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface FunctionTypeName extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface StorageLocation extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface StateMutability extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface Block extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface Statement extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface TypeName extends BaseASTNode { type: 'TypeName'; }
export interface UserDefinedTypeName extends BaseASTNode { type: 'UserDefinedTypeName'; }
export interface Mapping extends BaseASTNode { type: 'Mapping'; }
export interface FunctionTypeName extends BaseASTNode { type: 'FunctionTypeName'; }
export interface StorageLocation extends BaseASTNode { type: 'StorageLocation'; }
export interface StateMutability extends BaseASTNode { type: 'StateMutability'; }
export interface Block extends BaseASTNode { type: 'Block'; }
export interface Statement extends BaseASTNode { type: 'Statement'; }
export interface ExpressionStatement extends BaseASTNode {
type: 'ExpressionStatement';
expression: ASTNode;
}
export interface IfStatement extends BaseASTNode {
type: 'IfStatement';
trueBody: ASTNode;
falseBody: ASTNode;
}
export interface WhileStatement extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface SimpleStatement extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface ForStatement extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface InlineAssemblyStatement extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface DoWhileStatement extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface ContinueStatement extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface BreakStatement extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface ReturnStatement extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface ThrowStatement extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface VariableDeclarationStatement extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface IdentifierList extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface ElementaryTypeName extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface Expression extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface PrimaryExpression extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface ExpressionList extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface NameValueList extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface NameValue extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface FunctionCallArguments extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface AssemblyBlock extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface AssemblyItem extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface AssemblyExpression extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface AssemblyCall extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface AssemblyLocalDefinition extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface AssemblyAssignment extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface AssemblyIdentifierOrList extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface AssemblyIdentifierList extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface AssemblyStackAssignment extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface LabelDefinition extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface AssemblySwitch extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface AssemblyCase extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface AssemblyFunctionDefinition extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface AssemblyFunctionReturns extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface AssemblyFor extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface AssemblyIf extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface AssemblyLiteral extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface SubAssembly extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface TupleExpression extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface ElementaryTypeNameExpression extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface NumberLiteral extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface Identifier extends BaseASTNode {} // tslint:disable-line:no-empty-interface
export interface WhileStatement extends BaseASTNode { type: 'WhileStatement'; }
export interface SimpleStatement extends BaseASTNode { type: 'SimpleStatement'; }
export interface ForStatement extends BaseASTNode { type: 'ForStatement'; }
export interface InlineAssemblyStatement extends BaseASTNode { type: 'InlineAssemblyStatement'; }
export interface DoWhileStatement extends BaseASTNode { type: 'DoWhileStatement'; }
export interface ContinueStatement extends BaseASTNode { type: 'ContinueStatement'; }
export interface BreakStatement extends BaseASTNode { type: 'BreakStatement'; }
export interface ReturnStatement extends BaseASTNode { type: 'ReturnStatement'; }
export interface ThrowStatement extends BaseASTNode { type: 'ThrowStatement'; }
export interface VariableDeclarationStatement extends BaseASTNode { type: 'VariableDeclarationStatement'; }
export interface IdentifierList extends BaseASTNode { type: 'IdentifierList'; }
export interface ElementaryTypeName extends BaseASTNode { type: 'ElementaryTypeName'; }
export interface Expression extends BaseASTNode { type: 'Expression'; }
export interface PrimaryExpression extends BaseASTNode { type: 'PrimaryExpression'; }
export interface ExpressionList extends BaseASTNode { type: 'ExpressionList'; }
export interface NameValueList extends BaseASTNode { type: 'NameValueList'; }
export interface NameValue extends BaseASTNode { type: 'NameValue'; }
export interface FunctionCallArguments extends BaseASTNode { type: 'FunctionCallArguments'; }
export interface AssemblyBlock extends BaseASTNode { type: 'AssemblyBlock'; }
export interface AssemblyItem extends BaseASTNode { type: 'AssemblyItem'; }
export interface AssemblyExpression extends BaseASTNode { type: 'AssemblyExpression'; }
export interface AssemblyCall extends BaseASTNode { type: 'AssemblyCall'; }
export interface AssemblyLocalDefinition extends BaseASTNode { type: 'AssemblyLocalDefinition'; }
export interface AssemblyAssignment extends BaseASTNode { type: 'AssemblyAssignment'; }
export interface AssemblyIdentifierOrList extends BaseASTNode { type: 'AssemblyIdentifierOrList'; }
export interface AssemblyIdentifierList extends BaseASTNode { type: 'AssemblyIdentifierList'; }
export interface AssemblyStackAssignment extends BaseASTNode { type: 'AssemblyStackAssignment'; }
export interface LabelDefinition extends BaseASTNode { type: 'LabelDefinition'; }
export interface AssemblySwitch extends BaseASTNode { type: 'AssemblySwitch'; }
export interface AssemblyCase extends BaseASTNode { type: 'AssemblyCase'; }
export interface AssemblyFunctionDefinition extends BaseASTNode { type: 'AssemblyFunctionDefinition'; }
export interface AssemblyFunctionReturns extends BaseASTNode { type: 'AssemblyFunctionReturns'; }
export interface AssemblyFor extends BaseASTNode { type: 'AssemblyFor'; }
export interface AssemblyIf extends BaseASTNode { type: 'AssemblyIf'; }
export interface AssemblyLiteral extends BaseASTNode { type: 'AssemblyLiteral'; }
export interface SubAssembly extends BaseASTNode { type: 'SubAssembly'; }
export interface TupleExpression extends BaseASTNode { type: 'TupleExpression'; }
export interface ElementaryTypeNameExpression extends BaseASTNode { type: 'ElementaryTypeNameExpression'; }
export interface NumberLiteral extends BaseASTNode { type: 'NumberLiteral'; }
export interface Identifier extends BaseASTNode { type: 'Identifier'; }
export type BinOp =
| "+"
| "-"
@@ -153,11 +248,13 @@ export type BinOp =
| "/="
| "%=";
export interface BinaryOperation extends BaseASTNode {
type: 'BinaryOperation';
left: ASTNode;
right: ASTNode;
operator: BinOp;
}
export interface Conditional extends BaseASTNode {
type: 'Conditional';
trueExpression: ASTNode;
falseExpression: ASTNode;
}
+2
View File
@@ -3,6 +3,7 @@
// Definitions by: Festify Dev Team <https://github.com/Festify>
// Marcus Weiner <https://github.com/mraerino>
// Moritz Gunz <https://github.com/NeoLegends>
// Daniel Almaguer <https://github.com/deini>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1
@@ -118,6 +119,7 @@ declare namespace Spotify {
previousTrack(): Promise<void>;
resume(): Promise<void>;
seek(pos_ms: number): Promise<void>;
setName(name: string): Promise<void>;
setVolume(volume: number): Promise<void>;
togglePlay(): Promise<void>;
}
@@ -45,6 +45,10 @@ player.getVolume().then((volume: number) => {
console.log(`The volume of the player is ${volume_percentage}%`);
});
player.setName("New player name").then(() => {
console.log("Player name updated!");
});
player.setVolume(0.5).then(() => {
console.log("Volume updated!");
});
+2 -2
View File
@@ -359,7 +359,7 @@ new ssh2.Server({
}).on('end', () => {
console.log('Client disconnected');
});
}).listen(0, '127.0.0.1', () => {
}).listen(0, '127.0.0.1', function () {
console.log('Listening on port ' + this.address().port);
});
@@ -425,7 +425,7 @@ new ssh2.Server({
}).on('end', () => {
console.log('Client disconnected');
});
}).listen(0, '127.0.0.1', () => {
}).listen(0, '127.0.0.1', function () {
console.log('Listening on port ' + this.address().port);
});
+2 -2
View File
@@ -1,6 +1,6 @@
import stampit = require('stampit');
const a = stampit().init((options) => {
const a = stampit().init(function(options) {
const a = options.args[0];
this.getA = () => {
return a;
@@ -154,7 +154,7 @@ interface SomeStamp extends stampit.Stamp {
}
const SomeStamp = stampit()
.init((params: { a: number; b: boolean}) => {
.init(function(params: { a: number; b: boolean}) {
this.a = '' + a;
this.b = '' + b;
}) as SomeStamp;
+1 -1
View File
@@ -2,7 +2,7 @@
import stampit = require('stampit');
var a = stampit().init((options) => {
var a = stampit().init(function (options) {
var a = options.args[0];
this.getA = () => {
return a;
+10 -7
View File
@@ -5,6 +5,7 @@
// Adam Lavin <https://github.com/lavoaster>
// Jessica Franco <https://github.com/Jessidhia>
// Jason Killian <https://github.com/jkillian>
// Sebastian Silbermann <https://github.com/eps1lon>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.9
@@ -45,9 +46,9 @@ export type StyledProps<P> = ThemedStyledProps<P, AnyIfEmpty<DefaultTheme>>;
// Wrap in an outer-level conditional type to allow distribution over props that are unions
type Defaultize<P, D> = P extends any
? string extends keyof P ? P :
& Pick<P, Exclude<keyof P, keyof D>>
& Partial<Pick<P, Extract<keyof P, keyof D>>>
& Partial<Pick<D, Exclude<keyof D, keyof P>>>
& PickU<P, Exclude<keyof P, keyof D>>
& Partial<PickU<P, Extract<keyof P, keyof D>>>
& Partial<PickU<D, Exclude<keyof D, keyof P>>>
: never;
type ReactDefaultizedProps<C, P> = C extends { defaultProps: infer D; }
@@ -64,13 +65,13 @@ export type StyledComponentProps<
// The props that are made optional by .attrs
A extends keyof any
> = WithOptionalTheme<
Omit<
OmitU<
ReactDefaultizedProps<
C,
React.ComponentPropsWithRef<C>
> & O,
A
> & Partial<Pick<React.ComponentPropsWithRef<C> & O, A>>,
> & Partial<PickU<React.ComponentPropsWithRef<C> & O, A>>,
T
> & WithChildrenIfReactComponentClass<C>;
@@ -345,8 +346,10 @@ export type ThemedCssFunction<T extends object> = BaseThemedCssFunction<
>;
// Helper type operators
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
type WithOptionalTheme<P extends { theme?: T }, T> = Omit<P, "theme"> & {
// Pick that distributes over union types
export type PickU<T, K extends keyof T> = T extends any ? {[P in K]: T[P]} : never;
export type OmitU<T, K extends keyof T> = T extends any ? PickU<T, Exclude<keyof T, K>> : never;
type WithOptionalTheme<P extends { theme?: T }, T> = OmitU<P, "theme"> & {
theme?: T;
};
type AnyIfEmpty<T extends object> = keyof T extends never ? any : T;
+29
View File
@@ -1030,3 +1030,32 @@ const WrapperFunc = (props: WrapperProps) => <div />;
const StyledWrapperFunc = styled(WrapperFunc)``;
// No `children` in props, so this should generate an error
const wrapperFunc = <StyledWrapperFunc>Text</StyledWrapperFunc>; // $ExpectError
function unionTest() {
interface Book {
kind: 'book';
author: string;
}
interface Magazine {
kind: 'magazine';
issue: number;
}
type SomethingToRead = (Book | Magazine);
const Readable: React.FunctionComponent<SomethingToRead> = props => {
if (props.kind === 'magazine') {
return <div>magazine #{props.issue}</div>;
}
return <div>magazine #{props.author}</div>;
};
const StyledReadable = styled(Readable)`
font-size: ${props => props.kind === 'book' ? 16 : 14}
`;
<StyledReadable kind="book" author="Hejlsberg" />;
<StyledReadable kind="magazine" author="Hejlsberg" />; // $ExpectError
}
+2
View File
@@ -7,6 +7,7 @@
// Alec Zopf <https://github.com/zopf>
// Adam Haglund <https://github.com/beeequeue>
// Lukas Elmer <https://github.com/lukaselmer>
// Jesse Rogers <https://github.com/theQuazz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
@@ -116,6 +117,7 @@ declare namespace request {
type: string;
unauthorized: boolean;
xhr: XMLHttpRequest;
redirects: string[];
}
interface Request extends Promise<Response> {
+1
View File
@@ -202,6 +202,7 @@ request('/search')
const contentLength = res.header['content-length'];
const contentType: string = res.type;
const charset: string = res.charset;
const redirects: string[] = res.redirects;
});
// Getting response 'Set-Cookie'
+1
View File
@@ -89,6 +89,7 @@ declare namespace request {
forbidden: boolean;
xhr: XMLHttpRequest;
get(header: string): string;
redirects: string[];
}
interface Request extends Promise<Response> /* extends NodeJS.WritableStream */ {
+1
View File
@@ -181,6 +181,7 @@ request('/search')
const contentLength = res.header['content-length'];
const contentType: string = res.type;
const charset: string = res.charset;
const redirects: string[] = res.redirects;
});
// Custom parsers
@@ -1,6 +1,6 @@
var _vrEffect: THREE.VREffect;
_vrEffect = new THREE.VREffect(new THREE.WebGLRenderer({antialias: true}), (error) => {
_vrEffect = new THREE.VREffect(new THREE.WebGLRenderer({antialias: true}), function (error) {
if (error) {
this._stats.classList.add("error");
this._stats.innerHTML = "WebVR API not supported";
+1 -1
View File
@@ -502,7 +502,7 @@ describe('dest stream', () => {
const stream1 = vfs.dest('./out-fixtures/', { cwd: __dirname });
const stream2 = vfs.dest('./out-fixtures/', { cwd: __dirname });
const content = fs.readFileSync(srcPath);
const rename = through.obj((file: any, _: any, next: any) => {
const rename = through.obj(function(file: any, _: any, next: any) {
file.path = inputPath2;
this.push(file);
next();

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