mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
Remove // tslint:disable comments (#22198)
This commit is contained in:
@@ -6,8 +6,6 @@
|
||||
* License: MIT
|
||||
*/
|
||||
|
||||
/* tslint:disable:no-empty no-shadowed-variable */
|
||||
|
||||
class AuthService {
|
||||
/**
|
||||
* Holds all the requests which failed due to 401 response,
|
||||
|
||||
Vendored
+3
-5
@@ -280,11 +280,9 @@ export interface Big {
|
||||
export const Big: BigConstructor;
|
||||
|
||||
// Helpers to allow referencing Big and BigConstructor from inside the global declaration without creating a self reference
|
||||
/* tslint:disable:strict-export-declare-modifiers */
|
||||
type Big_ = Big;
|
||||
type BigConstructor_ = BigConstructor;
|
||||
type BigSource_ = BigSource;
|
||||
/* tslint:enable:strict-export-declare-modifiers */
|
||||
export type Big_ = Big;
|
||||
export type BigConstructor_ = BigConstructor;
|
||||
export type BigSource_ = BigSource;
|
||||
|
||||
declare global {
|
||||
namespace BigJs {
|
||||
|
||||
Vendored
-3
@@ -6,10 +6,7 @@
|
||||
|
||||
/// <reference types="jquery" />
|
||||
|
||||
/* tslint:disable: interface-name no-any */
|
||||
|
||||
interface JQueryStatic {
|
||||
/* tslint:enable: interface-name */
|
||||
notify(message: string): NotifyReturn;
|
||||
notify(opts: NotifyOptions, settings?: NotifySettings): NotifyReturn;
|
||||
notifyDefaults(settings: NotifySettings): void;
|
||||
|
||||
Vendored
+3
-9
@@ -16,12 +16,10 @@ import * as Promise from "bluebird";
|
||||
* Everytime the same queue is instantiated it tries to process all the old jobs that may exist from a previous unfinished session.
|
||||
*/
|
||||
declare const Bull: {
|
||||
// tslint:disable:unified-signatures
|
||||
(queueName: string, opts?: Bull.QueueOptions): Bull.Queue;
|
||||
(queueName: string, url?: string): Bull.Queue;
|
||||
(queueName: string, url?: string): Bull.Queue; // tslint:disable-line unified-signatures
|
||||
new (queueName: string, opts?: Bull.QueueOptions): Bull.Queue;
|
||||
new (queueName: string, url?: string): Bull.Queue;
|
||||
// tslint:enable:unified-signatures
|
||||
new (queueName: string, url?: string): Bull.Queue; // tslint:disable-line unified-signatures
|
||||
};
|
||||
|
||||
declare namespace Bull {
|
||||
@@ -520,8 +518,6 @@ declare namespace Bull {
|
||||
*/
|
||||
clean(grace: number, status?: JobStatus, limit?: number): Promise<Job[]>;
|
||||
|
||||
// tslint:disable:unified-signatures
|
||||
|
||||
/**
|
||||
* Listens to queue events
|
||||
*/
|
||||
@@ -566,7 +562,7 @@ declare namespace Bull {
|
||||
/**
|
||||
* The queue has been resumed
|
||||
*/
|
||||
on(event: 'resumed', callback: EventCallback): this;
|
||||
on(event: 'resumed', callback: EventCallback): this; // tslint:disable-line unified-signatures
|
||||
|
||||
/**
|
||||
* Old jobs have been cleaned from the queue.
|
||||
@@ -575,8 +571,6 @@ declare namespace Bull {
|
||||
* @see Queue#clean() for details
|
||||
*/
|
||||
on(event: 'cleaned', callback: CleanedEventCallback): this;
|
||||
|
||||
// tslint:enable:unified-signatures
|
||||
}
|
||||
|
||||
type EventCallback = () => void;
|
||||
|
||||
Vendored
-4
@@ -24,8 +24,6 @@ declare class Logger extends EventEmitter {
|
||||
fields: any;
|
||||
src: boolean;
|
||||
|
||||
/* tslint:disable:unified-signatures */
|
||||
|
||||
/**
|
||||
* Returns a boolean: is the `trace` level enabled?
|
||||
*
|
||||
@@ -199,8 +197,6 @@ declare class Logger extends EventEmitter {
|
||||
* Uses `util.format` for msg formatting.
|
||||
*/
|
||||
fatal(format: any, ...params: any[]): void;
|
||||
|
||||
/* tslint:enable:unified-signatures */
|
||||
}
|
||||
|
||||
declare namespace Logger {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
// ban-types needs to be disabled to support TypeScript <2.2
|
||||
"ban-types": false
|
||||
"ban-types": false,
|
||||
"unified-signatures": false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import convert = require("convert-source-map");
|
||||
|
||||
// tslint:disable:max-line-length
|
||||
|
||||
const json = convert
|
||||
// tslint:disable-next-line max-line-length
|
||||
.fromComment('//@ sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9vLmpzIiwic291cmNlcyI6WyJjb25zb2xlLmxvZyhcImhpXCIpOyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=')
|
||||
.toJSON();
|
||||
|
||||
const modified = convert
|
||||
// tslint:disable-next-line max-line-length
|
||||
.fromComment('//@ sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9vLmpzIiwic291cmNlcyI6WyJjb25zb2xlLmxvZyhcImhpXCIpOyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=')
|
||||
.setProperty('sources', ['CONSOLE.LOG("HI");'])
|
||||
.toJSON();
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// tslint:disable:object-literal-shorthand
|
||||
/**
|
||||
* Typescript definition tests for d3/d3-selection-multi module
|
||||
*
|
||||
@@ -28,7 +27,7 @@ selection = selection.attrs({
|
||||
foo: () => 1,
|
||||
bar: (d) => d,
|
||||
baz: (d, i) => i !== 0,
|
||||
bat: function() {
|
||||
bat() {
|
||||
return this.href;
|
||||
},
|
||||
});
|
||||
|
||||
File diff suppressed because one or more lines are too long
Vendored
-1
@@ -17,7 +17,6 @@
|
||||
* applicable laws.
|
||||
*/
|
||||
declare namespace ej {
|
||||
/* tslint:disable:no-empty-interface */
|
||||
const dataUtil: dataUtil;
|
||||
function isMobile(): boolean;
|
||||
function isIOS(): boolean;
|
||||
|
||||
@@ -12,6 +12,31 @@
|
||||
"no-redundant-jsdoc-2": false,
|
||||
"no-unnecessary-generics": false,
|
||||
"no-unnecessary-qualifier": false,
|
||||
"strict-export-declare-modifiers": false
|
||||
|
||||
"strict-export-declare-modifiers": false,
|
||||
"whitespace": false,
|
||||
"prefer-conditional-expression": false,
|
||||
"no-var-keyword": false,
|
||||
"object-literal-shorthand": false,
|
||||
"space-before-function-paren": false,
|
||||
"no-namespace": false,
|
||||
"no-internal-module": false,
|
||||
"only-arrow-functions": false,
|
||||
"no-empty-interface": false,
|
||||
"prefer-const": false,
|
||||
"max-line-length": false,
|
||||
"array-type": false,
|
||||
"ban-types": false,
|
||||
"semicolon": false,
|
||||
"object-literal-key-quotes": false,
|
||||
"one-variable-per-declaration": false,
|
||||
"triple-equals": false,
|
||||
"typedef-whitespace": false,
|
||||
"prefer-template": false,
|
||||
"no-duplicate-variable": false,
|
||||
"radix": false,
|
||||
"prefer-for-of": false,
|
||||
"one-line": false,
|
||||
"no-unnecessary-type-assertion": false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,3 @@
|
||||
// tslint:disable:no-trailing-whitespace
|
||||
// tslint:disable:prefer-method-signature
|
||||
// tslint:disable:no-single-declare-module
|
||||
// tslint:disable:only-arrow-functions
|
||||
// tslint:disable:space-before-function-paren
|
||||
|
||||
import * as L from 'leaflet';
|
||||
import 'esri-leaflet';
|
||||
|
||||
@@ -108,15 +102,15 @@ tiledMapLayer.metadata((err, metadata) => { });
|
||||
|
||||
tiledMapLayer.identify()
|
||||
.at(latlng)
|
||||
.run(function (error, featureCollection) { });
|
||||
.run((error, featureCollection) => {});
|
||||
tiledMapLayer.find()
|
||||
.layers('18')
|
||||
.text('Colorado')
|
||||
.run(function (error, featureCollection) { });
|
||||
.run((error, featureCollection) => {});
|
||||
tiledMapLayer.query()
|
||||
.layer(0)
|
||||
.within(latlngbounds)
|
||||
.run(function (error, featureCollection, response) { });
|
||||
.run((error, featureCollection, response) => {});
|
||||
|
||||
let dynamicMapLayer: L.esri.DynamicMapLayer;
|
||||
let dynamicMapLayerOptions: L.esri.DynamicMapLayerOptions;
|
||||
@@ -225,24 +219,24 @@ dynamicMapLayer = new L.esri.DynamicMapLayer({
|
||||
token: 'token'
|
||||
});
|
||||
|
||||
dynamicMapLayer.bindPopup(function (err, featureCollection, response) {
|
||||
dynamicMapLayer.bindPopup((err, featureCollection, response) => {
|
||||
const count = featureCollection.features.length;
|
||||
return (count) ? count + ' features' : false;
|
||||
});
|
||||
|
||||
dynamicMapLayer.metadata(function (error, metadata) { });
|
||||
dynamicMapLayer.metadata((error, metadata) => {});
|
||||
|
||||
dynamicMapLayer.identify()
|
||||
.at(latlng)
|
||||
.run(function (error, featureCollection) { });
|
||||
.run((error, featureCollection) => {});
|
||||
dynamicMapLayer.find()
|
||||
.layers('18')
|
||||
.text('Colorado')
|
||||
.run(function (error, featureCollection) { });
|
||||
.run((error, featureCollection) => {});
|
||||
dynamicMapLayer.query()
|
||||
.layer(0)
|
||||
.within(latlngbounds)
|
||||
.run(function (error, featureCollection, response) { });
|
||||
.run((error, featureCollection, response) => {});
|
||||
|
||||
let featureLayerOptions: L.esri.FeatureLayerOptions;
|
||||
let featureLayer: L.esri.FeatureLayer;
|
||||
@@ -324,20 +318,20 @@ featureLayer = new L.esri.FeatureLayer({
|
||||
featureLayer.setStyle({
|
||||
color: 'white'
|
||||
});
|
||||
featureLayer.setStyle(function (feature) {
|
||||
featureLayer.setStyle(feature => {
|
||||
return {
|
||||
weight: feature.properties.pixelWidth
|
||||
};
|
||||
});
|
||||
|
||||
featureLayer.eachFeature(function (layer) { });
|
||||
featureLayer.eachFeature(layer => {});
|
||||
|
||||
featureLayer.query()
|
||||
.within(latlngbounds)
|
||||
.where("Direction = 'WEST'")
|
||||
.run(function (error, featureCollection) { });
|
||||
.run((error, featureCollection) => {});
|
||||
|
||||
featureLayer.metadata(function (error, metadata) { });
|
||||
featureLayer.metadata((error, metadata) => {});
|
||||
|
||||
let mapServiceOptions: L.esri.MapServiceOptions;
|
||||
let mapService: L.esri.MapService;
|
||||
@@ -372,27 +366,27 @@ mapService = new L.esri.MapService({
|
||||
mapService.query()
|
||||
.layer(0)
|
||||
.within(latlngbounds)
|
||||
.run(function (error, featureCollection, response) { });
|
||||
.run((error, featureCollection, response) => {});
|
||||
mapService.identify()
|
||||
.on(map)
|
||||
.at(latlng)
|
||||
.run(function (error, featureCollection, response) { });
|
||||
.run((error, featureCollection, response) => {});
|
||||
mapService.find()
|
||||
.layers('18')
|
||||
.text('Colorado')
|
||||
.fields('name')
|
||||
.run(function (error, featureCollection, response) { });
|
||||
.run((error, featureCollection, response) => {});
|
||||
|
||||
mapService.identify()
|
||||
.on(map)
|
||||
.at([45.543, -122.621])
|
||||
.layers('visible:1')
|
||||
.run(function (error, featureCollection, response) { });
|
||||
.run((error, featureCollection, response) => {});
|
||||
mapService.find()
|
||||
.layers('18')
|
||||
.text('Colorado')
|
||||
.fields('GNIS_NAME')
|
||||
.run(function (error, featureCollection, response) { });
|
||||
.run((error, featureCollection, response) => {});
|
||||
|
||||
let imageServiceOptions: L.esri.ImageServiceOptions;
|
||||
let imageService: L.esri.ImageService;
|
||||
@@ -457,7 +451,7 @@ featureLayerService = new L.esri.FeatureLayerService({
|
||||
featureLayerService.query()
|
||||
.within(latlngbounds)
|
||||
.where("Direction = 'WEST'")
|
||||
.run(function (error, featureCollection, response) { });
|
||||
.run((error, featureCollection, response) => {});
|
||||
|
||||
const feature = {
|
||||
type: 'Feature',
|
||||
@@ -469,7 +463,7 @@ const feature = {
|
||||
name: 'Hello World'
|
||||
}
|
||||
};
|
||||
featureLayerService.addFeature(feature, function (error, response) { });
|
||||
featureLayerService.addFeature(feature, (error, response) => {});
|
||||
|
||||
const feature2 = {
|
||||
type: 'Feature',
|
||||
@@ -482,14 +476,14 @@ const feature2 = {
|
||||
name: 'Hi I\'m Feature 2'
|
||||
}
|
||||
};
|
||||
featureLayerService.updateFeature(feature2, function (error, response) { });
|
||||
featureLayerService.updateFeature(feature2, (error, response) => {});
|
||||
|
||||
featureLayerService.deleteFeature(2, function (error, response) { });
|
||||
featureLayerService.deleteFeature(2, (error, response) => {});
|
||||
|
||||
featureLayerService
|
||||
.query()
|
||||
.where("name='Hello World'")
|
||||
.run(function (error, featureCollection, response) { });
|
||||
.run((error, featureCollection, response) => {});
|
||||
|
||||
let queryOptions: L.esri.QueryOptions;
|
||||
let query: L.esri.Query;
|
||||
@@ -522,17 +516,17 @@ query = new L.esri.Query({
|
||||
});
|
||||
|
||||
query.within(latlngbounds);
|
||||
query.run(function (error, featureCollection, response) { });
|
||||
query.bounds(function (error, latLngBounds, response) { });
|
||||
query.run((error, featureCollection, response) => {});
|
||||
query.bounds((error, latLngBounds, response) => {});
|
||||
|
||||
query.nearby(latlng, 500);
|
||||
query.run(function (error, featureCollection, response) { });
|
||||
query.run((error, featureCollection, response) => {});
|
||||
|
||||
query.nearby(latlng, 2000).where("direction='East'").orderBy('stop_id', 'ASC');
|
||||
query.count(function (error, count, response) { });
|
||||
query.ids(function (error, ids, response) { });
|
||||
query.count((error, count, response) => {});
|
||||
query.ids((error, ids, response) => {});
|
||||
|
||||
query.where("zone_id='B'").bounds(function (error, latLngBounds, response) { });
|
||||
query.where("zone_id='B'").bounds((error, latLngBounds, response) => {});
|
||||
|
||||
query.transform(15851);
|
||||
query.transform({wkid: 15851 });
|
||||
@@ -574,7 +568,7 @@ identifyFeatures
|
||||
.on(map)
|
||||
.at([45.543, -122.621])
|
||||
.layers('visible:1')
|
||||
.run(function (error, featureCollection, response) { });
|
||||
.run((error, featureCollection, response) => {});
|
||||
|
||||
identifyFeatures.at(marker);
|
||||
identifyFeatures.at(polygon);
|
||||
@@ -614,9 +608,9 @@ find = new L.esri.Find({
|
||||
|
||||
find.layers('18')
|
||||
.text('Colorado');
|
||||
find.run(function (error, featureCollection, response) { });
|
||||
find.run((error, featureCollection, response) => {});
|
||||
|
||||
find.layers('13')
|
||||
.text('198133')
|
||||
.fields('GNIS_ID');
|
||||
find.run(function (error, featureCollection, response) { });
|
||||
find.run((error, featureCollection, response) => {});
|
||||
|
||||
@@ -273,9 +273,6 @@ switch (node.type) {
|
||||
case 'Program':
|
||||
program = node;
|
||||
break;
|
||||
case 'FunctionDeclaration':
|
||||
functionDeclaration = node
|
||||
break;
|
||||
case 'FunctionExpression':
|
||||
functionExpression = node
|
||||
break;
|
||||
@@ -367,18 +364,12 @@ switch (node.type) {
|
||||
case 'ObjectExpression':
|
||||
objectExpression = node;
|
||||
break;
|
||||
case 'FunctionExpression':
|
||||
functionExpression = node;
|
||||
break;
|
||||
case 'ArrowFunctionExpression':
|
||||
arrowFunctionExpression = node;
|
||||
break;
|
||||
case 'YieldExpression':
|
||||
yieldExpression = node;
|
||||
break;
|
||||
case 'Literal':
|
||||
literal = node;
|
||||
break;
|
||||
case 'UnaryExpression':
|
||||
unaryExpression = node;
|
||||
break;
|
||||
@@ -421,9 +412,6 @@ switch (node.type) {
|
||||
case 'MetaProperty':
|
||||
metaProperty = node;
|
||||
break;
|
||||
case 'Identifier':
|
||||
identifier = node;
|
||||
break;
|
||||
case 'AwaitExpression':
|
||||
awaitExpression = node;
|
||||
break;
|
||||
@@ -443,9 +431,6 @@ switch (node.type) {
|
||||
break;
|
||||
|
||||
// narrowing of Pattern
|
||||
case 'Identifier':
|
||||
identifier = node;
|
||||
break;
|
||||
case 'ObjectPattern':
|
||||
objectPattern = node;
|
||||
break;
|
||||
@@ -458,20 +443,11 @@ switch (node.type) {
|
||||
case 'AssignmentPattern':
|
||||
assignmentPattern = node;
|
||||
break;
|
||||
case 'MemberExpression':
|
||||
memberExpression = node;
|
||||
break;
|
||||
// end narrowing of Pattern
|
||||
|
||||
case 'ClassBody':
|
||||
classBody = node
|
||||
break;
|
||||
case 'ClassDeclaration':
|
||||
classDeclaration = node
|
||||
break;
|
||||
case 'ClassExpression':
|
||||
classExpression = node
|
||||
break;
|
||||
case 'MethodDefinition':
|
||||
methodDefinition = node
|
||||
break;
|
||||
|
||||
Vendored
+2
-6
@@ -281,12 +281,10 @@ declare namespace Ffmpeg {
|
||||
getAvailableFormats(callback: FormatsCallback): void;
|
||||
|
||||
// ffprobe
|
||||
/* tslint:disable:unified-signatures */
|
||||
ffprobe(callback: (err: any, data: FfprobeData) => void): void;
|
||||
ffprobe(index: number, callback: (err: any, data: FfprobeData) => void): void;
|
||||
ffprobe(options: string[], callback: (err: any, data: FfprobeData) => void): void;
|
||||
ffprobe(options: string[], callback: (err: any, data: FfprobeData) => void): void; // tslint:disable-line unified-signatures
|
||||
ffprobe(index: number, options: string[], callback: (err: any, data: FfprobeData) => void): void;
|
||||
/* tslint:enable:unified-signatures */
|
||||
|
||||
// recipes
|
||||
saveToFile(output: string): FfmpegCommand;
|
||||
@@ -306,12 +304,10 @@ declare namespace Ffmpeg {
|
||||
run(): void;
|
||||
}
|
||||
|
||||
/* tslint:disable:unified-signatures */
|
||||
function ffprobe(file: string, callback: (err: any, data: FfprobeData) => void): void;
|
||||
function ffprobe(file: string, index: number, callback: (err: any, data: FfprobeData) => void): void;
|
||||
function ffprobe(file: string, options: string[], callback: (err: any, data: FfprobeData) => void): void;
|
||||
function ffprobe(file: string, options: string[], callback: (err: any, data: FfprobeData) => void): void; // tslint:disable-line unified-signatures
|
||||
function ffprobe(file: string, index: number, options: string[], callback: (err: any, data: FfprobeData) => void): void;
|
||||
/* tslint:enable:unified-signatures */
|
||||
}
|
||||
declare function Ffmpeg(options?: Ffmpeg.FfmpegCommandOptions): Ffmpeg.FfmpegCommand;
|
||||
declare function Ffmpeg(input?: string | stream.Readable, options?: Ffmpeg.FfmpegCommandOptions): Ffmpeg.FfmpegCommand;
|
||||
|
||||
Vendored
-2
@@ -69,7 +69,6 @@ declare const got: got.GotFn &
|
||||
};
|
||||
|
||||
declare namespace got {
|
||||
// tslint:disable unified-signatures
|
||||
interface GotFn {
|
||||
(url: GotUrl): GotPromise<string>;
|
||||
(url: GotUrl, options: GotJSONOptions): GotPromise<any>;
|
||||
@@ -78,7 +77,6 @@ declare namespace got {
|
||||
(url: GotUrl, options: GotBodyOptions<string>): GotPromise<string>;
|
||||
(url: GotUrl, options: GotBodyOptions<null>): GotPromise<Buffer>;
|
||||
}
|
||||
// tslint:enable unified-signatures
|
||||
|
||||
type GotStreamFn = (url: GotUrl, options?: GotOptions<string | null>) => GotEmitter & nodeStream.Duplex;
|
||||
|
||||
|
||||
@@ -1 +1,7 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
// TODO
|
||||
"unified-signatures": false
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
-4
@@ -8,8 +8,6 @@ import bunyan = require('hexo-bunyan');
|
||||
import streams = require('stream');
|
||||
|
||||
declare class HexoLogger extends bunyan {
|
||||
/* tslint:disable:unified-signatures */
|
||||
|
||||
/**
|
||||
* Returns a boolean: is the `debug` level enabled?
|
||||
*
|
||||
@@ -154,8 +152,6 @@ declare class HexoLogger extends bunyan {
|
||||
* Uses `util.format` for msg formatting.
|
||||
*/
|
||||
log(format: any, ...params: any[]): void;
|
||||
|
||||
/* tslint:enable:unified-signatures */
|
||||
}
|
||||
|
||||
declare function createLogger(options?: { name?: string; silent?: boolean; debug?: boolean; }): HexoLogger;
|
||||
|
||||
@@ -1 +1,6 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
"unified-signatures": false
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-3
@@ -32,12 +32,10 @@ declare namespace images {
|
||||
}
|
||||
}
|
||||
|
||||
/* tslint:disable:unified-signatures */
|
||||
declare function images(file: string): images.ImagesStatic;
|
||||
declare function images(width: number, height: number): images.ImagesStatic;
|
||||
declare function images(buffer: Buffer, start?: number, end?: number): images.ImagesStatic;
|
||||
declare function images(image: images.ImagesStatic): images.ImagesStatic;
|
||||
declare function images(image: images.ImagesStatic): images.ImagesStatic; // tslint:disable-line unified-signatures
|
||||
declare function images(image: images.ImagesStatic, x: number, y: number, width: number, height: number): images.ImagesStatic;
|
||||
/* tslint:enable:unified-signatures */
|
||||
|
||||
export = images;
|
||||
|
||||
Vendored
-2
@@ -278,7 +278,6 @@ declare var Isotope: {
|
||||
};
|
||||
|
||||
interface JQuery {
|
||||
// tslint:disable:unified-signatures
|
||||
/**
|
||||
* Get the Isotope instance from a jQuery object. Isotope instances are useful to access Isotope properties.
|
||||
*/
|
||||
@@ -370,5 +369,4 @@ interface JQuery {
|
||||
* @param options All options are optional, but itemSelector is recommended. Layout modes have their own separate options.
|
||||
*/
|
||||
isotope(options: IsotopeLibrary.IsotopeOptions): JQuery;
|
||||
// tslint:enable
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
"no-empty-interface": false
|
||||
"no-empty-interface": false,
|
||||
"unified-signatures": false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -751,13 +751,12 @@ describe('FakeRequest', () => {
|
||||
});
|
||||
|
||||
describe("Jasmine Mock Ajax (for toplevel)", () => {
|
||||
// tslint:disable one-variable-per-declaration
|
||||
let request, anotherRequest, response;
|
||||
let success, error, complete;
|
||||
let client, onreadystatechange;
|
||||
// TODO: these are all `any`!
|
||||
let request, anotherRequest, response; // tslint:disable-line one-variable-per-declaration
|
||||
let success, error, complete; // tslint:disable-line one-variable-per-declaration
|
||||
let client, onreadystatechange; // tslint:disable-line one-variable-per-declaration
|
||||
const sharedContext: any = {};
|
||||
let fakeGlobal, mockAjax;
|
||||
// tslint:enable
|
||||
let fakeGlobal, mockAjax; // tslint:disable-line one-variable-per-declaration
|
||||
|
||||
beforeEach(() => {
|
||||
const fakeXMLHttpRequest = jasmine.createSpy('realFakeXMLHttpRequest');
|
||||
|
||||
Vendored
+2
-4
@@ -279,25 +279,23 @@ interface JQuery {
|
||||
* @param attributes A space-separated list of attribute names to remove.
|
||||
*/
|
||||
removeAttrs(attributes: string): any;
|
||||
// tslint:disable:unified-signatures
|
||||
/**
|
||||
* Adds the specified rules and returns all rules for the first matched element. Requires that the parent form is validated, that is, $( "form" ).validate() is called first.
|
||||
*
|
||||
* @param command "remove" or "add"
|
||||
* @param rules The rules to add. Accepts the same format as the rules-option of the validate-method.
|
||||
*/
|
||||
rules(command: "add", rules?: JQueryValidation.RulesDictionary): any;
|
||||
rules(command: "add", rules?: JQueryValidation.RulesDictionary): any; // tslint:disable-line unified-signatures
|
||||
/**
|
||||
* Removes the specified rules and returns all rules for the first matched element.
|
||||
* @param command "remove"
|
||||
* @param rules The space-seperated names of rules to remove and return. If left unspecified, removes and returns all rules. Manipulates only rules specified via rules-option or via rules("add").
|
||||
*/
|
||||
rules(command: "remove", rules?: string): any;
|
||||
rules(command: "remove", rules?: string): any; // tslint:disable-line unified-signatures
|
||||
/**
|
||||
* Returns the validation rules for teh first selected element.
|
||||
*/
|
||||
rules(): any;
|
||||
// tslint:enable
|
||||
/**
|
||||
* Checks whether the selected form is valid or whether all selected elements are valid.
|
||||
*/
|
||||
|
||||
Vendored
+1
-3
@@ -30,9 +30,7 @@ export namespace Base64 {
|
||||
}
|
||||
|
||||
// Helper to allow referencing Base64 from inside the global declaration without creating a self reference
|
||||
/* tslint:disable:strict-export-declare-modifiers */
|
||||
type Base64_ = typeof Base64;
|
||||
/* tslint:enable:strict-export-declare-modifiers */
|
||||
export type Base64_ = typeof Base64;
|
||||
|
||||
declare global {
|
||||
interface String {
|
||||
|
||||
Vendored
-2
@@ -459,7 +459,6 @@ declare class Application extends EventEmitter {
|
||||
hostname?: string,
|
||||
listeningListener?: () => void,
|
||||
): Server;
|
||||
/* tslint:disable:unified-signatures */
|
||||
listen(
|
||||
port: number,
|
||||
backlog?: number,
|
||||
@@ -479,7 +478,6 @@ declare class Application extends EventEmitter {
|
||||
listeningListener?: () => void,
|
||||
): Server;
|
||||
listen(handle: any, listeningListener?: () => void): Server;
|
||||
/* tslint:enable:unified-signatures*/
|
||||
|
||||
/**
|
||||
* Return JSON representation.
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// tslint:disable
|
||||
import mailparser_mod = require('mailparser');
|
||||
import MailParser = mailparser_mod.MailParser;
|
||||
import simpleParser = mailparser_mod.simpleParser;
|
||||
|
||||
Vendored
-1
@@ -5,7 +5,6 @@
|
||||
// Yuri Dogandjiev <https://github.com/ydogandjiev>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped/types/microsoftteams
|
||||
// TypeScript Version: 2.1
|
||||
// tslint:disable:prefer-method-signature
|
||||
|
||||
interface MessageEvent {
|
||||
originalEvent: MessageEvent;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* tslint:disable:no-namespace prefer-template */
|
||||
import * as nodemailer from 'nodemailer';
|
||||
|
||||
import addressparser = require('nodemailer/lib/addressparser');
|
||||
@@ -37,7 +36,7 @@ const aws = {
|
||||
|
||||
// 1. Nodemailer
|
||||
|
||||
namespace nodemailer_test {
|
||||
function nodemailer_test() {
|
||||
// Generate test SMTP service account from ethereal.email
|
||||
// Only needed if you don't have a real mail account for testing
|
||||
nodemailer.createTestAccount((err, account) => {
|
||||
@@ -85,7 +84,7 @@ namespace nodemailer_test {
|
||||
|
||||
// Commmon fields
|
||||
|
||||
namespace message_common_fields_test {
|
||||
function message_common_fields_test() {
|
||||
const message: Mail.Options = {
|
||||
from: 'sender@server.com',
|
||||
to: 'receiver@sender.com',
|
||||
@@ -97,7 +96,7 @@ namespace message_common_fields_test {
|
||||
|
||||
// More advanced fields
|
||||
|
||||
namespace message_more_advanced_fields_test {
|
||||
function message_more_advanced_fields_test() {
|
||||
const message: Mail.Options = {
|
||||
headers: {
|
||||
'My-Custom-Header': 'header value'
|
||||
@@ -116,7 +115,7 @@ namespace message_more_advanced_fields_test {
|
||||
|
||||
// 3. Attachments
|
||||
|
||||
namespace message_attachments_test {
|
||||
function message_attachments_test() {
|
||||
const message: Mail.Options = {
|
||||
attachments: [
|
||||
{ // utf-8 string as an attachment
|
||||
@@ -157,7 +156,7 @@ namespace message_attachments_test {
|
||||
},
|
||||
{
|
||||
// use pregenerated MIME node
|
||||
raw: 'Content-Type: text/plain\r\n' +
|
||||
raw: 'Content-Type: text/plain\r\n' + // tslint:disable-line prefer-template
|
||||
'Content-Disposition: attachment;\r\n' +
|
||||
'\r\n' +
|
||||
'Hello world!'
|
||||
@@ -168,7 +167,7 @@ namespace message_attachments_test {
|
||||
|
||||
// 3. Alternatives
|
||||
|
||||
namespace message_alternatives_test {
|
||||
function message_alternatives_test() {
|
||||
const message: Mail.Options = {
|
||||
html: '<b>Hello world!</b>',
|
||||
alternatives: [
|
||||
@@ -182,7 +181,7 @@ namespace message_alternatives_test {
|
||||
|
||||
// 3. Address object
|
||||
|
||||
namespace message_address_object_test {
|
||||
function message_address_object_test() {
|
||||
const message: Mail.Options = {
|
||||
to: 'foobar@blurdybloop.com, "Ноде Майлер" <bar@blurdybloop.com>, "Name, User" <baz@blurdybloop.com>',
|
||||
cc: [
|
||||
@@ -204,7 +203,7 @@ namespace message_address_object_test {
|
||||
|
||||
// Send a REQUEST event as a string
|
||||
|
||||
namespace message_calendar_request_test {
|
||||
function message_calendar_request_test() {
|
||||
const content = 'BEGIN:VCALENDAR\r\nPRODID:-//ACME/DesktopCalendar//EN\r\nMETHOD:REQUEST\r\n...';
|
||||
|
||||
const message: Mail.Options = {
|
||||
@@ -222,7 +221,7 @@ namespace message_calendar_request_test {
|
||||
|
||||
// Send a PUBLISH event from a file
|
||||
|
||||
namespace message_calendar_publish_test {
|
||||
function message_calendar_publish_test() {
|
||||
const message: Mail.Options = {
|
||||
from: 'sender@example.com',
|
||||
to: 'recipient@example.com',
|
||||
@@ -237,7 +236,7 @@ namespace message_calendar_publish_test {
|
||||
|
||||
// Send a CANCEL event from an URL
|
||||
|
||||
namespace message_calendar_cancel_test {
|
||||
function message_calendar_cancel_test() {
|
||||
const message: Mail.Options = {
|
||||
from: 'sender@example.com',
|
||||
to: 'recipient@example.com',
|
||||
@@ -252,7 +251,7 @@ namespace message_calendar_cancel_test {
|
||||
|
||||
// 3. Embedded images
|
||||
|
||||
namespace message_embedded_images_test {
|
||||
function message_embedded_images_test() {
|
||||
const message: Mail.Options = {
|
||||
html: 'Embedded image: <img src="cid:unique@nodemailer.com"/>',
|
||||
attachments: [{
|
||||
@@ -267,7 +266,7 @@ namespace message_embedded_images_test {
|
||||
|
||||
// Setup different List-* headers
|
||||
|
||||
namespace message_list_headers_test {
|
||||
function message_list_headers_test() {
|
||||
const message: Mail.Options = {
|
||||
from: 'sender@example.com',
|
||||
to: 'recipient@example.com',
|
||||
@@ -308,7 +307,7 @@ namespace message_list_headers_test {
|
||||
|
||||
// Set custom headers
|
||||
|
||||
namespace message_custom_headers_test {
|
||||
function message_custom_headers_test() {
|
||||
const message: Mail.Options = {
|
||||
headers: {
|
||||
'x-my-key': 'header value',
|
||||
@@ -319,7 +318,7 @@ namespace message_custom_headers_test {
|
||||
|
||||
// Multiple rows with the same key
|
||||
|
||||
namespace message_multiple_rows_with_the_same_key_test {
|
||||
function message_multiple_rows_with_the_same_key_test() {
|
||||
const message: Mail.Options = {
|
||||
headers: {
|
||||
'x-my-key': [
|
||||
@@ -333,7 +332,7 @@ namespace message_multiple_rows_with_the_same_key_test {
|
||||
|
||||
// Prepared headers
|
||||
|
||||
namespace message_prepared_headers_test {
|
||||
function message_prepared_headers_test() {
|
||||
const message: Mail.Options = {
|
||||
headers: {
|
||||
'x-processed': 'a really long header or value with non-ascii characters 👮',
|
||||
@@ -349,7 +348,7 @@ namespace message_prepared_headers_test {
|
||||
|
||||
// Use string as a message body
|
||||
|
||||
namespace message_string_body_test {
|
||||
function message_string_body_test() {
|
||||
const message: Mail.Options = {
|
||||
envelope: {
|
||||
from: 'sender@example.com',
|
||||
@@ -365,7 +364,7 @@ Hello world!`
|
||||
|
||||
// Set EML file as message body
|
||||
|
||||
namespace message_eml_file_test {
|
||||
function message_eml_file_test() {
|
||||
const message: Mail.Options = {
|
||||
envelope: {
|
||||
from: 'sender@example.com',
|
||||
@@ -379,7 +378,7 @@ namespace message_eml_file_test {
|
||||
|
||||
// Set string as attachment body
|
||||
|
||||
namespace message_string_attachment_test {
|
||||
function message_string_attachment_test() {
|
||||
const message: Mail.Options = {
|
||||
from: 'sender@example.com',
|
||||
to: 'recipient@example.com',
|
||||
@@ -396,7 +395,7 @@ Attached text file`}]
|
||||
|
||||
// Single connection
|
||||
|
||||
namespace smtp_single_connection_test {
|
||||
function smtp_single_connection_test() {
|
||||
const smtpConfig: SMTPTransport.Options = {
|
||||
host: 'smtp.example.com',
|
||||
port: 587,
|
||||
@@ -411,7 +410,7 @@ namespace smtp_single_connection_test {
|
||||
|
||||
// Pooled connection
|
||||
|
||||
namespace smtp_pooled_connection_test {
|
||||
function smtp_pooled_connection_test() {
|
||||
const smtpConfig: SMTPPool.Options = {
|
||||
pool: true,
|
||||
host: 'smtp.example.com',
|
||||
@@ -427,7 +426,7 @@ namespace smtp_pooled_connection_test {
|
||||
|
||||
// Allow self-signed certificates
|
||||
|
||||
namespace smtp_self_signed_test {
|
||||
function smtp_self_signed_test() {
|
||||
const smtpConfig: SMTPTransport.Options = {
|
||||
host: 'my.smtp.host',
|
||||
port: 465,
|
||||
@@ -446,7 +445,7 @@ namespace smtp_self_signed_test {
|
||||
|
||||
// Verify SMTP connection configuration
|
||||
|
||||
namespace smtp_verify_test {
|
||||
function smtp_verify_test() {
|
||||
const transporter = nodemailer.createTransport();
|
||||
transporter.verify((error, success) => {
|
||||
if (error) {
|
||||
@@ -459,7 +458,7 @@ namespace smtp_verify_test {
|
||||
|
||||
// 4. SMTP envelope
|
||||
|
||||
namespace smtp_envelope_test {
|
||||
function smtp_envelope_test() {
|
||||
const message: Mail.Options = {
|
||||
from: 'mailer@nodemailer.com', // listed in rfc822 message header
|
||||
to: 'daemon@nodemailer.com', // listed in rfc822 message header
|
||||
@@ -474,14 +473,14 @@ namespace smtp_envelope_test {
|
||||
|
||||
// transporter.close()
|
||||
|
||||
namespace smtp_pool_close_test {
|
||||
function smtp_pool_close_test() {
|
||||
const transporter = nodemailer.createTransport({ pool: true });
|
||||
transporter.close();
|
||||
}
|
||||
|
||||
// Event:‘idle’
|
||||
|
||||
namespace smtp_pool_idle_test {
|
||||
function smtp_pool_idle_test() {
|
||||
const messages = [{ raw: 'list of messages' }];
|
||||
const transporter = nodemailer.createTransport({ pool: true });
|
||||
transporter.on('idle', () => {
|
||||
@@ -496,7 +495,7 @@ namespace smtp_pool_idle_test {
|
||||
|
||||
// Create a testing account on the fly
|
||||
|
||||
namespace smtp_test_account_test {
|
||||
function smtp_test_account_test() {
|
||||
nodemailer.createTestAccount((err, account) => {
|
||||
if (!err) {
|
||||
// create reusable transporter object using the default SMTP transport
|
||||
@@ -515,7 +514,7 @@ namespace smtp_test_account_test {
|
||||
|
||||
// Use environment specific SMTP settings
|
||||
|
||||
namespace smtp_info_test {
|
||||
function smtp_info_test() {
|
||||
const transporter = nodemailer.createTransport();
|
||||
transporter.sendMail({}).then((info: SMTPTransport.SentMessageInfo) => {
|
||||
console.log('Preview URL: ' + nodemailer.getTestMessageUrl(info));
|
||||
@@ -526,7 +525,7 @@ namespace smtp_info_test {
|
||||
|
||||
// Using custom token handling
|
||||
|
||||
namespace oauth2_token_handling_test {
|
||||
function oauth2_token_handling_test() {
|
||||
const transporter = nodemailer.createTransport();
|
||||
const userTokens: { [key: string]: string; } = {};
|
||||
transporter.set('oauth2_provision_cb', (user, renew, callback) => {
|
||||
@@ -541,7 +540,7 @@ namespace oauth2_token_handling_test {
|
||||
|
||||
// Token update notifications
|
||||
|
||||
namespace oauth2_token_update_test {
|
||||
function oauth2_token_update_test() {
|
||||
const transporter = nodemailer.createTransport();
|
||||
transporter.on('token', token => {
|
||||
console.log('A new access token was generated');
|
||||
@@ -553,7 +552,7 @@ namespace oauth2_token_update_test {
|
||||
|
||||
// Authenticate using existing token
|
||||
|
||||
namespace oauth2_existing_token_test {
|
||||
function oauth2_existing_token_test() {
|
||||
const transporter = nodemailer.createTransport({
|
||||
host: 'smtp.gmail.com',
|
||||
port: 465,
|
||||
@@ -568,7 +567,7 @@ namespace oauth2_existing_token_test {
|
||||
|
||||
// Custom handler
|
||||
|
||||
namespace oauth2_custom_handler_test {
|
||||
function oauth2_custom_handler_test() {
|
||||
const transporter = nodemailer.createTransport({
|
||||
host: 'smtp.gmail.com',
|
||||
port: 465,
|
||||
@@ -593,7 +592,7 @@ namespace oauth2_custom_handler_test {
|
||||
|
||||
// Set up 3LO authentication
|
||||
|
||||
namespace oauth2_3lo_test {
|
||||
function oauth2_3lo_test() {
|
||||
const transporter = nodemailer.createTransport({
|
||||
host: 'smtp.gmail.com',
|
||||
port: 465,
|
||||
@@ -612,7 +611,7 @@ namespace oauth2_3lo_test {
|
||||
|
||||
// Set up 2LO authentication
|
||||
|
||||
namespace oauth2_2lo_test {
|
||||
function oauth2_2lo_test() {
|
||||
const transporter = nodemailer.createTransport({
|
||||
host: 'smtp.gmail.com',
|
||||
port: 465,
|
||||
@@ -630,7 +629,7 @@ namespace oauth2_2lo_test {
|
||||
|
||||
// Provide authentication details with message options
|
||||
|
||||
namespace oauth2_message_options_test {
|
||||
function oauth2_message_options_test() {
|
||||
const transporter = nodemailer.createTransport({
|
||||
host: 'smtp.gmail.com',
|
||||
port: 465,
|
||||
@@ -665,7 +664,7 @@ namespace oauth2_message_options_test {
|
||||
transporter.sendMail(options);
|
||||
}
|
||||
|
||||
namespace oauth2_privision_cb_test {
|
||||
function oauth2_privision_cb_test() {
|
||||
const transporter = nodemailer.createTransport({
|
||||
host: 'smtp.gmail.com',
|
||||
port: 465,
|
||||
@@ -703,7 +702,7 @@ namespace oauth2_privision_cb_test {
|
||||
|
||||
// Send a message using specific binary
|
||||
|
||||
namespace sendmail_test {
|
||||
function sendmail_test() {
|
||||
const transporter = nodemailer.createTransport({
|
||||
sendmail: true,
|
||||
newline: 'unix',
|
||||
@@ -726,7 +725,7 @@ namespace sendmail_test {
|
||||
|
||||
// Send a message using SES transport
|
||||
|
||||
namespace ses_test {
|
||||
function ses_test() {
|
||||
// configure AWS SDK
|
||||
aws.config.loadFromPath('config.json');
|
||||
|
||||
@@ -763,7 +762,7 @@ namespace ses_test {
|
||||
|
||||
// Stream a message with windows-style newlines
|
||||
|
||||
namespace stream_test {
|
||||
function stream_test() {
|
||||
const transporter = nodemailer.createTransport({
|
||||
streamTransport: true,
|
||||
newline: 'windows'
|
||||
@@ -787,7 +786,7 @@ namespace stream_test {
|
||||
|
||||
// Create a buffer with unix-style newlines
|
||||
|
||||
namespace stream_buffer_unix_newlines_test {
|
||||
function stream_buffer_unix_newlines_test() {
|
||||
const transporter = nodemailer.createTransport({
|
||||
streamTransport: true,
|
||||
newline: 'unix',
|
||||
@@ -809,7 +808,7 @@ namespace stream_buffer_unix_newlines_test {
|
||||
|
||||
// Create a JSON encoded message object
|
||||
|
||||
namespace json_test {
|
||||
function json_test() {
|
||||
const transporter = nodemailer.createTransport({
|
||||
jsonTransport: true
|
||||
});
|
||||
@@ -831,7 +830,7 @@ namespace json_test {
|
||||
|
||||
// 'compile'
|
||||
|
||||
namespace plugin_compile_test {
|
||||
function plugin_compile_test() {
|
||||
const transporter = nodemailer.createTransport();
|
||||
|
||||
function plugin(mail: typeof transporter.MailMessage, callback: (err?: Error | null) => void) {
|
||||
@@ -856,7 +855,7 @@ namespace plugin_compile_test {
|
||||
|
||||
// 'stream'
|
||||
|
||||
namespace plugin_stream_test {
|
||||
function plugin_stream_test() {
|
||||
const transformer: stream.Transform = new (require('stream').Transform)();
|
||||
|
||||
transformer._transform = function(chunk: Buffer, encoding, done) {
|
||||
@@ -890,7 +889,7 @@ namespace plugin_stream_test {
|
||||
|
||||
// Transport Example
|
||||
|
||||
namespace plugin_transport_example_test {
|
||||
function plugin_transport_example_test() {
|
||||
interface MailOptions extends Mail.Options {
|
||||
mailOption?: 'foo';
|
||||
}
|
||||
@@ -933,7 +932,7 @@ namespace plugin_transport_example_test {
|
||||
|
||||
// Sign all messages
|
||||
|
||||
namespace dkim_sign_all_test {
|
||||
function dkim_sign_all_test() {
|
||||
const opts: SMTPTransport.Options = {
|
||||
host: 'smtp.example.com',
|
||||
port: 465,
|
||||
@@ -948,7 +947,7 @@ namespace dkim_sign_all_test {
|
||||
|
||||
// Sign all messages with multiple keys
|
||||
|
||||
namespace dkim_sign_multiple_keys_test {
|
||||
function dkim_sign_multiple_keys_test() {
|
||||
const transporter = nodemailer.createTransport({
|
||||
host: 'smtp.example.com',
|
||||
port: 465,
|
||||
@@ -973,7 +972,7 @@ namespace dkim_sign_multiple_keys_test {
|
||||
|
||||
// Sign a specific message
|
||||
|
||||
namespace dkim_sign_specific_message_test {
|
||||
function dkim_sign_specific_message_test() {
|
||||
const transporter = nodemailer.createTransport({
|
||||
host: 'smtp.example.com',
|
||||
port: 465,
|
||||
@@ -994,7 +993,7 @@ namespace dkim_sign_specific_message_test {
|
||||
|
||||
// Cache large messages for signing
|
||||
|
||||
namespace dkim_cache_large_messages_test {
|
||||
function dkim_cache_large_messages_test() {
|
||||
const transporter = nodemailer.createTransport({
|
||||
host: 'smtp.example.com',
|
||||
port: 465,
|
||||
@@ -1011,7 +1010,7 @@ namespace dkim_cache_large_messages_test {
|
||||
|
||||
// Do not sign specific header keys
|
||||
|
||||
namespace dkim_specific_header_key_test {
|
||||
function dkim_specific_header_key_test() {
|
||||
const transporter = nodemailer.createTransport({
|
||||
host: 'smtp.example.com',
|
||||
port: 465,
|
||||
@@ -1029,7 +1028,7 @@ namespace dkim_specific_header_key_test {
|
||||
|
||||
// SMTP Connection
|
||||
|
||||
namespace smtp_connection_test {
|
||||
function smtp_connection_test() {
|
||||
const connection = new SMTPConnection();
|
||||
connection.connect(() => {
|
||||
connection.login({ user: 'user', pass: 'pass' }, (err) => {
|
||||
@@ -1056,7 +1055,7 @@ namespace smtp_connection_test {
|
||||
|
||||
// createReadStream
|
||||
|
||||
namespace mailcomposer_createReadStream_test {
|
||||
function mailcomposer_createReadStream_test() {
|
||||
const mail = new MailComposer({ from: '...' });
|
||||
const stream = mail.compile().createReadStream();
|
||||
stream.pipe(process.stdout);
|
||||
@@ -1064,7 +1063,7 @@ namespace mailcomposer_createReadStream_test {
|
||||
|
||||
// build
|
||||
|
||||
namespace mailcomposer_build_test {
|
||||
function mailcomposer_build_test() {
|
||||
const mail = new MailComposer({ from: '...' });
|
||||
mail.compile().build((err, message) => {
|
||||
process.stdout.write(message);
|
||||
@@ -1073,7 +1072,7 @@ namespace mailcomposer_build_test {
|
||||
|
||||
// addressparser
|
||||
|
||||
namespace addressparser_test {
|
||||
function addressparser_test() {
|
||||
const input = 'andris@tr.ee';
|
||||
const result = addressparser(input);
|
||||
const address: string = result[0].address;
|
||||
@@ -1082,7 +1081,7 @@ namespace addressparser_test {
|
||||
|
||||
// base64
|
||||
|
||||
namespace base64_test {
|
||||
function base64_test() {
|
||||
base64.encode('abcd= ÕÄÖÜ');
|
||||
|
||||
base64.encode(new Buffer([0x00, 0x01, 0x02, 0x20, 0x03]));
|
||||
@@ -1090,7 +1089,7 @@ namespace base64_test {
|
||||
|
||||
// fetch
|
||||
|
||||
namespace fetch_test {
|
||||
function fetch_test() {
|
||||
fetch('http://localhost/');
|
||||
|
||||
fetch('http://localhost:/', {
|
||||
@@ -1110,7 +1109,7 @@ namespace fetch_test {
|
||||
|
||||
// fetch/cookies
|
||||
|
||||
namespace fetch_cookies_test {
|
||||
function fetch_cookies_test() {
|
||||
const biskviit = new Cookies();
|
||||
|
||||
biskviit.getPath('/');
|
||||
@@ -1171,7 +1170,7 @@ namespace fetch_cookies_test {
|
||||
|
||||
// mime-funcs
|
||||
|
||||
namespace mime_funcs_test {
|
||||
function mime_funcs_test() {
|
||||
mimeFuncs.isPlainText('abc');
|
||||
|
||||
mimeFuncs.hasLongerLines('abc\ndef', 5);
|
||||
@@ -1204,7 +1203,7 @@ namespace mime_funcs_test {
|
||||
|
||||
// mime-types
|
||||
|
||||
namespace mime_types_test {
|
||||
function mime_types_test() {
|
||||
mimeTypes.detectExtension(false);
|
||||
mimeTypes.detectExtension('unknown');
|
||||
|
||||
@@ -1214,7 +1213,7 @@ namespace mime_types_test {
|
||||
|
||||
// qp
|
||||
|
||||
namespace qp_test {
|
||||
function qp_test() {
|
||||
qp.encode('abcd= ÕÄÖÜ');
|
||||
|
||||
qp.encode(new Buffer([0x00, 0x01, 0x02, 0x20, 0x03]));
|
||||
@@ -1222,7 +1221,7 @@ namespace qp_test {
|
||||
|
||||
// shared
|
||||
|
||||
namespace shared_getLogger_test {
|
||||
function shared_getLogger_test() {
|
||||
shared.getLogger({
|
||||
logger: false
|
||||
});
|
||||
@@ -1233,7 +1232,7 @@ namespace shared_getLogger_test {
|
||||
console.log(options.secure, options.auth!.user, options.tls!.rejectUnauthorized);
|
||||
}
|
||||
|
||||
namespace shared_resolveContent_string_test {
|
||||
function shared_resolveContent_string_test() {
|
||||
const mail = {
|
||||
data: {
|
||||
html: '<p>Tere, tere</p><p>vana kere!</p>\n'
|
||||
@@ -1249,7 +1248,7 @@ namespace shared_resolveContent_string_test {
|
||||
shared.resolveContent(mail.data, 'html').then((value) => console.log(value));
|
||||
}
|
||||
|
||||
namespace shared_resolveContent_buffer_test {
|
||||
function shared_resolveContent_buffer_test() {
|
||||
const mail = {
|
||||
data: {
|
||||
html: new Buffer('<p>Tere, tere</p><p>vana kere!</p>\n')
|
||||
@@ -1265,7 +1264,7 @@ namespace shared_resolveContent_buffer_test {
|
||||
shared.resolveContent(mail.data, 'html').then((value) => console.log(value));
|
||||
}
|
||||
|
||||
namespace shared_assing_test {
|
||||
function shared_assign_test() {
|
||||
const target = {
|
||||
a: 1,
|
||||
b: 2,
|
||||
@@ -1285,13 +1284,13 @@ namespace shared_assing_test {
|
||||
shared.assign(target, arg1, arg2);
|
||||
}
|
||||
|
||||
namespace shared_encodeXText_test {
|
||||
function shared_encodeXText_test() {
|
||||
shared.encodeXText('teretere');
|
||||
}
|
||||
|
||||
// well-known
|
||||
|
||||
namespace well_known_test {
|
||||
function well_known_test() {
|
||||
const options = wellKnown('Gmail');
|
||||
if (options) {
|
||||
console.log(options.host, options.port, options.secure);
|
||||
|
||||
Vendored
+1
-6
@@ -279,16 +279,13 @@ declare namespace Paho {
|
||||
*/
|
||||
onMessageArrived: OnMessageHandler;
|
||||
|
||||
/* tslint:disable:unified-signatures */
|
||||
/* these cannot actually be neatly unified */
|
||||
|
||||
/**
|
||||
* @param host - the address of the messaging server as a DNS name or dotted decimal IP address.
|
||||
* @param port - the port number to connect to
|
||||
* @param path - the path on the host to connect to - only used if host is not a URI. Default: '/mqtt'.
|
||||
* @param clientId - the Messaging client identifier, between 1 and 23 characters in length.
|
||||
*/
|
||||
constructor(host: string, port: number, path: string, clientId: string);
|
||||
constructor(host: string, port: number, path: string, clientId: string); // tslint:disable-line unified-signatures (these cannot actually be neatly unified)
|
||||
|
||||
/**
|
||||
* @param host - the address of the messaging server as a DNS name or dotted decimal IP address.
|
||||
@@ -303,8 +300,6 @@ declare namespace Paho {
|
||||
*/
|
||||
constructor(hostUri: string, clientId: string);
|
||||
|
||||
/* tslint:enable:unified-signatures */
|
||||
|
||||
/**
|
||||
* Connect this Messaging client to its server.
|
||||
* @throws {InvalidState} if the client is not in disconnected state. The client must have received
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* tslint:disable */
|
||||
/**
|
||||
* Created by jcabresos on 4/19/2014.
|
||||
*/
|
||||
@@ -7,21 +6,21 @@ import facebook = require('passport-facebook');
|
||||
import express = require('express');
|
||||
|
||||
// just some test model
|
||||
var User = {
|
||||
findOrCreate(id:string, provider:string, callback:(err:any, user:any) => void): void {
|
||||
callback(null, {username:'james'});
|
||||
const User = {
|
||||
findOrCreate(id: string, provider: string, callback: (err: any, user: any) => void): void {
|
||||
callback(null, { username: 'james' });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
passport.use(new facebook.Strategy({
|
||||
clientID: process.env.PASSPORT_FACEBOOK_CLIENT_ID,
|
||||
clientSecret: process.env.PASSPORT_FACEBOOK_CLIENT_SECRET,
|
||||
callbackURL: process.env.PASSPORT_FACEBOOK_CALLBACK_URL
|
||||
},
|
||||
function(accessToken:string, refreshToken:string, profile:facebook.Profile, done:(error:any, user?:any) => void) {
|
||||
User.findOrCreate(profile.id, profile.provider, function(err, user) {
|
||||
if (err) { return done(err); }
|
||||
done(null, user);
|
||||
(accessToken: string, refreshToken: string, profile: facebook.Profile, done: (error: any, user?: any) => void) => {
|
||||
User.findOrCreate(profile.id, profile.provider, (err, user) => {
|
||||
if (err) done(err);
|
||||
else done(null, user);
|
||||
});
|
||||
})
|
||||
);
|
||||
@@ -32,10 +31,10 @@ passport.use(new facebook.Strategy({
|
||||
callbackURL: process.env.PASSPORT_FACEBOOK_CALLBACK_URL,
|
||||
passReqToCallback: true
|
||||
},
|
||||
function(req: express.Request, accessToken:string, refreshToken:string, profile:facebook.Profile, done:(error:any, user?:any) => void) {
|
||||
User.findOrCreate(profile.id, profile.provider, function(err, user) {
|
||||
if (err) { return done(err); }
|
||||
done(null, user);
|
||||
(req: express.Request, accessToken: string, refreshToken: string, profile: facebook.Profile, done: (error: any, user?: any) => void) => {
|
||||
User.findOrCreate(profile.id, profile.provider, (err, user) => {
|
||||
if (err) done(err);
|
||||
else done(null, user);
|
||||
});
|
||||
})
|
||||
);
|
||||
@@ -45,7 +44,7 @@ passport.use(new facebook.Strategy({
|
||||
clientSecret: process.env.PASSPORT_FACEBOOK_CLIENT_SECRET,
|
||||
callbackURL: process.env.PASSPORT_FACEBOOK_CALLBACK_URL
|
||||
},
|
||||
function(accessToken:string, refreshToken:string, profile:facebook.Profile, done:(error:any, user?:any, info?:any) => void) {
|
||||
(accessToken: string, refreshToken: string, profile: facebook.Profile, done: (error: any, user?: any, info?: any) => void) => {
|
||||
done(null, false, { message: 'Some error.' });
|
||||
})
|
||||
);
|
||||
|
||||
@@ -78,8 +78,7 @@ function test_camera() {
|
||||
function test_capture() {
|
||||
var capture = navigator.device.capture;
|
||||
function captureSuccess(mediaFiles) {
|
||||
var i, len;
|
||||
for (i = 0, len = mediaFiles.length; i < len; i += 1) {
|
||||
for (let i = 0; i < mediaFiles.length; i += 1) {
|
||||
uploadFile(mediaFiles[i]);
|
||||
}
|
||||
}
|
||||
@@ -108,9 +107,8 @@ function test_capture() {
|
||||
var options = { limit: 3, duration: 10 };
|
||||
navigator.device.capture.captureAudio(captureSuccess, captureError, options);
|
||||
function captureSuccess2(mediaFiles) {
|
||||
var i, path, len;
|
||||
for (i = 0, len = mediaFiles.length; i < len; i += 1) {
|
||||
path = mediaFiles[i].fullPath;
|
||||
for (let i = 0; i < mediaFiles.length; i += 1) {
|
||||
const path = mediaFiles[i].fullPath;
|
||||
}
|
||||
};
|
||||
function captureError2(error) {
|
||||
@@ -231,7 +229,7 @@ function test_contacts() {
|
||||
contact.remove(onSuccess, onError);
|
||||
}
|
||||
function test_contacts2() {
|
||||
|
||||
|
||||
function onSuccess(contacts) {
|
||||
for (var i = 0; i < contacts.length; i++) {
|
||||
console.log("Display Name = " + contacts[i].displayName);
|
||||
|
||||
@@ -22,11 +22,12 @@ function formatPEM(pemString: string) {
|
||||
const stringLength = pemString.length;
|
||||
let resultString = "";
|
||||
|
||||
for (let i = 0, count = 0; i < stringLength; i++ , count++) {
|
||||
for (let i = 0, count = 0; i < stringLength; i++) {
|
||||
if (count > 63) {
|
||||
resultString = `${resultString}\r\n`;
|
||||
count = 0;
|
||||
}
|
||||
count++;
|
||||
|
||||
resultString = resultString + pemString[i];
|
||||
}
|
||||
|
||||
-3
@@ -6,9 +6,6 @@
|
||||
|
||||
/// <reference types="pouchdb-core" />
|
||||
|
||||
// TODO: Fixing this lint error will require a large refactor
|
||||
/* tslint:disable:no-single-declare-module */
|
||||
|
||||
declare namespace PouchDB {
|
||||
namespace FruitDOWNAdapter {
|
||||
interface FruitDOWNAdapterConfiguration
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
"rules": {
|
||||
// TODOs
|
||||
"no-declare-current-package": false,
|
||||
"no-unnecessary-generics": false
|
||||
"no-unnecessary-generics": false,
|
||||
// TODO: Fixing this lint error will require a large refactor
|
||||
"no-single-declare-module": false
|
||||
}
|
||||
}
|
||||
|
||||
-3
@@ -6,9 +6,6 @@
|
||||
|
||||
/// <reference types="pouchdb-core" />
|
||||
|
||||
// TODO: Fixing this lint error will require a large refactor
|
||||
/* tslint:disable:no-single-declare-module */
|
||||
|
||||
declare namespace PouchDB {
|
||||
namespace HttpAdapter {
|
||||
interface HttpAdapterConfiguration
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
"rules": {
|
||||
// TODOs
|
||||
"no-declare-current-package": false,
|
||||
"no-unnecessary-generics": false
|
||||
"no-unnecessary-generics": false,
|
||||
// TODO: Fixing this lint error will require a large refactor
|
||||
"no-single-declare-module": false
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
-3
@@ -6,9 +6,6 @@
|
||||
|
||||
/// <reference types="pouchdb-core" />
|
||||
|
||||
// TODO: Fixing this lint error will require a large refactor
|
||||
/* tslint:disable:no-single-declare-module */
|
||||
|
||||
declare namespace PouchDB {
|
||||
namespace Core {
|
||||
interface DatabaseInfo {
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
"rules": {
|
||||
// TODOs
|
||||
"no-declare-current-package": false,
|
||||
"no-unnecessary-generics": false
|
||||
"no-unnecessary-generics": false,
|
||||
// TODO: Fixing this lint error will require a large refactor
|
||||
"no-single-declare-module": false
|
||||
}
|
||||
}
|
||||
|
||||
-3
@@ -6,9 +6,6 @@
|
||||
|
||||
/// <reference types="pouchdb-core" />
|
||||
|
||||
// TODO: Fixing this lint error will require a large refactor
|
||||
/* tslint:disable:no-single-declare-module */
|
||||
|
||||
declare namespace PouchDB {
|
||||
namespace LevelDbAdapter {
|
||||
interface LevelDbAdapterConfiguration extends Configuration.LocalDatabaseConfiguration {
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
"rules": {
|
||||
// TODOs
|
||||
"no-declare-current-package": false,
|
||||
"no-unnecessary-generics": false
|
||||
"no-unnecessary-generics": false,
|
||||
// TODO: Fixing this lint error will require a large refactor
|
||||
"no-single-declare-module": false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,9 +6,6 @@
|
||||
|
||||
/// <reference types="pouchdb-core" />
|
||||
|
||||
// TODO: Fixing this lint error will require a large refactor
|
||||
/* tslint:disable:no-single-declare-module */
|
||||
|
||||
declare namespace PouchDB {
|
||||
namespace LocalStorageAdapter {
|
||||
interface LocalStorageAdapterConfiguration
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
"rules": {
|
||||
// TODOs
|
||||
"no-declare-current-package": false,
|
||||
"no-unnecessary-generics": false
|
||||
"no-unnecessary-generics": false,
|
||||
// TODO: Fixing this lint error will require a large refactor
|
||||
"no-single-declare-module": false
|
||||
}
|
||||
}
|
||||
|
||||
-3
@@ -6,9 +6,6 @@
|
||||
|
||||
/// <reference types="pouchdb-core" />
|
||||
|
||||
// TODO: Fixing this lint error will require a large refactor
|
||||
/* tslint:disable:no-single-declare-module */
|
||||
|
||||
declare namespace PouchDB {
|
||||
namespace MemoryAdapter {
|
||||
interface MemoryAdapterConfiguration
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
"rules": {
|
||||
// TODOs
|
||||
"no-declare-current-package": false,
|
||||
"no-unnecessary-generics": false
|
||||
"no-unnecessary-generics": false,
|
||||
// TODO: Fixing this lint error will require a large refactor
|
||||
"no-single-declare-module": false
|
||||
}
|
||||
}
|
||||
|
||||
+2
-7
@@ -7,10 +7,5 @@
|
||||
/// <reference types="pouchdb-core" />
|
||||
/// <reference types="pouchdb-adapter-websql" />
|
||||
|
||||
// TODO: Fixing this lint error will require a large refactor
|
||||
/* tslint:disable:no-single-declare-module */
|
||||
|
||||
declare module 'pouchdb-adapter-node-websql' {
|
||||
const plugin: PouchDB.Plugin;
|
||||
export = plugin;
|
||||
}
|
||||
declare const plugin: PouchDB.Plugin;
|
||||
export = plugin;
|
||||
|
||||
@@ -1,7 +1 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
// TODOs
|
||||
"no-declare-current-package": false
|
||||
}
|
||||
}
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
|
||||
-3
@@ -6,9 +6,6 @@
|
||||
|
||||
/// <reference types="pouchdb-core" />
|
||||
|
||||
// TODO: Fixing this lint error will require a large refactor
|
||||
/* tslint:disable:no-single-declare-module */
|
||||
|
||||
declare namespace PouchDB {
|
||||
namespace Core {
|
||||
interface DatabaseInfo {
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
"rules": {
|
||||
// TODOs
|
||||
"no-declare-current-package": false,
|
||||
"no-unnecessary-generics": false
|
||||
"no-unnecessary-generics": false,
|
||||
// TODO: Fixing this lint error will require a large refactor
|
||||
"no-single-declare-module": false
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+2
-7
@@ -11,10 +11,5 @@
|
||||
/// <reference types="pouchdb-mapreduce" />
|
||||
/// <reference types="pouchdb-replication" />
|
||||
|
||||
// TODO: Fixing this lint error will require a large refactor
|
||||
/* tslint:disable:no-single-declare-module */
|
||||
|
||||
declare module 'pouchdb-browser' {
|
||||
const PouchDb: PouchDB.Static;
|
||||
export = PouchDb;
|
||||
}
|
||||
declare const PouchDb: PouchDB.Static;
|
||||
export = PouchDb;
|
||||
|
||||
@@ -1,7 +1 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
// TODOs
|
||||
"no-declare-current-package": false
|
||||
}
|
||||
}
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
|
||||
Vendored
-3
@@ -6,9 +6,6 @@
|
||||
|
||||
/// <reference types="pouchdb-core" />
|
||||
|
||||
// TODO: Fixing this lint error will require a large refactor
|
||||
/* tslint:disable:no-single-declare-module */
|
||||
|
||||
declare namespace PouchDB {
|
||||
namespace Find {
|
||||
interface ConditionOperators {
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
"rules": {
|
||||
// TODOs
|
||||
"no-declare-current-package": false,
|
||||
"no-any-union": false
|
||||
"no-any-union": false,
|
||||
// TODO: Fixing this lint error will require a large refactor
|
||||
"no-single-declare-module": false
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+2
-7
@@ -7,10 +7,5 @@
|
||||
/// <reference types="pouchdb-core" />
|
||||
/// <reference types="pouchdb-adapter-http" />
|
||||
|
||||
// TODO: Fixing this lint error will require a large refactor
|
||||
/* tslint:disable:no-single-declare-module */
|
||||
|
||||
declare module 'pouchdb-http' {
|
||||
const PouchDb: PouchDB.Static;
|
||||
export = PouchDb;
|
||||
}
|
||||
declare const PouchDb: PouchDB.Static;
|
||||
export = PouchDb;
|
||||
|
||||
@@ -1,7 +1 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
// TODOs
|
||||
"no-declare-current-package": false
|
||||
}
|
||||
}
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
|
||||
Vendored
-3
@@ -6,9 +6,6 @@
|
||||
|
||||
/// <reference types="pouchdb-core" />
|
||||
|
||||
// TODO: Fixing this lint error will require a large refactor
|
||||
/* tslint:disable:no-single-declare-module */
|
||||
|
||||
declare namespace PouchDB {
|
||||
type BuiltInReducers = '_sum' | '_count' | '_stats';
|
||||
/**
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
"rules": {
|
||||
// TODOs
|
||||
"no-any-union": false,
|
||||
"no-declare-current-package": false
|
||||
"no-declare-current-package": false,
|
||||
// TODO: Fixing this lint error will require a large refactor
|
||||
"no-single-declare-module": false
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
-3
@@ -10,9 +10,6 @@
|
||||
/// <reference types="pouchdb-mapreduce" />
|
||||
/// <reference types="pouchdb-replication" />
|
||||
|
||||
// TODO: Fixing this lint error will require a large refactor
|
||||
/* tslint:disable:no-single-declare-module */
|
||||
|
||||
declare namespace PouchDB {
|
||||
namespace Core {
|
||||
interface DatabaseInfo {
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
// TODOs
|
||||
"no-declare-current-package": false
|
||||
"no-declare-current-package": false,
|
||||
// TODO: Fixing this lint error will require a large refactor
|
||||
"no-single-declare-module": false
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
-3
@@ -6,9 +6,6 @@
|
||||
|
||||
/// <reference types="pouchdb-core" />
|
||||
|
||||
// TODO: Fixing this lint error will require a large refactor
|
||||
/* tslint:disable:no-single-declare-module */
|
||||
|
||||
declare namespace PouchDB {
|
||||
namespace Replication {
|
||||
interface ReplicateOptions {
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
// TODOs
|
||||
"no-declare-current-package": false
|
||||
}
|
||||
"no-declare-current-package": false,
|
||||
// TODO: Fixing this lint error will require a large refactor
|
||||
"no-single-declare-module": false
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
-3
@@ -6,9 +6,6 @@
|
||||
|
||||
/// <reference types="pouchdb-core" />
|
||||
|
||||
// TODO: Fixing this lint error will require a large refactor
|
||||
/* tslint:disable:no-single-declare-module */
|
||||
|
||||
declare namespace PouchDB {
|
||||
interface Database<Content extends {} = {}> {
|
||||
/**
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
"rules": {
|
||||
// TODOs
|
||||
"no-declare-current-package": false,
|
||||
"no-unnecessary-generics": false
|
||||
"no-unnecessary-generics": false,
|
||||
// TODO: Fixing this lint error will require a large refactor
|
||||
"no-single-declare-module": false
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+2
-7
@@ -19,10 +19,5 @@
|
||||
/// <reference types='pouchdb-node' />
|
||||
/// <reference types='pouchdb-replication' />
|
||||
|
||||
// TODO: Fixing this lint error will require a large refactor
|
||||
/* tslint:disable:no-single-declare-module */
|
||||
|
||||
declare module 'pouchdb' {
|
||||
const plugin: PouchDB.Static;
|
||||
export = plugin;
|
||||
}
|
||||
declare const plugin: PouchDB.Static;
|
||||
export = plugin;
|
||||
|
||||
@@ -1,6 +1 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
"no-declare-current-package": false
|
||||
}
|
||||
}
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
|
||||
+1
-2
@@ -1,4 +1,3 @@
|
||||
/* tslint:disable:no-namespace */
|
||||
/// <reference types="jquery" />
|
||||
|
||||
import Q = require('q');
|
||||
@@ -177,7 +176,7 @@ Q.nbind<any[]>(kitty.find, kitty)({cute: true}).done((kitties: any[]) => {
|
||||
/**
|
||||
* Test: Can "rethrow" rejected promises
|
||||
*/
|
||||
namespace TestCanRethrowRejectedPromises {
|
||||
function TestCanRethrowRejectedPromises() {
|
||||
interface Foo {
|
||||
a: number;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* tslint:disable */
|
||||
import * as chrome from 'selenium-webdriver/chrome';
|
||||
import * as remote from 'selenium-webdriver/remote';
|
||||
import * as webdriver from 'selenium-webdriver';
|
||||
@@ -10,7 +9,7 @@ function TestChromeDriver() {
|
||||
new remote.DriverService('executable', new chrome.Options()),
|
||||
new webdriver.promise.ControlFlow());
|
||||
|
||||
var baseDriver: webdriver.WebDriver = driver;
|
||||
const baseDriver: webdriver.WebDriver = driver;
|
||||
}
|
||||
|
||||
function TestChromeOptions() {
|
||||
@@ -44,7 +43,7 @@ function TestServiceBuilder() {
|
||||
var builder: chrome.ServiceBuilder = new chrome.ServiceBuilder();
|
||||
builder = new chrome.ServiceBuilder('exe');
|
||||
|
||||
var anything: any = builder.build();
|
||||
const anything: any = builder.build();
|
||||
builder = builder.usingPort(8080);
|
||||
builder = builder.setAdbPort(5037);
|
||||
builder = builder.loggingTo('path');
|
||||
@@ -57,6 +56,6 @@ function TestServiceBuilder() {
|
||||
}
|
||||
|
||||
function TestChromeModule() {
|
||||
var service: any = chrome.getDefaultService();
|
||||
const service: any = chrome.getDefaultService();
|
||||
chrome.setDefaultService(new remote.DriverService('executable', new chrome.Options()));
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* tslint:disable */
|
||||
import * as firefox from 'selenium-webdriver/firefox';
|
||||
import * as remote from 'selenium-webdriver/remote';
|
||||
import * as webdriver from 'selenium-webdriver';
|
||||
@@ -8,7 +7,7 @@ function TestBinary() {
|
||||
binary = new firefox.Binary('exe');
|
||||
|
||||
binary.addArguments('A', 'B', 'C');
|
||||
var promise: webdriver.promise.Promise<void> = binary.kill();
|
||||
const promise: webdriver.promise.Promise<void> = binary.kill();
|
||||
binary.launch('profile').then((result: any) => {});
|
||||
}
|
||||
|
||||
@@ -17,7 +16,7 @@ function TestFirefoxDriver() {
|
||||
driver = new firefox.Driver(webdriver.Capabilities.firefox());
|
||||
driver = new firefox.Driver(webdriver.Capabilities.firefox(), new webdriver.promise.ControlFlow());
|
||||
|
||||
var baseDriver: webdriver.WebDriver = driver;
|
||||
const baseDriver: webdriver.WebDriver = driver;
|
||||
}
|
||||
|
||||
function TestFirefoxOptions() {
|
||||
@@ -29,7 +28,7 @@ function TestFirefoxOptions() {
|
||||
options = options.setProfile('profile');
|
||||
options = options.setProfile(new firefox.Profile());
|
||||
options = options.setProxy({ proxyType: 'proxy' });
|
||||
var capabilities: webdriver.Capabilities = options.toCapabilities();
|
||||
const capabilities: webdriver.Capabilities = options.toCapabilities();
|
||||
}
|
||||
|
||||
function TestFirefoxProfile() {
|
||||
@@ -40,8 +39,8 @@ function TestFirefoxProfile() {
|
||||
profile.addExtension('ext');
|
||||
bool = profile.assumeUntrustedCertIssuer();
|
||||
profile.encode().then((prof: string) => {});
|
||||
var num: number = profile.getPort();
|
||||
var anything: any = profile.getPreference('key');
|
||||
const num: number = profile.getPort();
|
||||
const anything: any = profile.getPreference('key');
|
||||
bool = profile.nativeEventsEnabled();
|
||||
profile.setAcceptUntrustedCerts(true);
|
||||
profile.setAssumeUntrustedCertIssuer(true);
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* tslint:disable */
|
||||
import * as webdriver from 'selenium-webdriver';
|
||||
import * as chrome from 'selenium-webdriver/chrome';
|
||||
import * as firefox from 'selenium-webdriver/firefox';
|
||||
@@ -7,21 +6,21 @@ import * as executors from 'selenium-webdriver/executors';
|
||||
import * as testing from 'selenium-webdriver/testing';
|
||||
|
||||
function TestExecutors() {
|
||||
var exec: webdriver.Executor = executors.createExecutor('url');
|
||||
var promise: webdriver.promise.Promise<string>;
|
||||
let exec: webdriver.Executor = executors.createExecutor('url');
|
||||
const promise: webdriver.promise.Promise<string> = {} as any;
|
||||
exec = executors.createExecutor(promise);
|
||||
}
|
||||
|
||||
function TestBuilder() {
|
||||
var builder: webdriver.Builder = new webdriver.Builder();
|
||||
let builder: webdriver.Builder = new webdriver.Builder();
|
||||
|
||||
var driver: webdriver.WebDriver = builder.build();
|
||||
const driver: webdriver.WebDriver = builder.build();
|
||||
builder = builder.forBrowser('name');
|
||||
builder = builder.forBrowser('name', 'version');
|
||||
builder = builder.forBrowser('name', 'version', 'platform');
|
||||
|
||||
var cap: webdriver.Capabilities = builder.getCapabilities();
|
||||
var str: string = builder.getServerUrl();
|
||||
const cap: webdriver.Capabilities = builder.getCapabilities();
|
||||
const str: string = builder.getServerUrl();
|
||||
|
||||
builder = builder.setAlertBehavior('behavior');
|
||||
builder = builder.setChromeOptions(new chrome.Options());
|
||||
@@ -38,13 +37,13 @@ function TestBuilder() {
|
||||
}
|
||||
|
||||
function TestActionSequence() {
|
||||
var driver: webdriver.WebDriver = new webdriver.Builder().
|
||||
const driver: webdriver.WebDriver = new webdriver.Builder().
|
||||
withCapabilities(webdriver.Capabilities.chrome()).
|
||||
build();
|
||||
|
||||
var sequence: webdriver.ActionSequence = new webdriver.ActionSequence(driver);
|
||||
var element: webdriver.WebElement = new webdriver.WebElement(driver, 'elementId');
|
||||
var promise: webdriver.promise.Promise<string>;
|
||||
let sequence: webdriver.ActionSequence = new webdriver.ActionSequence(driver);
|
||||
let element: webdriver.WebElement = new webdriver.WebElement(driver, 'elementId');
|
||||
const promise: webdriver.promise.Promise<string> = {} as any;
|
||||
element = new webdriver.WebElement(driver, promise);
|
||||
|
||||
// Click
|
||||
@@ -94,12 +93,12 @@ function TestActionSequence() {
|
||||
}
|
||||
|
||||
function TestTouchSequence() {
|
||||
var driver: webdriver.WebDriver = new webdriver.Builder().
|
||||
const driver: webdriver.WebDriver = new webdriver.Builder().
|
||||
withCapabilities(webdriver.Capabilities.chrome()).
|
||||
build();
|
||||
var element: webdriver.WebElement = new webdriver.WebElement(driver, 'elementId');
|
||||
const element: webdriver.WebElement = new webdriver.WebElement(driver, 'elementId');
|
||||
|
||||
var sequence: webdriver.TouchSequence = new webdriver.TouchSequence(driver);
|
||||
let sequence: webdriver.TouchSequence = new webdriver.TouchSequence(driver);
|
||||
|
||||
sequence = sequence.tap(element);
|
||||
sequence = sequence.doubleTap(element);
|
||||
@@ -116,11 +115,11 @@ function TestTouchSequence() {
|
||||
}
|
||||
|
||||
function TestAlert() {
|
||||
var driver: webdriver.WebDriver = new webdriver.Builder().
|
||||
const driver: webdriver.WebDriver = new webdriver.Builder().
|
||||
withCapabilities(webdriver.Capabilities.chrome()).
|
||||
build();
|
||||
|
||||
var alert: webdriver.Alert = driver.switchTo().alert();
|
||||
const alert: webdriver.Alert = driver.switchTo().alert();
|
||||
|
||||
alert.accept().then(() => {});
|
||||
alert.dismiss().then(() => {});
|
||||
@@ -129,7 +128,7 @@ function TestAlert() {
|
||||
}
|
||||
|
||||
function TestBrowser() {
|
||||
var browser: string;
|
||||
let browser: string;
|
||||
|
||||
browser = webdriver.Browser.ANDROID;
|
||||
browser = webdriver.Browser.CHROME;
|
||||
@@ -144,7 +143,7 @@ function TestBrowser() {
|
||||
}
|
||||
|
||||
function TestButton() {
|
||||
var button: string;
|
||||
let button: string;
|
||||
|
||||
button = webdriver.Button.LEFT;
|
||||
button = webdriver.Button.MIDDLE;
|
||||
@@ -152,14 +151,14 @@ function TestButton() {
|
||||
}
|
||||
|
||||
function TestCapabilities() {
|
||||
var capabilities: webdriver.Capabilities = new webdriver.Capabilities();
|
||||
let capabilities: webdriver.Capabilities = new webdriver.Capabilities();
|
||||
capabilities = new webdriver.Capabilities(webdriver.Capabilities.chrome());
|
||||
var objCapabilities: any = {};
|
||||
const objCapabilities: any = {};
|
||||
objCapabilities[webdriver.Capability.BROWSER_NAME] = webdriver.Browser.PHANTOM_JS;
|
||||
capabilities = new webdriver.Capabilities(objCapabilities);
|
||||
|
||||
var anything: any = capabilities.get(webdriver.Capability.SECURE_SSL);
|
||||
var check: boolean = capabilities.has(webdriver.Capability.SECURE_SSL);
|
||||
let anything: any = capabilities.get(webdriver.Capability.SECURE_SSL);
|
||||
const check: boolean = capabilities.has(webdriver.Capability.SECURE_SSL);
|
||||
capabilities = capabilities.merge(capabilities);
|
||||
capabilities = capabilities.merge(objCapabilities);
|
||||
capabilities = capabilities.set(webdriver.Capability.VERSION, { abc: 'def' });
|
||||
@@ -187,7 +186,7 @@ function TestCapabilities() {
|
||||
}
|
||||
|
||||
function TestCapability() {
|
||||
var capability: string;
|
||||
let capability: string;
|
||||
|
||||
capability = webdriver.Capability.ACCEPT_SSL_CERTS;
|
||||
capability = webdriver.Capability.BROWSER_NAME;
|
||||
@@ -209,24 +208,24 @@ function TestCapability() {
|
||||
}
|
||||
|
||||
function TestCommand() {
|
||||
var command: webdriver.Command = new webdriver.Command(webdriver.CommandName.ADD_COOKIE);
|
||||
let command: webdriver.Command = new webdriver.Command(webdriver.CommandName.ADD_COOKIE);
|
||||
|
||||
var name: string = command.getName();
|
||||
var param: any = command.getParameter('param');
|
||||
const name: string = command.getName();
|
||||
const param: any = command.getParameter('param');
|
||||
|
||||
var params: any = command.getParameters();
|
||||
const params: any = command.getParameters();
|
||||
|
||||
command = command.setParameter('param', 123);
|
||||
command = command.setParameters({ param: 123 });
|
||||
}
|
||||
|
||||
function TestDeferredExecutor() {
|
||||
var promise: webdriver.promise.Promise<webdriver.Executor>;
|
||||
var executor: webdriver.DeferredExecutor = new webdriver.DeferredExecutor(promise);
|
||||
const promise: webdriver.promise.Promise<webdriver.Executor> = {} as any;
|
||||
const executor: webdriver.DeferredExecutor = new webdriver.DeferredExecutor(promise);
|
||||
}
|
||||
|
||||
function TestCommandName() {
|
||||
var command: string;
|
||||
let command: string;
|
||||
|
||||
command = webdriver.CommandName.ACCEPT_ALERT;
|
||||
command = webdriver.CommandName.ADD_COOKIE;
|
||||
@@ -327,21 +326,21 @@ function TestCommandName() {
|
||||
}
|
||||
|
||||
function TestEventEmitter() {
|
||||
var emitter: webdriver.EventEmitter = new webdriver.EventEmitter();
|
||||
let emitter: webdriver.EventEmitter = new webdriver.EventEmitter();
|
||||
|
||||
var callback = (a: number, b: number, c: number) => {};
|
||||
const callback = (a: number, b: number, c: number) => {};
|
||||
|
||||
emitter = emitter.addListener('ABC', callback);
|
||||
emitter = emitter.addListener('ABC', callback, this);
|
||||
|
||||
emitter.emit('ABC', 1, 2, 3);
|
||||
|
||||
var listeners = emitter.listeners('ABC');
|
||||
const listeners = emitter.listeners('ABC');
|
||||
if (listeners[0].oneshot) {
|
||||
listeners[0].fn.apply(listeners[0].scope);
|
||||
}
|
||||
var length: number = listeners.length;
|
||||
var listenerInfo = listeners[0];
|
||||
const length: number = listeners.length;
|
||||
const listenerInfo = listeners[0];
|
||||
if (listenerInfo.oneshot) {
|
||||
listenerInfo.fn.apply(listenerInfo.scope, [1, 2, 3]);
|
||||
}
|
||||
@@ -359,7 +358,7 @@ function TestEventEmitter() {
|
||||
}
|
||||
|
||||
function TestKey() {
|
||||
var key: string;
|
||||
let key: string;
|
||||
|
||||
key = webdriver.Key.ADD;
|
||||
key = webdriver.Key.ALT;
|
||||
@@ -424,13 +423,13 @@ function TestKey() {
|
||||
}
|
||||
|
||||
function TestBy() {
|
||||
var driver: webdriver.WebDriver = new webdriver.Builder().
|
||||
const driver: webdriver.WebDriver = new webdriver.Builder().
|
||||
withCapabilities(webdriver.Capabilities.chrome()).
|
||||
build();
|
||||
|
||||
var locator: webdriver.By = new webdriver.By('class name', 'class');
|
||||
let locator: webdriver.By = new webdriver.By('class name', 'class');
|
||||
|
||||
var str: string = locator.toString();
|
||||
const str: string = locator.toString();
|
||||
|
||||
locator = webdriver.By.className('class');
|
||||
locator = webdriver.By.css('css');
|
||||
@@ -442,9 +441,9 @@ function TestBy() {
|
||||
locator = webdriver.By.xpath('xpath');
|
||||
|
||||
// Can import 'By' without import declarations
|
||||
var By = webdriver.By;
|
||||
const By = webdriver.By;
|
||||
|
||||
var locatorHash: webdriver.ByHash;
|
||||
let locatorHash: webdriver.ByHash;
|
||||
locatorHash = { className: 'class' };
|
||||
locatorHash = { css: 'css' };
|
||||
locatorHash = { id: 'id' };
|
||||
@@ -458,53 +457,53 @@ function TestBy() {
|
||||
}
|
||||
|
||||
function TestSession() {
|
||||
var session: webdriver.Session = new webdriver.Session('ABC', webdriver.Capabilities.android());
|
||||
var capabilitiesObj: any = {};
|
||||
let session: webdriver.Session = new webdriver.Session('ABC', webdriver.Capabilities.android());
|
||||
const capabilitiesObj: any = {};
|
||||
capabilitiesObj[webdriver.Capability.BROWSER_NAME] = webdriver.Browser.ANDROID;
|
||||
capabilitiesObj[webdriver.Capability.PLATFORM] = 'ANDROID';
|
||||
session = new webdriver.Session('ABC', capabilitiesObj);
|
||||
|
||||
var capabilities: webdriver.Capabilities = session.getCapabilities();
|
||||
var capability: any = session.getCapability(webdriver.Capability.BROWSER_NAME);
|
||||
var id: string = session.getId();
|
||||
var data: string = session.toJSON();
|
||||
const capabilities: webdriver.Capabilities = session.getCapabilities();
|
||||
const capability: any = session.getCapability(webdriver.Capability.BROWSER_NAME);
|
||||
const id: string = session.getId();
|
||||
const data: string = session.toJSON();
|
||||
}
|
||||
|
||||
function TestUnhandledAlertError() {
|
||||
var someFunc = (error: webdriver.UnhandledAlertError) => {
|
||||
var baseError: Error = error;
|
||||
var str: string = error.getAlertText();
|
||||
const someFunc = (error: webdriver.UnhandledAlertError) => {
|
||||
const baseError: Error = error;
|
||||
let str: string = error.getAlertText();
|
||||
str = error.toString();
|
||||
};
|
||||
}
|
||||
|
||||
function TestWebDriverFileDetector() {
|
||||
var driver: webdriver.WebDriver = new webdriver.Builder().
|
||||
const driver: webdriver.WebDriver = new webdriver.Builder().
|
||||
withCapabilities(webdriver.Capabilities.chrome()).
|
||||
build();
|
||||
|
||||
var fileDetector: webdriver.FileDetector = new webdriver.FileDetector();
|
||||
const fileDetector: webdriver.FileDetector = new webdriver.FileDetector();
|
||||
|
||||
fileDetector.handleFile(driver, 'path/to/file').then((path: string) => {});
|
||||
}
|
||||
|
||||
function TestWebDriverLogs() {
|
||||
var driver: webdriver.WebDriver = new webdriver.Builder().
|
||||
const driver: webdriver.WebDriver = new webdriver.Builder().
|
||||
withCapabilities(webdriver.Capabilities.chrome()).
|
||||
build();
|
||||
|
||||
var logs: webdriver.Logs = new webdriver.Logs(driver);
|
||||
const logs: webdriver.Logs = new webdriver.Logs(driver);
|
||||
|
||||
logs.get(webdriver.logging.Type.BROWSER).then((entries: webdriver.logging.Entry[]) => {});
|
||||
logs.getAvailableLogTypes().then((types: string[]) => {});
|
||||
}
|
||||
|
||||
function TestWebDriverNavigation() {
|
||||
var driver: webdriver.WebDriver = new webdriver.Builder().
|
||||
const driver: webdriver.WebDriver = new webdriver.Builder().
|
||||
withCapabilities(webdriver.Capabilities.chrome()).
|
||||
build();
|
||||
|
||||
var navigation: webdriver.Navigation = new webdriver.Navigation(driver);
|
||||
const navigation: webdriver.Navigation = new webdriver.Navigation(driver);
|
||||
|
||||
navigation.back().then(() => {});
|
||||
navigation.forward().then(() => {});
|
||||
@@ -513,12 +512,12 @@ function TestWebDriverNavigation() {
|
||||
}
|
||||
|
||||
function TestWebDriverOptions() {
|
||||
var driver: webdriver.WebDriver = new webdriver.Builder().
|
||||
const driver: webdriver.WebDriver = new webdriver.Builder().
|
||||
withCapabilities(webdriver.Capabilities.chrome()).
|
||||
build();
|
||||
|
||||
var options: webdriver.Options = new webdriver.Options(driver);
|
||||
var promise: webdriver.promise.Promise<void>;
|
||||
const options: webdriver.Options = new webdriver.Options(driver);
|
||||
let promise: webdriver.promise.Promise<void>;
|
||||
|
||||
// Add Cookie
|
||||
promise = options.addCookie('name', 'value');
|
||||
@@ -533,33 +532,33 @@ function TestWebDriverOptions() {
|
||||
options.getCookie('name').then((cookies: webdriver.IWebDriverOptionsCookie) => {});
|
||||
options.getCookies().then((cookies: webdriver.IWebDriverOptionsCookie[]) => {});
|
||||
|
||||
var logs: webdriver.Logs = options.logs();
|
||||
var timeouts: webdriver.Timeouts = options.timeouts();
|
||||
var window: webdriver.Window = options.window();
|
||||
const logs: webdriver.Logs = options.logs();
|
||||
const timeouts: webdriver.Timeouts = options.timeouts();
|
||||
const window: webdriver.Window = options.window();
|
||||
}
|
||||
|
||||
function TestWebDriverTargetLocator() {
|
||||
var driver: webdriver.WebDriver = new webdriver.Builder().
|
||||
const driver: webdriver.WebDriver = new webdriver.Builder().
|
||||
withCapabilities(webdriver.Capabilities.chrome()).
|
||||
build();
|
||||
|
||||
var locator: webdriver.TargetLocator = new webdriver.TargetLocator(driver);
|
||||
var promise: webdriver.promise.Promise<void>;
|
||||
const locator: webdriver.TargetLocator = new webdriver.TargetLocator(driver);
|
||||
let promise: webdriver.promise.Promise<void>;
|
||||
|
||||
var element: webdriver.WebElement = locator.activeElement();
|
||||
var alert: webdriver.Alert = locator.alert();
|
||||
const element: webdriver.WebElement = locator.activeElement();
|
||||
const alert: webdriver.Alert = locator.alert();
|
||||
promise = locator.defaultContent();
|
||||
promise = locator.frame(1);
|
||||
promise = locator.window('nameOrHandle');
|
||||
}
|
||||
|
||||
function TestWebDriverTimeouts() {
|
||||
var driver: webdriver.WebDriver = new webdriver.Builder().
|
||||
const driver: webdriver.WebDriver = new webdriver.Builder().
|
||||
withCapabilities(webdriver.Capabilities.chrome()).
|
||||
build();
|
||||
|
||||
var timeouts: webdriver.Timeouts = new webdriver.Timeouts(driver);
|
||||
var promise: webdriver.promise.Promise<void>;
|
||||
const timeouts: webdriver.Timeouts = new webdriver.Timeouts(driver);
|
||||
let promise: webdriver.promise.Promise<void>;
|
||||
|
||||
promise = timeouts.implicitlyWait(123);
|
||||
promise = timeouts.pageLoadTimeout(123);
|
||||
@@ -567,14 +566,14 @@ function TestWebDriverTimeouts() {
|
||||
}
|
||||
|
||||
function TestWebDriverWindow() {
|
||||
var driver: webdriver.WebDriver = new webdriver.Builder().
|
||||
const driver: webdriver.WebDriver = new webdriver.Builder().
|
||||
withCapabilities(webdriver.Capabilities.chrome()).
|
||||
build();
|
||||
|
||||
var window: webdriver.Window = new webdriver.Window(driver);
|
||||
var locationPromise: webdriver.promise.Promise<webdriver.ILocation>;
|
||||
var sizePromise: webdriver.promise.Promise<webdriver.ISize>;
|
||||
var voidPromise: webdriver.promise.Promise<void>;
|
||||
const window: webdriver.Window = new webdriver.Window(driver);
|
||||
let locationPromise: webdriver.promise.Promise<webdriver.ILocation>;
|
||||
let sizePromise: webdriver.promise.Promise<webdriver.ISize>;
|
||||
let voidPromise: webdriver.promise.Promise<void>;
|
||||
|
||||
locationPromise = window.getPosition();
|
||||
sizePromise = window.getSize();
|
||||
@@ -584,26 +583,26 @@ function TestWebDriverWindow() {
|
||||
}
|
||||
|
||||
function TestWebDriver() {
|
||||
var session: webdriver.Session = new webdriver.Session('ABC', webdriver.Capabilities.android());
|
||||
var sessionPromise: webdriver.promise.Promise<webdriver.Session>;
|
||||
var executor: webdriver.Executor = executors.createExecutor('http://someserver');
|
||||
var flow: webdriver.promise.ControlFlow = new webdriver.promise.ControlFlow();
|
||||
var driver: webdriver.WebDriver = new webdriver.WebDriver(session, executor);
|
||||
const session: webdriver.Session = new webdriver.Session('ABC', webdriver.Capabilities.android());
|
||||
const sessionPromise: webdriver.promise.Promise<webdriver.Session> = {} as any;
|
||||
const executor: webdriver.Executor = executors.createExecutor('http://someserver');
|
||||
let flow: webdriver.promise.ControlFlow = new webdriver.promise.ControlFlow();
|
||||
let driver: webdriver.WebDriver = new webdriver.WebDriver(session, executor);
|
||||
driver = new webdriver.WebDriver(session, executor, flow);
|
||||
driver = new webdriver.WebDriver(sessionPromise, executor);
|
||||
driver = new webdriver.WebDriver(sessionPromise, executor, flow);
|
||||
|
||||
var voidPromise: webdriver.promise.Promise<void>;
|
||||
var stringPromise: webdriver.promise.Promise<string>;
|
||||
var booleanPromise: webdriver.promise.Promise<boolean>;
|
||||
let voidPromise: webdriver.promise.Promise<void>;
|
||||
let stringPromise: webdriver.promise.Promise<string>;
|
||||
let booleanPromise: webdriver.promise.Promise<boolean>;
|
||||
|
||||
var actions: webdriver.ActionSequence = driver.actions();
|
||||
var touchActions: webdriver.TouchSequence = driver.touchActions();
|
||||
const actions: webdriver.ActionSequence = driver.actions();
|
||||
const touchActions: webdriver.TouchSequence = driver.touchActions();
|
||||
|
||||
// call
|
||||
stringPromise = driver.call<string>(() => 'value');
|
||||
stringPromise = driver.call<string>(() => stringPromise);
|
||||
stringPromise = driver.call<string>(() => { var d: any = this; return 'value'; }, driver);
|
||||
stringPromise = driver.call<string>(() => { const d: any = this; return 'value'; }, driver);
|
||||
stringPromise = driver.call<string>((a: number) => 'value', driver, 1);
|
||||
|
||||
voidPromise = driver.close();
|
||||
@@ -622,7 +621,7 @@ function TestWebDriver() {
|
||||
stringPromise = driver.executeScript<string>((a: number) => {}, 1);
|
||||
|
||||
// findElement
|
||||
var element: webdriver.WebElement;
|
||||
let element: webdriver.WebElement;
|
||||
element = driver.findElement(webdriver.By.id('ABC'));
|
||||
element = driver.findElement(webdriver.By.js('function(){}'));
|
||||
|
||||
@@ -642,11 +641,11 @@ function TestWebDriver() {
|
||||
booleanPromise = driver.isElementPresent(webdriver.By.className('ABC'));
|
||||
booleanPromise = driver.isElementPresent(webdriver.By.js('function(){}'));
|
||||
|
||||
var options: webdriver.Options = driver.manage();
|
||||
var navigation: webdriver.Navigation = driver.navigate();
|
||||
var locator: webdriver.TargetLocator = driver.switchTo();
|
||||
const options: webdriver.Options = driver.manage();
|
||||
const navigation: webdriver.Navigation = driver.navigate();
|
||||
const locator: webdriver.TargetLocator = driver.switchTo();
|
||||
|
||||
var fileDetector: webdriver.FileDetector = new webdriver.FileDetector();
|
||||
const fileDetector: webdriver.FileDetector = new webdriver.FileDetector();
|
||||
driver.setFileDetector(fileDetector);
|
||||
|
||||
voidPromise = driver.quit();
|
||||
@@ -654,7 +653,7 @@ function TestWebDriver() {
|
||||
voidPromise = driver.sleep(123);
|
||||
stringPromise = driver.takeScreenshot();
|
||||
|
||||
var booleanCondition: webdriver.until.Condition<boolean>;
|
||||
const booleanCondition: webdriver.until.Condition<boolean> = {} as any;
|
||||
booleanPromise = driver.wait(booleanPromise);
|
||||
booleanPromise = driver.wait(booleanCondition);
|
||||
booleanPromise = driver.wait((driver: webdriver.WebDriver) => true);
|
||||
@@ -668,24 +667,24 @@ function TestWebDriver() {
|
||||
}
|
||||
|
||||
function TestSerializable() {
|
||||
var serializable: webdriver.Serializable<string>;
|
||||
var serial: string | webdriver.promise.IThenable<string> = serializable.serialize();
|
||||
const serializable: webdriver.Serializable<string> = {} as any;
|
||||
const serial: string | webdriver.promise.IThenable<string> = serializable.serialize();
|
||||
}
|
||||
|
||||
function TestWebElement() {
|
||||
var driver: webdriver.WebDriver = new webdriver.Builder().
|
||||
let driver: webdriver.WebDriver = new webdriver.Builder().
|
||||
withCapabilities(webdriver.Capabilities.chrome()).
|
||||
build();
|
||||
|
||||
var promise: webdriver.promise.Promise<string>;
|
||||
var element: webdriver.WebElement;
|
||||
const promise: webdriver.promise.Promise<string> = {} as any;
|
||||
let element: webdriver.WebElement;
|
||||
|
||||
element = new webdriver.WebElement(driver, 'elementId');
|
||||
element = new webdriver.WebElement(driver, promise);
|
||||
|
||||
var voidPromise: webdriver.promise.Promise<void>;
|
||||
var stringPromise: webdriver.promise.Promise<string>;
|
||||
var booleanPromise: webdriver.promise.Promise<boolean>;
|
||||
let voidPromise: webdriver.promise.Promise<void>;
|
||||
let stringPromise: webdriver.promise.Promise<string>;
|
||||
let booleanPromise: webdriver.promise.Promise<boolean>;
|
||||
|
||||
voidPromise = element.clear();
|
||||
voidPromise = element.click();
|
||||
@@ -720,16 +719,16 @@ function TestWebElement() {
|
||||
}
|
||||
|
||||
function TestWebElementPromise() {
|
||||
var driver: webdriver.WebDriver = new webdriver.Builder().
|
||||
const driver: webdriver.WebDriver = new webdriver.Builder().
|
||||
withCapabilities(webdriver.Capabilities.chrome()).
|
||||
build();
|
||||
|
||||
var elementPromise: webdriver.WebElementPromise = driver.findElement(webdriver.By.id('id'));
|
||||
const elementPromise: webdriver.WebElementPromise = driver.findElement(webdriver.By.id('id'));
|
||||
|
||||
elementPromise.cancel();
|
||||
elementPromise.cancel('reason');
|
||||
|
||||
var bool: boolean = elementPromise.isPending();
|
||||
const bool: boolean = elementPromise.isPending();
|
||||
|
||||
elementPromise.then();
|
||||
elementPromise.then((element: webdriver.WebElement) => {});
|
||||
@@ -742,11 +741,11 @@ function TestWebElementPromise() {
|
||||
}
|
||||
|
||||
function TestLogging() {
|
||||
var preferences: webdriver.logging.Preferences = new webdriver.logging.Preferences();
|
||||
const preferences: webdriver.logging.Preferences = new webdriver.logging.Preferences();
|
||||
preferences.setLevel(webdriver.logging.Type.BROWSER, webdriver.logging.Level.ALL);
|
||||
var prefs: any = preferences.toJSON();
|
||||
const prefs: any = preferences.toJSON();
|
||||
|
||||
var level: webdriver.logging.Level = webdriver.logging.getLevel('OFF');
|
||||
let level: webdriver.logging.Level = webdriver.logging.getLevel('OFF');
|
||||
level = webdriver.logging.getLevel(1);
|
||||
|
||||
level = webdriver.logging.Level.ALL;
|
||||
@@ -756,10 +755,10 @@ function TestLogging() {
|
||||
level = webdriver.logging.Level.SEVERE;
|
||||
level = webdriver.logging.Level.WARNING;
|
||||
|
||||
var name: string = level.name;
|
||||
var value: number = level.value;
|
||||
const name: string = level.name;
|
||||
const value: number = level.value;
|
||||
|
||||
var type: string;
|
||||
let type: string;
|
||||
type = webdriver.logging.Type.BROWSER;
|
||||
type = webdriver.logging.Type.CLIENT;
|
||||
type = webdriver.logging.Type.DRIVER;
|
||||
@@ -768,7 +767,7 @@ function TestLogging() {
|
||||
}
|
||||
|
||||
function TestLoggingEntry() {
|
||||
var entry: webdriver.logging.Entry;
|
||||
let entry: webdriver.logging.Entry;
|
||||
|
||||
entry = new webdriver.logging.Entry(webdriver.logging.Level.ALL, 'ABC');
|
||||
entry = new webdriver.logging.Entry('ALL', 'ABC');
|
||||
@@ -777,23 +776,22 @@ function TestLoggingEntry() {
|
||||
entry = new webdriver.logging.Entry(webdriver.logging.Level.ALL, 'ABC', 123, webdriver.logging.Type.BROWSER);
|
||||
entry = new webdriver.logging.Entry('ALL', 'ABC', 123, webdriver.logging.Type.BROWSER);
|
||||
|
||||
var entryObj: any = entry.toJSON();
|
||||
const entryObj: any = entry.toJSON();
|
||||
|
||||
var message: string = entry.message;
|
||||
var timestamp: number = entry.timestamp;
|
||||
var type: string = entry.type;
|
||||
const message: string = entry.message;
|
||||
const timestamp: number = entry.timestamp;
|
||||
const type: string = entry.type;
|
||||
}
|
||||
|
||||
function TestPromiseModule() {
|
||||
var cancellationError: webdriver.promise.CancellationError = new webdriver.promise.CancellationError();
|
||||
let cancellationError: webdriver.promise.CancellationError = new webdriver.promise.CancellationError();
|
||||
cancellationError = new webdriver.promise.CancellationError('message');
|
||||
var str: string = cancellationError.message;
|
||||
let str: string = cancellationError.message;
|
||||
str = cancellationError.name;
|
||||
|
||||
var stringPromise: webdriver.promise.Promise<string>;
|
||||
var numberPromise: webdriver.promise.Promise<number>;
|
||||
var booleanPromise: webdriver.promise.Promise<boolean>;
|
||||
var voidPromise: webdriver.promise.Promise<void>;
|
||||
let stringPromise: webdriver.promise.Promise<string>;
|
||||
let numberPromise: webdriver.promise.Promise<number>;
|
||||
let voidPromise: webdriver.promise.Promise<void>;
|
||||
|
||||
webdriver.promise.all([stringPromise]).then((values: string[]) => {});
|
||||
|
||||
@@ -811,7 +809,7 @@ function TestPromiseModule() {
|
||||
webdriver.promise.consume((a: number, b: number, c: number) => 5, this, 1, 2, 3)
|
||||
.then((value: number) => {});
|
||||
|
||||
var numbersPromise: webdriver.promise.Promise<number[]> = webdriver.promise.filter([1, 2, 3], (element: number, type: any, index: number, arr: number[]) => {
|
||||
let numbersPromise: webdriver.promise.Promise<number[]> = webdriver.promise.filter([1, 2, 3], (element: number, type: any, index: number, arr: number[]) => {
|
||||
return true;
|
||||
});
|
||||
numbersPromise = webdriver.promise.filter([1, 2, 3], (element: number, type: any, index: number, arr: number[]) => {
|
||||
@@ -837,11 +835,11 @@ function TestPromiseModule() {
|
||||
return true;
|
||||
}, this);
|
||||
|
||||
var flow: webdriver.promise.ControlFlow = webdriver.promise.controlFlow();
|
||||
const flow: webdriver.promise.ControlFlow = webdriver.promise.controlFlow();
|
||||
|
||||
stringPromise = webdriver.promise.createFlow<string>((newFlow: webdriver.promise.ControlFlow) => 'ABC');
|
||||
|
||||
var deferred: webdriver.promise.Deferred<string>;
|
||||
let deferred: webdriver.promise.Deferred<string>;
|
||||
deferred = webdriver.promise.defer();
|
||||
deferred = webdriver.promise.defer();
|
||||
|
||||
@@ -857,8 +855,8 @@ function TestPromiseModule() {
|
||||
|
||||
stringPromise = webdriver.promise.fullyResolved('abc');
|
||||
|
||||
var bool: boolean = webdriver.promise.isGenerator(() => {});
|
||||
var isPromise: boolean = webdriver.promise.isPromise('ABC');
|
||||
const bool: boolean = webdriver.promise.isGenerator(() => {});
|
||||
const isPromise: boolean = webdriver.promise.isPromise('ABC');
|
||||
|
||||
stringPromise = webdriver.promise.rejected('{a: 123}');
|
||||
|
||||
@@ -868,18 +866,18 @@ function TestPromiseModule() {
|
||||
}
|
||||
|
||||
function TestUntilModule() {
|
||||
var driver: webdriver.WebDriver = new webdriver.Builder().
|
||||
const driver: webdriver.WebDriver = new webdriver.Builder().
|
||||
withCapabilities(webdriver.Capabilities.chrome()).
|
||||
build();
|
||||
|
||||
var conditionB: webdriver.until.Condition<boolean> = new webdriver.until.Condition<boolean>('message', (driver: webdriver.WebDriver) => true);
|
||||
var conditionBBase: webdriver.until.Condition<boolean> = conditionB;
|
||||
var conditionWebElement: webdriver.until.Condition<webdriver.WebElement>;
|
||||
var conditionWebElements: webdriver.until.Condition<webdriver.WebElement[]>;
|
||||
let conditionB: webdriver.until.Condition<boolean> = new webdriver.until.Condition<boolean>('message', (driver: webdriver.WebDriver) => true);
|
||||
const conditionBBase: webdriver.until.Condition<boolean> = conditionB;
|
||||
let conditionWebElement: webdriver.until.Condition<webdriver.WebElement>;
|
||||
let conditionWebElements: webdriver.until.Condition<webdriver.WebElement[]>;
|
||||
|
||||
conditionB = webdriver.until.ableToSwitchToFrame(5);
|
||||
var conditionAlert: webdriver.until.Condition<webdriver.Alert> = webdriver.until.alertIsPresent();
|
||||
var el: webdriver.WebElement = driver.findElement(webdriver.By.id('id'));
|
||||
const conditionAlert: webdriver.until.Condition<webdriver.Alert> = webdriver.until.alertIsPresent();
|
||||
const el: webdriver.WebElement = driver.findElement(webdriver.By.id('id'));
|
||||
conditionB = webdriver.until.elementIsDisabled(el);
|
||||
conditionB = webdriver.until.elementIsEnabled(el);
|
||||
conditionB = webdriver.until.elementIsNotSelected(el);
|
||||
@@ -899,31 +897,31 @@ function TestUntilModule() {
|
||||
}
|
||||
|
||||
function TestControlFlow() {
|
||||
var flow: webdriver.promise.ControlFlow;
|
||||
let flow: webdriver.promise.ControlFlow;
|
||||
flow = new webdriver.promise.ControlFlow();
|
||||
|
||||
var emitter: webdriver.EventEmitter = flow;
|
||||
const emitter: webdriver.EventEmitter = flow;
|
||||
|
||||
var eventType: string;
|
||||
let eventType: string;
|
||||
|
||||
eventType = webdriver.promise.ControlFlow.EventType.IDLE;
|
||||
eventType = webdriver.promise.ControlFlow.EventType.RESET;
|
||||
eventType = webdriver.promise.ControlFlow.EventType.SCHEDULE_TASK;
|
||||
eventType = webdriver.promise.ControlFlow.EventType.UNCAUGHT_EXCEPTION;
|
||||
|
||||
var stringPromise: webdriver.promise.Promise<string>;
|
||||
let stringPromise: webdriver.promise.Promise<string>;
|
||||
stringPromise = flow.execute(() => 'value');
|
||||
stringPromise = flow.execute(() => stringPromise);
|
||||
stringPromise = flow.execute(() => stringPromise, 'Description');
|
||||
|
||||
var schedule: string;
|
||||
let schedule: string;
|
||||
schedule = flow.toString();
|
||||
schedule = flow.getSchedule();
|
||||
schedule = flow.getSchedule(true);
|
||||
|
||||
flow.reset();
|
||||
|
||||
var voidPromise: webdriver.promise.Promise<void> = flow.timeout(123);
|
||||
let voidPromise: webdriver.promise.Promise<void> = flow.timeout(123);
|
||||
voidPromise = flow.timeout(123, 'Description');
|
||||
|
||||
stringPromise = flow.wait(stringPromise);
|
||||
@@ -934,12 +932,12 @@ function TestControlFlow() {
|
||||
}
|
||||
|
||||
function TestDeferred() {
|
||||
var deferred: webdriver.promise.Deferred<string>;
|
||||
let deferred: webdriver.promise.Deferred<string>;
|
||||
|
||||
deferred = new webdriver.promise.Deferred<string>();
|
||||
deferred = new webdriver.promise.Deferred<string>(new webdriver.promise.ControlFlow());
|
||||
|
||||
var promise: webdriver.promise.Promise<string> = deferred.promise;
|
||||
const promise: webdriver.promise.Promise<string> = deferred.promise;
|
||||
|
||||
deferred.errback(new Error('Error'));
|
||||
deferred.errback('Error');
|
||||
@@ -950,15 +948,15 @@ function TestDeferred() {
|
||||
}
|
||||
|
||||
function TestPromiseClass() {
|
||||
var controlFlow: webdriver.promise.ControlFlow;
|
||||
var promise: webdriver.promise.Promise<string>;
|
||||
promise = new webdriver.promise.Promise<string>((resolve: (value: string) => void, reject: () => void) => {});
|
||||
promise = new webdriver.promise.Promise<string>((resolve: (value: webdriver.promise.Promise<string>) => void, reject: () => void) => {});
|
||||
promise = new webdriver.promise.Promise<string>((resolve: (value: string) => void, reject: () => void) => {}, controlFlow);
|
||||
const controlFlow: webdriver.promise.ControlFlow = {} as any;
|
||||
let promise: webdriver.promise.Promise<string>;
|
||||
promise = new webdriver.promise.Promise<string>((resolve: (value: string) => void, reject: (reason: any) => void) => {});
|
||||
promise = new webdriver.promise.Promise<string>((resolve: (value: webdriver.promise.Promise<string>) => void, reject: (reason: any) => void) => {});
|
||||
promise = new webdriver.promise.Promise<string>((resolve: (value: string) => void, reject: (readon: any) => void) => {}, controlFlow);
|
||||
|
||||
promise.cancel('Abort');
|
||||
|
||||
var isPending: boolean = promise.isPending();
|
||||
const isPending: boolean = promise.isPending();
|
||||
|
||||
promise = promise.then();
|
||||
promise = promise.then((a: string) => 'cde');
|
||||
@@ -971,13 +969,13 @@ function TestPromiseClass() {
|
||||
}
|
||||
|
||||
function TestThenableClass() {
|
||||
var thenable: webdriver.promise.Promise<string> = new webdriver.promise.Promise<string>((resolve, reject) => {
|
||||
let thenable: webdriver.promise.Promise<string> = new webdriver.promise.Promise<string>((resolve, reject) => {
|
||||
resolve('a');
|
||||
});
|
||||
|
||||
thenable.cancel('Abort');
|
||||
|
||||
var isPending: boolean = thenable.isPending();
|
||||
const isPending: boolean = thenable.isPending();
|
||||
|
||||
thenable = thenable.then((a: string) => 'cde');
|
||||
thenable = thenable.then((a: string) => 'cde', (e: any) => {});
|
||||
@@ -989,7 +987,7 @@ function TestThenableClass() {
|
||||
}
|
||||
|
||||
function TestErrorCode() {
|
||||
var errorCode: number;
|
||||
let errorCode: number;
|
||||
|
||||
errorCode = new webdriver.error.ElementNotSelectableError().code();
|
||||
errorCode = new webdriver.error.ElementNotVisibleError().code();
|
||||
@@ -1018,8 +1016,8 @@ function TestErrorCode() {
|
||||
}
|
||||
|
||||
async function TestAsyncAwaitable() {
|
||||
var thenable: webdriver.promise.Promise<string> = new webdriver.promise.Promise<string>((resolve, reject) => resolve('foo'));
|
||||
var str: string = await thenable;
|
||||
const thenable: webdriver.promise.Promise<string> = new webdriver.promise.Promise<string>((resolve, reject) => resolve('foo'));
|
||||
const str: string = await thenable;
|
||||
}
|
||||
|
||||
function TestTestingModule() {
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
/* tslint:disable */
|
||||
|
||||
import * as remote from "selenium-webdriver/remote";
|
||||
import * as webdriver from "selenium-webdriver";
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
/* tslint:disable:only-arrow-functions */
|
||||
|
||||
function test_form_static() {
|
||||
$.fn.form.settings.error!.method = 'method';
|
||||
$.fn.form.settings.namespace = 'namespace';
|
||||
@@ -216,7 +214,7 @@ function adding_rules_programmatically() {
|
||||
{
|
||||
// lets toggle some validation based on button
|
||||
$('.add.example .ui.positive.button')
|
||||
.on('click', function() {
|
||||
.on('click', () => {
|
||||
$('.add.example .ui.form')
|
||||
// adding longform
|
||||
.form('add rule', 'gender', {
|
||||
@@ -233,7 +231,7 @@ function adding_rules_programmatically() {
|
||||
}
|
||||
{
|
||||
$('.add.example .ui.negative.button')
|
||||
.on('click', function() {
|
||||
.on('click', () => {
|
||||
$('.add.example .ui.form')
|
||||
// removing multiple at once
|
||||
.form('remove fields', ['gender', 'password']);
|
||||
|
||||
Vendored
+3
-5
@@ -269,17 +269,15 @@ export class SMTPServer extends EventEmitter {
|
||||
constructor(options?: SMTPServerOptions);
|
||||
|
||||
/** Start listening on selected port and interface */
|
||||
/* tslint:disable:unified-signatures */
|
||||
listen(port?: number, hostname?: string, backlog?: number, listeningListener?: () => void): net.Server;
|
||||
listen(port?: number, hostname?: string, listeningListener?: () => void): net.Server;
|
||||
listen(port?: number, backlog?: number, listeningListener?: () => void): net.Server;
|
||||
listen(port?: number, backlog?: number, listeningListener?: () => void): net.Server; // tslint:disable-line unified-signatures
|
||||
listen(port?: number, listeningListener?: () => void): net.Server;
|
||||
listen(path: string, backlog?: number, listeningListener?: () => void): net.Server;
|
||||
listen(path: string, listeningListener?: () => void): void;
|
||||
listen(options: net.ListenOptions, listeningListener?: () => void): net.Server;
|
||||
listen(handle: any, backlog?: number, listeningListener?: () => void): net.Server;
|
||||
listen(handle: any, listeningListener?: () => void): net.Server;
|
||||
/* tslint:enable:unified-signatures */
|
||||
listen(handle: any, backlog?: number, listeningListener?: () => void): net.Server; // tslint:disable-line unified-signatures
|
||||
listen(handle: any, listeningListener?: () => void): net.Server; // tslint:disable-line unified-signatures
|
||||
|
||||
/** Closes the server */
|
||||
close(callback: (err?: Error | null) => void): void;
|
||||
|
||||
+1
-1
@@ -165,7 +165,7 @@ export interface BaseSecurity {
|
||||
description?: string;
|
||||
}
|
||||
|
||||
// tslint:disable:no-empty-interface
|
||||
// tslint:disable-next-line no-empty-interface
|
||||
export interface BasicAuthenticationSecurity extends BaseSecurity {
|
||||
// It's the exact same interface as BaseSecurity
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import * as swagger from "swagger-schema-official";
|
||||
|
||||
// tslint:disable:max-line-length
|
||||
|
||||
const apiExample: swagger.Spec = {
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
"max-line-length": false,
|
||||
"object-literal-key-quotes": false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user