Miscellaneous lint fixes (#20849)

This commit is contained in:
Andy 2017-10-22 15:22:50 -07:00 committed by GitHub
parent 4a0d3be1c0
commit 097d2acf71
129 changed files with 439 additions and 814 deletions

View File

@ -3,6 +3,7 @@
"rules": {
"interface-name": [false],
"ban-types": false,
"no-redundant-jsdoc": false,
"no-unnecessary-qualifier": false
}
}

View File

@ -67,7 +67,7 @@ declare module 'angular' {
* If the filter function returns a string it will be passed as the message
* argument to the start method of the service.
*
* @param {angular.IRequestConfig} config - the Angular request config object.
* @param config the Angular request config object.
*
*/
requestFilter?(config: IRequestConfig): (string | boolean);
@ -123,7 +123,7 @@ declare module 'angular' {
*
* This behaviour can be modified in the configuration.
*
* @param {string|IBlockUIConfig} messageOrOptions -
* @param messageOrOptions
* Either supply the message (string) to be show in the
* overlay or specify an IBlockUIConfig object that will be
* merged/extended into the block ui instance state.
@ -156,7 +156,7 @@ declare module 'angular' {
* Allows the message shown in the overlay to be updated
* while to block is active.
*
* @param {string} message - The message to show in the overlay.
* @param message The message to show in the overlay.
*/
message(message: string): void;

View File

@ -178,7 +178,7 @@ mod.controller('name', class {
// $onChanges(x: number) { }
});
mod.controller({
MyCtrl: class{},
MyCtrl: class {},
MyCtrl2() {},
MyCtrl3: ['$fooService', ($fooService: any) => { }]
});
@ -229,7 +229,7 @@ mod.provider(My.Namespace);
mod.service('name', ($scope: ng.IScope) => {});
mod.service('name', ['$scope', ($scope: ng.IScope) => {}]);
mod.service({
MyCtrl: class{},
MyCtrl: class {},
MyCtrl2: () => {}, // tslint:disable-line:object-literal-shorthand
MyCtrl3: ['$fooService', ($fooService: any) => {}]
});
@ -491,9 +491,7 @@ namespace TestInjector {
// $injector.instantiate
{
class Foobar {
constructor($q) {}
}
class Foobar {}
const result: Foobar = $injector.instantiate(Foobar);
}

View File

@ -1089,7 +1089,7 @@ declare namespace angular {
* Retrieves or overrides whether to generate an error when a rejected promise is not handled.
* This feature is enabled by default.
*
* @returns {boolean} Current value
* @returns Current value
*/
errorOnUnhandledRejections(): boolean;
@ -1097,8 +1097,8 @@ declare namespace angular {
* Retrieves or overrides whether to generate an error when a rejected promise is not handled.
* This feature is enabled by default.
*
* @param {boolean} value Whether to generate an error when a rejected promise is not handled.
* @returns {ng.IQProvider} Self for chaining otherwise.
* @param value Whether to generate an error when a rejected promise is not handled.
* @returns Self for chaining otherwise.
*/
errorOnUnhandledRejections(value: boolean): IQProvider;
}
@ -1109,8 +1109,8 @@ declare namespace angular {
* The successCallBack may return IPromise<never> for when a $q.reject() needs to be returned
* This method returns a new promise which is resolved or rejected via the return value of the successCallback, errorCallback. It also notifies via the return value of the notifyCallback method. The promise can not be resolved or rejected from the notifyCallback method.
*/
then<TResult>(successCallback: (promiseValue: T) => IPromise<TResult>|TResult, errorCallback?: null | undefined, notifyCallback?: (state: any) => any): IPromise<TResult>;
then<TResult1, TResult2>(successCallback: (promiseValue: T) => IPromise<TResult1>|TResult2, errorCallback?: null | undefined, notifyCallback?: (state: any) => any): IPromise<TResult1 | TResult2>;
then<TResult>(successCallback: (promiseValue: T) => IPromise<TResult>|TResult, errorCallback?: null, notifyCallback?: (state: any) => any): IPromise<TResult>;
then<TResult1, TResult2>(successCallback: (promiseValue: T) => IPromise<TResult1>|TResult2, errorCallback?: null, notifyCallback?: (state: any) => any): IPromise<TResult1 | TResult2>;
then<TResult, TCatch>(successCallback: (promiseValue: T) => IPromise<TResult>|TResult, errorCallback: (reason: any) => IPromise<TCatch>|TCatch, notifyCallback?: (state: any) => any): IPromise<TResult | TCatch>;
then<TResult1, TResult2, TCatch1, TCatch2>(successCallback: (promiseValue: T) => IPromise<TResult1>|TResult2, errorCallback: (reason: any) => IPromise<TCatch1>|TCatch2, notifyCallback?: (state: any) => any): IPromise<TResult1 | TResult2 | TCatch1 | TCatch2>;
@ -1639,9 +1639,8 @@ declare namespace angular {
useApplyAsync(value: boolean): IHttpProvider;
/**
*
* @param {boolean=} value If true, `$http` will return a normal promise without the `success` and `error` methods.
* @returns {boolean|Object} If a value is specified, returns the $httpProvider for chaining.
* @param value If true, `$http` will return a normal promise without the `success` and `error` methods.
* @returns If a value is specified, returns the $httpProvider for chaining.
* otherwise, returns the current configured value.
*/
useLegacyPromiseExtensions(value: boolean): boolean | IHttpProvider;
@ -1762,7 +1761,6 @@ declare namespace angular {
(tpl: string, ignoreRequestError?: boolean): IPromise<string>;
/**
* total amount of pending template requests being downloaded.
* @type {number}
*/
totalPendingRequests: number;
}

View File

@ -6,39 +6,23 @@
/**
* Options for function `start`
*
* @export
* @interface StartOptions
*/
export interface StartOptions {
/**
* Should annyang restart itself if it is closed indirectly, because of silence or window conflicts?
*
* @type {boolean}
*/
autoRestart?: boolean;
/**
* Allow forcing continuous mode on or off. Annyang is pretty smart about this, so only set this if you know what you're doing.
*
* @type {boolean}
*/
continuous?: boolean;
}
/**
* A command option that supports custom regular expressions
*
* @export
* @interface CommandOptionRegex
*/
export interface CommandOptionRegex {
/**
* @type {RegExp}
*/
regexp: RegExp;
/**
* @type {() => any}
*/
callback(): void;
}
@ -50,8 +34,6 @@ export interface CommandOptionRegex {
* {'hello :name': helloFunction, 'howdy': helloFunction};
* {'hi': helloFunction};
* ````
* @export
* @interface CommandOption
*/
export interface CommandOption {
[command: string]: CommandOptionRegex | (() => void);
@ -92,8 +74,6 @@ export interface Annyang {
/**
* Start listening.
* It's a good idea to call this after adding some commands first, but not mandatory.
*
* @param {StartOptions} options
*/
start(options?: StartOptions): void;
@ -119,15 +99,13 @@ export interface Annyang {
/**
* Turn on output of debug messages to the console. Ugly, but super-handy!
*
* @export
* @param {boolean} [newState=true] Turn on/off debug messages
* @param [newState=true] Turn on/off debug messages
*/
debug(newState?: boolean): void;
/**
* Set the language the user will speak in. If this method is not called, defaults to 'en-US'.
*
* @param {string} lang
* @see [Languages](https://github.com/TalAter/annyang/blob/master/docs/FAQ.md#what-languages-are-supported)
*/
setLanguage(lang: string): void;
@ -144,8 +122,6 @@ export interface Annyang {
* annyang.addCommands(commands2);
* // annyang will now listen to all three commands
* ````
*
* @param {CommandOption} commands
*/
addCommands(commands: CommandOption): void;
@ -161,7 +137,6 @@ export interface Annyang {
* // Remove all existing commands
* annyang.removeCommands();
* ````
* @param {string} command
*/
removeCommands(command?: string): void;
@ -175,37 +150,22 @@ export interface Annyang {
* // Don't respond to howdy or hi
* annyang.removeCommands(['howdy', 'hi']);
* ````
*
* @param {string[]} command
*/
removeCommands(command: string[]): void;
/**
* @param {Events} event
* @param {(userSaid : string, commandText : string, results : string[]) => void} callback
* @param {*} [context]
*/
addCallback(event: Events, callback: (userSaid?: string, commandText?: string, results?: string[]) => void, context?: any): void;
/**
* @param {Events} [event]
* @param {Function} [callback]
*/
removeCallback(event?: Events, callback?: (userSaid: string, commandText: string, results: string[]) => void): void;
/**
* Returns true if speech recognition is currently on.
* Returns false if speech recognition is off or annyang is paused.
*
* @returns {boolean}
*/
isListening(): boolean;
/**
* Returns the instance of the browser's SpeechRecognition object used by annyang.
* Useful in case you want direct access to the browser's Speech Recognition engine.
*
* @returns {*}
*/
getSpeechRecognizer(): any;
@ -223,8 +183,6 @@ export interface Annyang {
* ['Time for some thrilling heroics', 'Time for some thrilling aerobics']
* );
* ````
*
* @param {string} command
*/
trigger(command: string | string[]): void;
}

View File

@ -6,7 +6,9 @@
"no-declare-current-package": false,
"no-internal-module": false,
"no-mergeable-namespace": false,
"no-redundant-jsdoc": false,
"no-single-declare-module": false,
"no-unnecessary-class": false,
"no-unnecessary-qualifier": false
}
}

View File

@ -12,7 +12,6 @@
* arrify(1) // returns [1]
* @example
* arrify([2, 3]) // returns [2, 3]
* @param val
*/
declare function arrify<T>(val: undefined | null | T | T[]): T[];
export = arrify;

View File

@ -28,7 +28,7 @@ interface ascii2mathml {
/**
* Converts ASCIIMath expression to MathML markup.
* @param asciimath {string} ASCIIMath expression
* @param asciimath ASCIIMath expression
* @param options Options
*/
(asciimath: string, options?: Options): string;

View File

@ -16,6 +16,7 @@
"no-void-expression": false,
"object-literal-key-quotes": false,
"object-literal-shorthand": false,
"one-line": false,
"one-variable-per-declaration": false,
"only-arrow-functions": false,
"prefer-const": false,

View File

@ -34,5 +34,5 @@ async function runTests(): Promise<number> {
};
num = await defaultMochaRunner(runnerArgs);
return await testRunner(runnerArgs);
return testRunner(runnerArgs);
}

View File

@ -8,17 +8,14 @@
/**
* Attach autosize to NodeList
* @param elements
*/
declare function autosize(elements: NodeList): NodeList;
/**
* Attach autosize to Element
* @param element
*/
declare function autosize(element: Element): Element;
/**
* Attach autosize to JQuery collection
* @param collection
*/
declare function autosize(collection: JQuery): JQuery;
@ -27,37 +24,31 @@ declare namespace autosize {
* Triggers the height adjustment for an assigned textarea element.
* Autosize will automatically adjust the textarea height on keyboard and window resize events.
* There is no efficient way for Autosize to monitor for when another script has changed the textarea value or for changes in layout that impact the textarea element.
* @param elements
*/
function update(elements: NodeList): NodeList;
/**
* Triggers the height adjustment for an assigned textarea element.
* Autosize will automatically adjust the textarea height on keyboard and window resize events.
* There is no efficient way for Autosize to monitor for when another script has changed the textarea value or for changes in layout that impact the textarea element.
* @param element
*/
function update(element: Element): Element;
/**
* Triggers the height adjustment for an assigned textarea element.
* Autosize will automatically adjust the textarea height on keyboard and window resize events.
* There is no efficient way for Autosize to monitor for when another script has changed the textarea value or for changes in layout that impact the textarea element.
* @param collection
*/
function update(collection: JQuery): JQuery;
/**
* Removes Autosize and reverts any changes it made to the textarea element.
* @param elements
*/
function destroy(elements: NodeList): NodeList;
/**
* Removes Autosize and reverts any changes it made to the textarea element.
* @param element
*/
function destroy(element: Element): Element;
/**
* Removes Autosize and reverts any changes it made to the textarea element.
* @param collection
*/
function destroy(collection: JQuery): JQuery;
}

View File

@ -162,8 +162,9 @@ export interface TransformOptions {
/** Indicate the mode the code should be parsed in. Can be either “script” or “module”. Default: "module" */
sourceType?: "script" | "module";
/** An optional callback that can be used to wrap visitor methods.
* NOTE: This is useful for things like introspection, and not really needed for implementing anything.
/**
* An optional callback that can be used to wrap visitor methods.
* NOTE: This is useful for things like introspection, and not really needed for implementing anything.
*/
wrapPluginVisitorMethod?(pluginAlias: string, visitorType: 'enter' | 'exit', callback: (path: NodePath, state: any) => void): (path: NodePath, state: any) => void ;
}

View File

@ -691,7 +691,7 @@ export class Region extends Object implements DomMixin {
* Render a template with data by passing in the template selector and the
* data to render. This is the default renderer that is used by Marionette.
*/
export class Renderer {
export namespace Renderer {
/**
* This method returns a string containing the result of applying the
* template using the data object as the context.
@ -703,7 +703,7 @@ export class Renderer {
* that returns valid HTML as a string from the data parameter passed to
* the function.
*/
static render(template: any, data: any): string;
function render(template: any, data: any): string;
}
export interface ViewOptions<TModel extends Backbone.Model> extends Backbone.ViewOptions<TModel>, ViewMixinOptions {
@ -1614,11 +1614,11 @@ export class Behavior extends Object {
/**
* DEPRECATED
*/
export class Behaviors {
export namespace Behaviors {
/**
* This method defines where your behavior classes are stored. Override this to provide another lookup.
*/
static behaviorsLookup(): any;
function behaviorsLookup(): any;
/**
* This method has a default implementation that is simple to override. It
@ -1626,5 +1626,5 @@ export class Behaviors {
* Behaviors.behaviorsLookup or elsewhere. Note that it should return the type of the
* class to instantiate, not an instance of that class.
*/
static getBehaviorClass(options: any, key: string): any;
function getBehaviorClass(options: any, key: string): any;
}

View File

@ -4,7 +4,8 @@
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export interface FittingContext {
/** The input defined in the fitting definition
/**
* The input defined in the fitting definition
* (string, number, object, array)
*/
input: any;
@ -56,7 +57,7 @@ export type Fitting = (
* Executed during parsing
* @see {@link https://github.com/apigee-127/bagpipes#fittings|Docs}
*
* @param {Object} fittingDef Fitting Definition
* @param fittingDef Fitting Definition
*/
export type FittingFactory = (fittingDef: FittingDef, bagpipes: any) => Fitting;

View File

@ -62,7 +62,7 @@ export class Block {
}
export class ECPair {
constructor(d: BigInteger, Q?: null | undefined, options?: { compressed?: boolean, network?: Network });
constructor(d: BigInteger, Q?: null, options?: { compressed?: boolean, network?: Network });
constructor(d: null | undefined, Q: any, options?: { compressed?: boolean, network?: Network }); // Q should be ECPoint, but not sure how to define such type

View File

@ -14,59 +14,43 @@ export function createBlob(parts: any[], options?: { type: string }): Blob;
/**
* Shim for URL.createObjectURL() to support browsers that only have the prefixed webkitURL (e.g. Android <4.4).
*
* @param blob
*/
export function createObjectURL(blob: Blob): string;
/**
* Shim for URL.revokeObjectURL() to support browsers that only have the prefixed webkitURL (e.g. Android <4.4).
*
* @param url
*/
export function revokeObjectURL(url: string): void;
/**
* Convert a Blob to a binary string.
*
* @param blob
*/
export function blobToBinaryString(blob: Blob): Promise<string>;
/**
* Convert a binary string to a Blob.
*
* @param binary
* @param type the content type
*/
export function binaryStringToBlob(binary: string, type?: string): Promise<Blob>;
/**
* Convert a Blob to a base-64 string.
*
* @param blob
*/
export function blobToBase64String(blob: Blob): Promise<string>;
/**
* Convert a base-64 string to a Blob.
*
* @param base64
* @param type the content type
*/
export function base64StringToBlob(base64: string, type?: string): Promise<Blob>;
/**
* Convert a data URL string (e.g. `'data:image/png;base64,iVBORw0KG...'`) to a Blob.
*
* @param dataURL
*/
export function dataURLToBlob(dataURL: string): Promise<Blob>;
/**
* Convert a Blob to a data URL string (e.g. `'data:image/png;base64,iVBORw0KG...'`).
*
* @param blob
*/
export function blobToDataURL(blob: Blob): Promise<string>;
@ -75,7 +59,6 @@ export function blobToDataURL(blob: Blob): Promise<string>;
*
* Note: this will coerce the image to the desired content type, and it will only paint the first frame of an animated GIF.
*
* @param src
* @param type the content type (optional, defaults to 'image/png')
* @param crossOrigin for CORS-enabled images, set this to 'Anonymous' to avoid "tainted canvas" errors
* @param quality a number between 0 and 1 indicating image quality if the requested type is 'image/jpeg' or 'image/webp'
@ -85,7 +68,6 @@ export function imgSrcToDataURL(src: string, type?: string, crossOrigin?: string
/**
* Convert a canvas to a Blob.
*
* @param src
* @param type the content type (optional, defaults to 'image/png')
* @param quality a number between 0 and 1 indicating image quality if the requested type is 'image/jpeg' or 'image/webp'
*/
@ -96,7 +78,6 @@ export function canvasToBlob(canvas: HTMLCanvasElement, type?: string, quality?:
*
* Note: this will coerce the image to the desired content type, and it will only paint the first frame of an animated GIF.
*
* @param src
* @param type the content type (optional, defaults to 'image/png')
* @param crossOrigin for CORS-enabled images, set this to 'Anonymous' to avoid "tainted canvas" errors
* @param quality a number between 0 and 1 indicating image quality if the requested type is 'image/jpeg' or 'image/webp'
@ -106,14 +87,11 @@ export function imgSrcToBlob(src: string, type?: string, crossOrigin?: string, q
/**
* Convert an ArrayBuffer to a Blob.
*
* @param arrayBuff
* @param type the content type
*/
export function arrayBufferToBlob(arrayBuff: ArrayBuffer, type?: string): Promise<Blob>;
/**
* Convert a Blob to an ArrayBuffer.
*
* @param blob
*/
export function blobToArrayBuffer(blob: Blob): Promise<ArrayBuffer>;

View File

@ -6,6 +6,7 @@
"array-type": false,
"unified-signatures": false,
"ban-types": false,
"no-redundant-undefined": false,
"no-unnecessary-generics": false
}
}

View File

@ -3,6 +3,7 @@
"rules": {
"adjacent-overload-signatures": false,
"max-line-length": [true, 490],
"no-redundant-undefined": false,
"no-unnecessary-callback-wrapper": false,
"no-unnecessary-generics": false,
"no-void-expression": false,

View File

@ -134,7 +134,6 @@ interface SliderPlugin<TJQuery> {
(methodName: string, ...args: any[]): TJQuery;
/**
* Creates a slider from the current element.
* @param options
*/
(options?: SliderOptions): TJQuery;
}
@ -163,9 +162,6 @@ declare class Slider {
/**
* Set a new value for the slider. If optional triggerSlideEvent parameter is true, 'slide' events will be triggered.
* If optional triggerChangeEvent parameter is true, 'change' events will be triggered.
* @param newValue
* @param triggerSlideEvent
* @param triggerChangeEvent
*/
setValue(newValue: number, triggerSlideEvent?: boolean, triggerChangeEvent?: boolean): this;
/**
@ -186,13 +182,10 @@ declare class Slider {
isEnabled(): boolean;
/**
* Updates the slider's attributes
* @param attribute
* @param value
*/
setAttribute(attribute: string, value: any): this;
/**
* Get the slider's attributes
* @param attribute
*/
getAttribute(attribute: string): any;
/**

View File

@ -88,13 +88,13 @@ declare namespace Bull {
/**
* Removes a job from the queue and from any lists it may be included in.
* @returns {Promise} A promise that resolves when the job is removed.
* @returns A promise that resolves when the job is removed.
*/
remove(): Promise<void>;
/**
* Re-run a job that has failed.
* @returns {Promise} A promise that resolves when the job is scheduled for retry.
* @returns A promise that resolves when the job is scheduled for retry.
*/
retry(): Promise<void>;

View File

@ -7,8 +7,8 @@ import * as Logger from "bunyan";
/**
* Constructor.
* @param {string} [name] name of the blackhole Logger
* @return {Logger} A bunyan logger .
* @param name name of the blackhole Logger
* @return A bunyan logger .
*/
declare function bunyanBlackHole(name: string): Logger;
export = bunyanBlackHole;

View File

@ -9,12 +9,7 @@
declare global {
namespace Chai {
interface Assertion {
/**
* Assert that the object matches the snapshot
* @param snapshotFilename
* @param snapshotName
* @param update
*/
/** Assert that the object matches the snapshot */
matchSnapshot(snapshotFilename?: string, snapshotName?: string, update?: boolean): Assertion;
matchSnapshot(update: boolean): Assertion;
}
@ -22,40 +17,24 @@ declare global {
}
interface ChaiJestSnapshot {
/**
* Chai bootstrapper
* @param chai
* @param utils
*/
/** Chai bootstrapper */
(chai: any, utils: any): void;
/**
* Set snapshot file name
* @param filename
*/
/** Set snapshot file name */
setFileName(filename: string): void;
/**
* Set snapshot test name
* @param testname
*/
setTestName(testname: string): void;
/**
* Configure snapshot name using mocha context
* @param context
*/
/** Configure snapshot name using mocha context */
configureUsingMochaContext(context: Mocha.IBeforeAndAfterContext): void;
/**
* Reset snapshot registry
*/
/** Reset snapshot registry */
resetSnapshotRegistry(): void;
/**
* Add a serializer plugin
* @param serializer
*/
/** Add a serializer plugin */
addSerializer(serializer: any): void;
}

View File

@ -34,9 +34,6 @@ declare namespace chroma {
/**
* Create a color in the specified color space using a, b and c as values.
*
* @param a
* @param b
* @param c
* @param colorSpace The color space to use. Defaults to "rgb".
* @return the color object.
*/

View File

@ -8,7 +8,7 @@ declare class Clipboard {
/**
* Subscribes to events that indicate the result of a copy/cut operation.
* @param type {"success" | "error"} Event type ('success' or 'error').
* @param type Event type ('success' or 'error').
* @param handler Callback function.
*/
on(type: "success" | "error", handler: (e: Clipboard.Event) => void): this;
@ -29,22 +29,21 @@ declare namespace Clipboard {
interface Options {
/**
* Overwrites default command ('cut' or 'copy').
* @param {Element} elem Current element
* @returns {String} Only 'cut' or 'copy'.
* @param elem Current element
*/
action?(elem: Element): string;
action?(elem: Element): "cut" | "copy";
/**
* Overwrites default target input element.
* @param {Element} elem Current element
* @returns {Element} <input> element to use.
* @param elem Current element
* @returns <input> element to use.
*/
target?(elem: Element): Element;
/**
* Returns the explicit text to copy.
* @param {Element} elem Current element
* @returns {String} Text to be copied.
* @param elem Current element
* @returns Text to be copied.
*/
text?(elem: Element): string;
}

View File

@ -3,13 +3,15 @@
// Definitions by: TeamworkGuy2 <https://github.com/TeamworkGuy2>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/** Add source maps of multiple files, offset them and then combine them into one source map.
/**
* Add source maps of multiple files, offset them and then combine them into one source map.
* (documentation based on project's README file)
*/
declare class Combiner {
constructor(file?: string, sourceRoot?: string);
/** Adds map to underlying source map.
/**
* Adds map to underlying source map.
* If source contains a source map comment that has the source of the original file inlined it will offset these
* mappings and include them.
* If no source map comment is found or it has no source inlined, mappings for the file will be generated and included
@ -18,12 +20,14 @@ declare class Combiner {
*/
addFile(opts: { sourceFile: string; source: string }, offset?: Combiner.Offset): Combiner;
/** output the combined source map in base64 format
/**
* output the combined source map in base64 format
* @return base64 encoded combined source map
*/
base64(): string;
/** generate a base64 encoded sourceMappingURL comment
/**
* generate a base64 encoded sourceMappingURL comment
* @return base64 encoded sourceMappingUrl comment of the combined source map
*/
comment(): string;
@ -40,15 +44,15 @@ declare namespace Combiner {
column?: number;
}
/** Create a source map combiner that accepts multiple files, offsets them and then combines them into one source map.
/**
* Create a source map combiner that accepts multiple files, offsets them and then combines them into one source map.
* @param file optional name of the generated file
* @param sourceRoot optional sourceRoot of the map to be generated
* @return Combiner instance to which source maps can be added and later combined
*/
function create(file?: string, sourceRoot?: string): Combiner;
/** removeComments
* @param src
/**
* @return src with all sourceMappingUrl comments removed
*/
function removeComments(src: string): string;

View File

@ -3,7 +3,8 @@
// Definitions by: Andrew Gaspar <https://github.com/AndrewGaspar>, Melvin Groenhoff <https://github.com/mgroenhoff>, TeamworkGuy2 <https://github.com/TeamworkGuy2>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/** Converts a source-map from/to different formats and allows adding/changing properties.
/**
* Converts a source-map from/to different formats and allows adding/changing properties.
* (documentation based on project's README file)
*/
export interface SourceMapConverter {
@ -19,7 +20,8 @@ export interface SourceMapConverter {
/** Converts source map to base64 encoded json string */
toBase64(): string;
/** Converts source map to an inline comment that can be appended to the source-file.
/**
* Converts source map to an inline comment that can be appended to the source-file.
* By default, the comment is formatted like: //# sourceMappingURL=..., which you would normally see in a JS source file.
* When options.multiline == true, the comment is formatted like: /*# sourceMappingURL=... *\/, which you would find in a CSS source file
*/
@ -47,16 +49,19 @@ export function fromBase64(base64: string): SourceMapConverter;
/** Returns source map converter from given base64 encoded json string prefixed with //# sourceMappingURL=... */
export function fromComment(comment: string): SourceMapConverter;
/** Returns source map converter from given filename by parsing //# sourceMappingURL=filename.
/**
* Returns source map converter from given filename by parsing //# sourceMappingURL=filename.
* filename must point to a file that is found inside the mapFileDir. Most tools store this file right next to the generated file, i.e. the one containing the source map.
*/
export function fromMapFileComment(comment: string, commentFileDir: string): SourceMapConverter;
/** Finds last sourcemap comment in file and returns source map converter or returns null if no source map comment was found.
/**
* Finds last sourcemap comment in file and returns source map converter or returns null if no source map comment was found.
*/
export function fromSource(content: string): SourceMapConverter | null;
/** Finds last sourcemap comment in file and returns source map converter or returns null if no source map comment was found.
/**
* Finds last sourcemap comment in file and returns source map converter or returns null if no source map comment was found.
* The sourcemap will be read from the map file found by parsing # sourceMappingURL=file comment. For more info see fromMapFileComment.
*/
export function fromMapFileSource(content: string, commentFileDir: string): SourceMapConverter | null;
@ -73,7 +78,8 @@ export const commentRegex: RegExp;
/** Returns a new regex used to find source map comments pointing to map files */
export const mapFileCommentRegex: RegExp;
/** Returns a comment that links to an external source map via file.
/**
* Returns a comment that links to an external source map via file.
* By default, the comment is formatted like: //# sourceMappingURL=..., which you would normally see in a JS source file.
* When options.multiline == true, the comment is formatted like: /*# sourceMappingURL=... *\/, which you would find in a CSS source file.
*/

View File

@ -69,48 +69,40 @@ declare namespace convict {
* Sets the value of name to value. name can use dot notation to reference
* nested values, e.g. "database.port". If objects in the chain don't yet
* exist, they will be initialized to empty objects
*
* @return {Config} instance
*/
set(name: string, value: any): Config;
/**
* Loads and merges a JavaScript object into config
*
* @return {Config} instance
*/
load(conf: Object): Config;
/**
* Loads and merges JSON configuration file(s) into config
*
* @return {Config} instance
*/
loadFile(files: string | string[]): Config;
/**
* Validates config against the schema used to initialize it
*
* @param options
*/
validate(options?: ValidateOptions): Config;
/**
* Exports all the properties (that is the keys and their current values) as a {JSON} {Object}
* @returns {Object} A {JSON} compliant {Object}
* @returns A {JSON} compliant {Object}
*/
getProperties(): Object;
/**
* Exports the schema as a {JSON} {Object}
* @returns {Object} A {JSON} compliant {Object}
* @returns A {JSON} compliant {Object}
*/
getSchema(): Object;
/**
* Exports all the properties (that is the keys and their current values) as a JSON string.
* @returns {String} a string representing this object
* @returns A string representing this object
*/
toString(): string;
/**
* Exports the schema as a JSON string.
* @returns {String} a string representing the schema of this {Config}
* @returns A string representing the schema of this {Config}
*/
getSchemaString(): string;
}

View File

@ -3,19 +3,11 @@
// Definitions by: François Nguyen <https://github.com/lith-light-g>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* Sign the given `val` with `secret`.
* @param {string} val
* @param {string} secret
* @return {string}
*/
/** Sign the given `val` with `secret`. */
export function sign(value: string, secret: string): string;
/**
* Unsign and decode the given `val` with `secret`,
* returning `false` if the signature is invalid.
* @param {string} val
* @param {string} secret
* @return {string|boolean}
*/
export function unsign(value: string, secret: string): string | boolean;

View File

@ -6,7 +6,6 @@ interface NativeKeyboard {
/**
* Show the messenger, the bare minimum which has to be passed to the function is
* the onSubmit callback
* @param options
*/
showMessenger(
options: NativeKeyboardShowOptions
@ -16,10 +15,6 @@ interface NativeKeyboard {
* It's likely your app only has 1 one page where you want to show the messenger,
* so you want to hide it when the user navigates away. You can choose to do this
* either animated (a quick slide down animation) or not.
*
* @param options
* @param onSuccess
* @param onError
*/
hideMessenger(
options?: NativeKeyboardHideOptions,
@ -29,9 +24,6 @@ interface NativeKeyboard {
/**
* Show a previously hidden keyboard
*
* @param onSuccess
* @param onError
*/
showMessengerKeyboard(
onSuccess?: () => void,
@ -40,9 +32,6 @@ interface NativeKeyboard {
/**
* Hide the keyboard, but not the messenger bar
*
* @param onSuccess
* @param onError
*/
hideMessengerKeyboard(
onSuccess?: () => void,
@ -53,10 +42,6 @@ interface NativeKeyboard {
* Manipulate the messenger while it's open. For instance if you want to
* update the text programmatically based on what the user typed (by responding to
* onTextChanged events).
*
* @param options
* @param onSuccess
* @param onError
*/
updateMessenger(
options: NativeKeyboardUpdateOptions,
@ -92,7 +77,6 @@ interface NativeKeyboardHideOptions {
interface NativeKeyboardShowOptions {
/**
* Callback function, which is being called as soon as the user submits
* @param text
*/
onSubmit(text: string): void;
@ -119,8 +103,6 @@ interface NativeKeyboardShowOptions {
/**
* Callback function which is being executed as soon as the entered text changes. Will
* return the new text
*
* @param text
*/
onTextChanged?(text: string): void;

View File

@ -2711,7 +2711,8 @@ declare namespace cytoscape {
* http://js.cytoscape.org/#eles.degreeCentrality
*/
interface SearchDegreeCentralityOptions {
/** The root node (selector or collection) for which the
/**
* The root node (selector or collection) for which the
* centrality calculation is made.
*/
root: NodeSingular | Selector;
@ -2725,7 +2726,8 @@ declare namespace cytoscape {
* in the centrality calculation.
*/
alpha?: number;
/** A boolean indicating whether the directed indegree and outdegree centrality is calculated (true) or
/**
* Whether the directed indegree and outdegree centrality is calculated (true) or
* whether the undirected centrality is calculated (false, default).
*/
directed?: boolean;
@ -2757,7 +2759,8 @@ declare namespace cytoscape {
* in the centrality calculation.
*/
alpha?: number;
/** A boolean indicating whether the directed indegree and outdegree centrality is calculated (true) or
/**
* A boolean indicating whether the directed indegree and outdegree centrality is calculated (true) or
* whether the undirected centrality is calculated (false, default).
*/
directed?: boolean;
@ -2780,14 +2783,16 @@ declare namespace cytoscape {
* http://js.cytoscape.org/#eles.closenessCentrality
*/
interface SearchClosenessCentralityOptions {
/** The root node (selector or collection) for which the
/**
* The root node (selector or collection) for which the
* centrality calculation is made.
*/
root: NodeSingular | Selector;
/** A function that returns the weight for the edge. */
weight?(edge: EdgeSingular): number;
/** A boolean indicating whether the directed indegree and outdegree centrality is calculated (true) or
/**
* A boolean indicating whether the directed indegree and outdegree centrality is calculated (true) or
* whether the undirected centrality is calculated (false, default).
*/
directed?: boolean;
@ -2829,7 +2834,8 @@ declare namespace cytoscape {
/** A function that returns the weight for the edge. */
weight?(edge: EdgeSingular): number;
/** A boolean indicating whether the directed indegree and outdegree centrality is calculated (true) or
/**
* A boolean indicating whether the directed indegree and outdegree centrality is calculated (true) or
* whether the undirected centrality is calculated (false, default).
*/
directed?: boolean;
@ -3976,7 +3982,8 @@ declare namespace cytoscape {
originalEvent: EventObject;
}
interface LayoutEventObject extends AbstractEventObject {
/** layout : indicates the corresponding layout that triggered the event
/**
* layout : indicates the corresponding layout that triggered the event
* (useful if running multiple layouts simultaneously)
*/
layout: any;
@ -4357,12 +4364,14 @@ declare namespace cytoscape {
* A new, developer accessible layout can be made via cy.makeLayout().
*/
interface LayoutManipulation {
/** Start running the layout
/**
* Start running the layout
* http://js.cytoscape.org/#layout.run
*/
run(): void;
start(): void;
/** Stop running the (asynchronous/discrete) layout
/**
* Stop running the (asynchronous/discrete) layout
* http://js.cytoscape.org/#layout.stop
*/
stop(): void;

View File

@ -22,9 +22,9 @@ declare namespace delay {
type PDelayedPassThroughThunk<TValue> = ((value: TValue) => DelayedPromiseLike<TValue>) & DelayedPromiseLike<void>;
interface DelayedPromiseLike<T> {
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null,
onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): Promise<TResult1 | TResult2>;
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<T | TResult>;
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,
onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null): Promise<T | TResult>;
cancel(): void;
}
}

View File

@ -7,11 +7,11 @@ interface InputEventInit extends UIEventInit {
data?: string;
isComposing: boolean;
}
interface InputEvent extends UIEvent {
// tslint:disable-next-line no-empty-interface
interface InputEvent extends UIEvent {}
declare class InputEvent {
constructor(typeArg: 'input' | 'beforeinput', inputEventInit?: InputEventInit);
readonly data: string;
readonly isComposing: boolean;
}
declare class InputEvent {
constructor(typeArg: 'input' | 'beforeinput', inputEventInit?: InputEventInit);
}

View File

@ -1,7 +1,9 @@
{
"extends": "dtslint/dt.json",
"rules": {
"jsdoc-format": false,
"max-line-length": [false],
"no-redundant-jsdoc": false,
"no-trailing-whitespace": false,
"space-before-function-paren": false,
"only-arrow-functions": [false]

View File

@ -1,7 +1,9 @@
{
"extends": "dtslint/dt.json",
"rules": {
"jsdoc-format": false,
"max-line-length": [false],
"no-redundant-jsdoc": false,
"no-trailing-whitespace": false,
"space-before-function-paren": false,
"only-arrow-functions": [false]

View File

@ -73,7 +73,6 @@ declare class Settings extends EventEmitter {
*
* @param keyPath The path to the key whose value we wish to set. This key need not already exist.
* @param value The value to set the key at the chosen key path to. This must be a data type supported by JSON: object, array, string, number, boolean, or null.
* @param options
* @throws if key path is not a string.
* @throws if options is not an object.
* @see setSync
@ -91,7 +90,6 @@ declare class Settings extends EventEmitter {
* Deletes the key and value at the chosen key path.
*
* @param keyPath The path to the key we wish to unset.
* @param options
* @throws if keyPath is not a string.
* @throws if options is not an object.
* @see deleteSync

View File

@ -43,7 +43,7 @@ interface ExecaReturns {
type ExecaError = Error & ExecaReturns;
interface ExecaChildPromise {
catch<TResult = never>(onrejected?: ((reason: ExecaError) => TResult | PromiseLike<TResult>) | undefined | null): Promise<ExecaReturns | TResult>;
catch<TResult = never>(onrejected?: ((reason: ExecaError) => TResult | PromiseLike<TResult>) | null): Promise<ExecaReturns | TResult>;
}
type ExecaChildProcess = ChildProcess & ExecaChildPromise & Promise<ExecaReturns>;

View File

@ -8,15 +8,8 @@ import { Collection } from "mongodb";
/**
* @summary MongoDB store adapter.
* @class
*/
declare class MongoStore {
/**
* @summary Constructor.
* @constructor
* @param {Function} getCollection The collection.
* @param {Object} options The otpions.
*/
constructor(getCollection: (collection: (c: Collection) => void) => void, options?: Object);
}
export = MongoStore;

View File

@ -1,8 +1,9 @@
{
"extends": "dtslint/dt.json",
"rules": {
// TODO
// TODOs
"ban-types": false,
"dt-header": false
"dt-header": false,
"no-unnecessary-class": false
}
}

View File

@ -30,106 +30,35 @@ declare namespace MySQLStore {
}
declare class MySQLStore {
/**
* @param {MySQLStore.Options} options
* @param {any} connection?
* @param {(error:any)=>void} callback?
*/
constructor(options: MySQLStore.Options, connection?: any, callback?: (error: any) => void);
/**
* @returns void
*/
setDefaultOptions(): void;
/**
* @param {(error:any)=>void} callback?
* @returns void
*/
createDatabaseTable(callback?: (error: any) => void): void;
/**
* @param {string} sessionId
* @param {(error:any,session:any)=>void} callback?
* @returns void
*/
get(sessionId: string, callback?: (error: any, session: any) => void): void;
/**
* @param {string} sessionId
* @param {any} data
* @param {(error:any)=>void} callback?
* @returns void
*/
set(sessionId: string, data: any, callback?: (error: any) => void): void;
/**
* @param {string} sessionId
* @param {any} data
* @param {(error:any)=>void} callback?
* @returns void
*/
touch(sessionId: string, data: any, callback?: (error: any) => void): void;
/**
* @param {string} sessionId
* @param {(error:any)=>void} callback?
* @returns void
*/
destroy(sessionId: string, callback?: (error: any) => void): void;
/**
* @param {(error:any,count:any)=>void} callback?
* @returns void
*/
length(callback?: (error: any, count: any) => void): void;
/**
* @param {(error:any)=>void} callback?
* @returns void
*/
clear(callback?: (error: any) => void): void;
/**
* @param {(error:any)=>void} callback?
* @returns void
*/
clearExpiredSessions(callback?: (error: any) => void): void;
/**
* @param {number} interval
* @returns void
*/
setExpirationInterval(interval: number): void;
/**
* @returns void
*/
clearExpirationInterval(): void;
/**
* @param {()=>void} callback?
* @returns void
*/
close(callback?: () => void): void;
/**
* @param {any} object
* @param {any} defaultValues
* @param {any} options?
* @returns void
*/
default(object: any, defaultValues: any, options?: any): void;
/**
* @param {any} object
* @returns void
*/
clone(object: any): void;
/**
* @param {any} value
* @returns void
*/
isObject(value: any): void;
}

View File

@ -29,10 +29,6 @@ declare module 'firebird' {
* Connects you to database,
*
* @param database a database name in Firebird notation, i.e. <hostname>:<path to database file | alias>
* @param username user name
* @param pasword
* @param role
*
* @throws raises exception on error (try to catch it).
*/
connectSync(db: string, user: string, pass: string, role: string): void;
@ -41,9 +37,6 @@ declare module 'firebird' {
* Asynchronously connects you to Database.
*
* @param database a database name in Firebird notation, i.e. <hostname>:<path to database file | alias>
* @param username user name
* @param pasword
* @param role
* @param callback function(err), where err is error object in case of error.
*/
connect(db: string, user: string, pass: string, role: string, callback: (err: Error | null) => void): void;
@ -148,7 +141,8 @@ declare module 'firebird' {
*/
start(callback: (err: Error | null) => void): void;
/**Synchronously prepares SQL statement and returns FBStatement object.
/**
* Synchronously prepares SQL statement and returns FBStatement object.
*
* @param sql an SQL query to prepare.
*/
@ -327,7 +321,7 @@ declare module 'firebird' {
* Synchronously prepares SQL statement
*
* @param sql an SQL query to prepare.
* @returns @see FBStatement object in context of this transaction.
* @returns object in context of this transaction.
*/
prepareSync(sql: string): FBStatement;
@ -357,9 +351,6 @@ declare module 'firebird' {
/**
* Same as @see execSync but executes statement in context of given @see Transaction obejct.
*
* @param transaction
* @param params
*/
execInTransSync(transaction: Transaction, ...params: DataType[]): void;
@ -377,9 +368,6 @@ declare module 'firebird' {
/**
* Same as @see exec but executes statement in context of given @see Transaction obejct.
*
* @param transaction
* @param params
*/
execInTrans(transaction: Transaction, ...params: DataType[]): void;
}

View File

@ -80,19 +80,16 @@ declare class Flickity {
// properties
/**
* @type integer
* The selected cell index.
*/
selectedIndex: number;
/**
* @type Element
* The selected cell element.
*/
selectedElement: Element;
/**
* @type Element[]
* The array of cells. Use cells.length for the total number of cells.
*/
cells: Element[];
@ -144,10 +141,9 @@ declare class Flickity {
/**
* Select a slide of a cell. Useful for groupCells.
*
* @param {number | string} index Zero-based index OR selector string of the cell to select.
* @param {boolean} [isWrapped] Optional. If true, the last slide will be selected if at the first slide.
* @param {boolean} [isInstant] If true, immediately view the selected slide without animation.
* @memberof Flickity
* @param index Zero-based index OR selector string of the cell to select.
* @param isWrapped If true, the last slide will be selected if at the first slide.
* @param isInstant If true, immediately view the selected slide without animation.
*/
selectCell(index: number | string, isWrapped?: boolean, isInstant?: boolean): void;

View File

@ -469,8 +469,6 @@ declare namespace fm {
* While this method will typically run asychronously, the WebSync client is designed to be used without (much) consideration for its asynchronous nature.
* To that end, any calls to methods that require an active connection, like bind, subscribe and publish, will be queued automatically and executed once this
* method has completed successfully.
*
* @param connectConfig
*/
connect(config: connectConfig): client;
@ -506,7 +504,6 @@ declare namespace fm {
* Unsubscribes the client from receiving messages on one or more channels.
* When the unsubscribe completes successfully, the callback specified by onSuccess will be invoked, passing in the unsubscribed channel(s),
* including any modifications made on the server.
* @param config
*/
unsubscribe(config: unsubscribeConfig): client;
}

View File

@ -117,64 +117,15 @@ export function write(fd: number, buffer: NodeBuffer, offset: number, length: nu
export function writeSync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): number;
export function read(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number, callback?: (err: Error, bytesRead: number, buffer: NodeBuffer) => void): void;
export function readSync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): number;
/**
* readFile
* @param filename
* @param options
* string: encoding
* OpenOptions: options
* @param callback
*/
export function readFile(filename: string, options: OpenOptions | string, callback: (err: Error, data: string) => void): void;
export function readFile(filename: string, callback: (err: Error, data: NodeBuffer) => void): void;
export function readFileSync(filename: string): NodeBuffer;
/**
* readFileSync
* @param filename
* @param options
* string: encoding
* OpenOptions: options
*/
export function readFileSync(filename: string, options: OpenOptions | string): string;
/**
* writeFile
* @param filename
* @param data
* @param options
* string: encoding
* OpenOptions: options
* @param callback
*/
export function writeFile(filename: string, data: any, callback?: (err: Error) => void): void;
export function writeFile(filename: string, data: any, options: OpenOptions | string, callback?: (err: Error) => void): void;
/**
* writeFileSync
* @param filename
* @param data
* @param option
* string: encoding
* OpenOptions: options
*/
export function writeFileSync(filename: string, data: any, option?: OpenOptions | string): void;
/**
* appendFile
* @param filename
* @param data
* @param option:
* string: encoding
* OpenOptions: options
* @param callback
*/
export function appendFile(filename: string, data: any, callback?: (err: Error) => void): void;
export function appendFile(filename: string, data: any, option: OpenOptions | string, callback?: (err: Error) => void): void;
/**
* appendFileSync
* @param filename
* @param data
* @param option
* string: encoding
* OpenOptions: options
*/
export function appendFileSync(filename: string, data: any, option?: OpenOptions | string): void;
export function watchFile(filename: string, listener: { curr: Stats; prev: Stats; }): void;
export function watchFile(filename: string, options: { persistent?: boolean; interval?: number; }, listener: { curr: Stats; prev: Stats; }): void;
@ -252,32 +203,9 @@ export function futimesAsync(fd: number, atime: number, mtime: number): Promise<
export function fsyncAsync(fd: number): Promise<void>;
export function writeAsync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): Promise<[number, NodeBuffer]>;
export function readAsync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): Promise<[number, NodeBuffer]>;
/**
* readFileAsync
* @param filename
* @param options:
* string: encoding
* OpenOptions: options
*/
export function readFileAsync(filename: string, options: OpenOptions | string): Promise<string>;
export function readFileAsync(filename: string): Promise<NodeBuffer>;
/**
* writeFileAsync
* @param filename
* @param data
* @param options:
* string: encoding
* OpenOptions: options
*/
export function writeFileAsync(filename: string, data: any, options?: OpenOptions | string): Promise<void>;
/**
* appendFileAsync
* @param filename
* @param data
* @param option:
* string: encoding
* OpenOptions: option
*/
export function appendFileAsync(filename: string, data: any, option?: OpenOptions | string): Promise<void>;
export function existsAsync(path: string): Promise<boolean>;

View File

@ -19,14 +19,6 @@ export interface MkdirOptions {
}
// promisified versions
/**
* copyAsync
* @param src
* @param dest
* @param options
* CopyFilter: filter
* CopyOptions: options
*/
export function copyAsync(src: string, dest: string, options?: CopyFilter | CopyOptions): Promise<void>;
export function createFileAsync(file: string): Promise<void>;
@ -75,32 +67,9 @@ export function futimesAsync(fd: number, atime: number, mtime: number): Promise<
export function fsyncAsync(fd: number): Promise<void>;
export function writeAsync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): Promise<[number, NodeBuffer]>;
export function readAsync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): Promise<[number, NodeBuffer]>;
/**
* readFileAsync
* @param filename
* @param options:
* string: encoding
* ReadOptions: options
*/
export function readFileAsync(filename: string, options: string | ReadOptions): Promise<string>;
export function readFileAsync(filename: string): Promise<NodeBuffer>;
/**
* writeFileAsync
* @param filename
* @param data
* @param options:
* string: encoding
* WriteOptions: options
*/
export function writeFileAsync(filename: string, data: any, options?: string | WriteOptions): Promise<void>;
/**
* appendFileAsync
* @param filename
* @param data
* @param options:
* string: encoding
* WriteOptions: options
*/
export function appendFileAsync(filename: string, data: any, option?: string | WriteOptions): Promise<void>;
export function existsAsync(path: string): Promise<boolean>;

View File

@ -154,15 +154,12 @@ export function lstat(path: string | Buffer): Promise<Stats>;
/**
* Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777.
*
* @param path
* @param callback No arguments other than a possible exception are given to the completion callback.
*/
export function mkdir(path: string | Buffer, callback: (err?: NodeJS.ErrnoException | null) => void): void;
/**
* Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777.
*
* @param path
* @param mode
* @param callback No arguments other than a possible exception are given to the completion callback.
*/
export function mkdir(path: string | Buffer, mode: number | string, callback: (err?: NodeJS.ErrnoException | null) => void): void;
@ -200,7 +197,6 @@ export function rename(oldPath: string, newPath: string): Promise<void>;
/**
* Asynchronous rmdir - removes the directory specified in {path}
*
* @param path
* @param callback No arguments other than a possible exception are given to the completion callback.
*/
export function rmdir(path: string | Buffer, callback: (err?: NodeJS.ErrnoException | null) => void): void;
@ -219,7 +215,6 @@ export function truncate(path: string | Buffer, len?: number): Promise<void>;
/**
* Asynchronous unlink - deletes the file specified in {path}
*
* @param path
* @param callback No arguments other than a possible exception are given to the completion callback.
*/
export function unlink(path: string | Buffer, callback: (err?: NodeJS.ErrnoException | null) => void): void;
@ -245,7 +240,6 @@ export function writeFile(file: string | Buffer | number, data: any, options: {
/**
* Asynchronous mkdtemp - Creates a unique temporary directory. Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
*
* @param prefix
* @param callback The created folder path is passed as a string to the callback's second parameter.
*/
export function mkdtemp(prefix: string): Promise<string>;

View File

@ -94,15 +94,12 @@ export class Utm {
export namespace Dms {
let separator: string;
}
export class Dms {
static parseDMS(dmsStr: string): number;
static toDMS(deg: number, format?: format, dp?: 0 | 2 | 4): string;
static toLat(deg: number, format?: format, dp?: 0 | 2 | 4): string;
static toLon(deg: number, format?: format, dp?: 0 | 2 | 4): string;
static toBrng(deg: number, format?: format, dp?: 0 | 2 | 4): string;
static compassPoint(bearing: number, precision?: 1 | 2 | 3): string;
function parseDMS(dmsStr: string): number;
function toDMS(deg: number, format?: format, dp?: 0 | 2 | 4): string;
function toLat(deg: number, format?: format, dp?: 0 | 2 | 4): string;
function toLon(deg: number, format?: format, dp?: 0 | 2 | 4): string;
function toBrng(deg: number, format?: format, dp?: 0 | 2 | 4): string;
function compassPoint(bearing: number, precision?: 1 | 2 | 3): string;
}
export class Vector3d {

View File

@ -47,25 +47,29 @@ declare namespace geolib {
unit: string;
}
/** Calculates the distance between two geo coordinates
/**
* Calculates the distance between two geo coordinates
*
* Return value is always float and represents the distance in meters.
*/
function getDistance(start: PositionAsDecimal|PositionAsSexadecimal, end: PositionAsDecimal|PositionAsSexadecimal, accuracy?: number, precision?: number): number;
/** Calculates the distance between two geo coordinates but this method is far more inaccurate as compared to getDistance.
/**
* Calculates the distance between two geo coordinates but this method is far more inaccurate as compared to getDistance.
* It can take up 2 to 3 arguments. start, end and accuracy can be defined in the same as in getDistance.
*
* Return value is always float that represents the distance in meters.
*/
function getDistanceSimple(start: PositionAsDecimal|PositionAsSexadecimal, end: PositionAsDecimal|PositionAsSexadecimal, accuracy?: number): number;
/** Calculates the geographical center of all points in a collection of geo coordinates
/**
* Calculates the geographical center of all points in a collection of geo coordinates
* Takes an object or array of coordinates and calculates the center of it.
*/
function getCenter(coords: PositionAsDecimal[]): PositionAsDecimal;
/** Calculates the center of the bounds of geo coordinates. Takes an array of coordinates,
/**
* Calculates the center of the bounds of geo coordinates. Takes an array of coordinates,
* calculate the border of those, and gives back the center of that rectangle. On polygons
* like political borders (eg. states), this may gives a closer result to human expectation,
* than getCenter, because that function can be disturbed by uneven distribution of point in
@ -74,25 +78,29 @@ declare namespace geolib {
*/
function getCenterOfBounds(coords: PositionAsDecimal[]): PositionAsDecimal;
/** Calculates the bounds of geo coordinates.
/**
* Calculates the bounds of geo coordinates.
*
* Returns maximum and minimum, latitude, longitude, and elevation (if provided) in form of an object
*/
function getBounds(coords: PositionWithElevation[]): Bound;
/** Checks whether a point is inside of a polygon or not. Note: the polygon coords must be in correct order!
/**
* Checks whether a point is inside of a polygon or not. Note: the polygon coords must be in correct order!
*
* Returns true or false
*/
function isPointInside(latlng: PositionAsDecimal, polygon: PositionAsDecimal[]): boolean;
/** Similar to is point inside: checks whether a point is inside of a circle or not.
/**
* Similar to is point inside: checks whether a point is inside of a circle or not.
*
* Returns true or false
*/
function isPointInCircle(latlng: PositionAsDecimal, center: PositionAsDecimal, radius: number): boolean;
/** Gets rhumb line bearing of two points. Find out about the difference between rhumb line and great circle bearing on Wikipedia.
/**
* Gets rhumb line bearing of two points. Find out about the difference between rhumb line and great circle bearing on Wikipedia.
* Rhumb line should be fine in most cases: http://en.wikipedia.org/wiki/Rhumb_line#General_and_mathematical_description Function
* is heavily based on Doug Vanderweide's great PHP version (licensed under GPL 3.0)
* http://www.dougv.com/2009/07/13/calculating-the-bearing-and-compass-rose-direction-between-two-latitude-longitude-coordinates-in-php/
@ -101,13 +109,15 @@ declare namespace geolib {
*/
function getRhumbLineBearing(originLL: PositionAsDecimal, destLL: PositionAsDecimal): number;
/** Gets great circle bearing of two points. See description of getRhumbLineBearing for more information.
/**
* Gets great circle bearing of two points. See description of getRhumbLineBearing for more information.
*
* Returns calculated bearing as integer
*/
function getBearing(originLL: PositionAsDecimal, destLL: PositionAsDecimal): number;
/** Gets the compass direction from an origin coordinate (originLL) to a destination coordinate (destLL).
/**
* Gets the compass direction from an origin coordinate (originLL) to a destination coordinate (destLL).
* Bearing mode. Can be either circle or rhumbline (default).
*
* Returns an object with a rough (NESW) and an exact direction (NNE, NE, ENE, E, ESE, etc).
@ -120,22 +130,27 @@ declare namespace geolib {
/** Finds the nearest coordinate to a reference coordinate. */
function findNearest(latlng: PositionAsDecimal, coords: PositionAsDecimal[], offset?: number, limit?: number): Distance[];
/** Calculates the length of a collection of coordinates.
/**
* Calculates the length of a collection of coordinates.
*
* Returns the length of the path in meters
*/
function getPathLength(coords: PositionAsDecimal[]): number;
/** Calculates the speed between two points within a given time span.
/**
* Calculates the speed between two points within a given time span.
*
* Returns the speed in options.unit (default is km/h).
*/
function getSpeed(coords: PositionInTime[], option?: SpeedOption): number;
/** Calculates if given point lies in a line formed by start and end */
/**
* Calculates if given point lies in a line formed by start and end
*/
function isPointInLine(point: PositionAsDecimal, start: PositionAsDecimal, end: PositionAsDecimal): boolean;
/** Converts a given distance (in meters) to another unit.
/**
* Converts a given distance (in meters) to another unit.
* distance distance to be converted (source must be in meter). unit can be one of:
* - m (meter)
* - km (kilometers)
@ -155,17 +170,20 @@ declare namespace geolib {
/** Converts a decimal coordinate to sexagesimal format */
function decimal2sexagesimal(coord: number): string;
/** Returns the latitude for a given point and converts it to decimal.
/**
* Returns the latitude for a given point and converts it to decimal.
* Works with: latitude, lat, 1 (GeoJSON array)
*/
function latitude(latlng: any): number;
/** Returns the longitude for a given point and converts it to decimal.
/**
* Returns the longitude for a given point and converts it to decimal.
* Works with: longitude, lng, lon, 0 (GeoJSON array)
*/
function longitude(latlng: any): number;
/** Returns the elevation for a given point and converts it to decimal.
/**
* Returns the elevation for a given point and converts it to decimal.
* Works with: elevation, elev, alt, altitude, 2 (GeoJSON array)
*/
function elevation(latlng: any): number;
@ -173,7 +191,8 @@ declare namespace geolib {
/** Checks if a coordinate is already in decimal format and, if not, converts it to */
function useDecimal(latlng: string|number): number;
/** Computes the destination point given an initial point, a distance (in meters) and a bearing (in degrees).
/**
* Computes the destination point given an initial point, a distance (in meters) and a bearing (in degrees).
* If no radius is given it defaults to the mean earth radius of 6371000 meter.
*
* Returns an object: `{"latitude": destLat, "longitude": destLng}`

View File

@ -93,15 +93,15 @@ class MySimple extends jspb.Message {
const field = reader.getFieldNumber();
switch (field) {
case 1:
const value1 = /** @type {string} */ (reader.readString());
const value1 = reader.readString();
msg.setMyString(value1);
break;
case 2:
const value2 = /** @type {boolean} */ (reader.readBool());
const value2 = reader.readBool();
msg.setMyBool(value2);
break;
case 3:
const value3 = /** @type {string} */ (reader.readString());
const value3 = reader.readString();
msg.addSomeLabels(value3);
break;
case 4:

View File

@ -55,10 +55,6 @@ export interface ClientOptions {
/**
* called when metrics are sent
* Defaults to null
*
* @param {error} Error
* @param {metrics}
* @return void
*/
callback?(error: Error, metrics: any): void;
}
@ -68,19 +64,11 @@ export class Client {
/**
* During the interval time option, if 2 or more metrics with the same name are sent, metrics will be added (summed)
*
* @param {name}
* @param {value} number
* @return void
*/
add(name: string, value: number): void;
/**
* During the interval time option, if 2 or more metrics with the same name are sent, the last one will be used
*
* @param {name} metric name (my.test.metric)
* @param {value} number
* @return void
*/
put(name: string, value: number): void;

View File

@ -46,21 +46,18 @@ declare namespace ReCaptchaV2 {
* Optional. The color theme of the widget.
* Accepted values: "light", "dark"
* @default "light"
* @type {Theme}
*/
theme?: Theme;
/**
* Optional. The type of CAPTCHA to serve.
* Accepted values: "audio", "image"
* @default "image"
* @type {Type}
*/
type?: Type;
/**
* Optional. The size of the widget.
* Accepted values: "compact", "normal", "invisible".
* @default "compact"
* @type {Size}
*/
size?: Size;
/**
@ -77,7 +74,6 @@ declare namespace ReCaptchaV2 {
* Optional. The badge location for g-recaptcha with size of "invisible".
*
* @default "bottomright"
* @type {Badge}
*/
badge?: Badge;
/**

View File

@ -82,7 +82,8 @@ export interface Browser {
* http://www.softwareishard.com/blog/har-12-spec/#pages
*/
export interface Page {
/** Date and time stamp for the beginning of the page load
/**
* Date and time stamp for the beginning of the page load
*
* (ISO 8601 - `YYYY-MM-DDThh:mm:ss.sTZD`,
* e.g. `2009-07-24T19:20:30.45+01:00`).
@ -266,19 +267,21 @@ export interface Page {
* http://www.softwareishard.com/blog/har-12-spec/#pageTimings
*/
export interface PageTiming {
/** Content of the page loaded. Number of milliseconds since page load
/**
* Content of the page loaded. Number of milliseconds since page load
* started (`page.startedDateTime`).
*
* Use `-1` if the timing does not apply to the current request.
*/
onContentLoad?: number;
/** Page is loaded (`onLoad` event fired). Number of milliseconds since
/**
* Page is loaded (`onLoad` event fired). Number of milliseconds since
* page load started (`page.startedDateTime`).
*
* Use `-1` if the timing does not apply to the current request.
*/
onLoad?: number;
/** A comment provided by the user or the application */
/** A comment provided by the user or the application */
comment?: string;
_startRender?: number;
}
@ -562,7 +565,8 @@ export interface Response {
* of header objects._
*/
headersSize: number;
/** Size of the received response body in bytes.
/**
* Size of the received response body in bytes.
*
* - Set to zero in case of responses coming from the cache (`304`).
* - Set to `-1` if the info is not available.
@ -633,12 +637,14 @@ export interface QueryString {
export interface PostData {
/** Mime type of posted data. */
mimeType: string;
/** List of posted parameters (in case of URL encoded parameters).
/**
* List of posted parameters (in case of URL encoded parameters).
*
* _`text` and `params` fields are mutually exclusive._
*/
params: Param[];
/** Plain text posted data
/**
* Plain text posted data
*
* _`params` and `text` fields are mutually exclusive._
*/
@ -733,14 +739,16 @@ export interface Cache {
comment?: string;
}
export interface CacheDetails {
/** Expiration time of the cache entry.
/**
* Expiration time of the cache entry.
*
* _(Format not documente but assumingly ISO 8601 -
* `YYYY-MM-DDThh:mm:ss.sTZD`)_
*/
expires?: string;
/** The last time the cache entry was opened.
* *
/**
* The last time the cache entry was opened.
*
* _(Format not documente but assumingly ISO 8601 -
* `YYYY-MM-DDThh:mm:ss.sTZD`)_
*/

View File

@ -23,9 +23,6 @@ declare namespace haversine {
/**
* Determines the great-circle distance between two points on a sphere given their longitudes and latitudes
* @param start
* @param end
* @param options
*/
declare function haversine(
start: haversine.Coordinate,

View File

@ -1540,7 +1540,7 @@ declare namespace Hls {
* Customized text track syncronization controller.
*/
interface TimelineController {
/**d
/**
* clean-up all used resources
*/
destory(): void;

View File

@ -4,49 +4,26 @@
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* @param {number} [status] the status code
* @param {string} [msg] the message of the error, defaulting to node's text for that status code
* @param {object} [opts] custom properties to attach to the error object
* @param status the status code
* @param msg the message of the error, defaulting to node's text for that status code
* @param opts custom properties to attach to the error object
*/
declare function assert(value: any, status?: number, msg?: string, opts?: {}): void;
declare namespace assert {
/**
* @param {number} [status] the status code
* @param {string} [msg] the message of the error, defaulting to node's text for that status code
* @param {object} [opts] custom properties to attach to the error object
* @param status the status code
* @param msg the message of the error, defaulting to node's text for that status code
* @param opts custom properties to attach to the error object
*/
function equal<T>(a: T, b: T, status?: number, msg?: string, opts?: {}): void;
/**
* @param {number} [status] the status code
* @param {string} [msg] the message of the error, defaulting to node's text for that status code
* @param {object} [opts] custom properties to attach to the error object
*/
function notEqual<T>(a: T, b: T, status?: number, msg?: string, opts?: {}): void;
/**
* @param {number} [status] the status code
* @param {string} [msg] the message of the error, defaulting to node's text for that status code
* @param {object} [opts] custom properties to attach to the error object
*/
function strictEqual<T>(a: T, b: T, status?: number, msg?: string, opts?: {}): void;
/**
* @param {number} [status] the status code
* @param {string} [msg] the message of the error, defaulting to node's text for that status code
* @param {object} [opts] custom properties to attach to the error object
*/
function notStrictEqual<T>(a: T, b: T, status?: number, msg?: string, opts?: {}): void;
/**
* @param {number} [status] the status code
* @param {string} [msg] the message of the error, defaulting to node's text for that status code
* @param {object} [opts] custom properties to attach to the error object
*/
function deepEqual<T>(a: T, b: T, status?: number, msg?: string, opts?: {}): void;
/**
* @param {number} [status] the status code
* @param {string} [msg] the message of the error, defaulting to node's text for that status code
* @param {object} [opts] custom properties to attach to the error object
*/
function notDeepEqual<T>(a: T, b: T, status?: number, msg?: string, opts?: {}): void;
type Assert = <T>(a: T, b: T, status?: number, msg?: string, opts?: {}) => void;
const equal: Assert;
const notEqual: Assert;
const strictEqual: Assert;
const notStrictEqual: Assert;
const deepEqual: Assert;
const notDeepEqual: Assert;
}
export = assert;

View File

@ -32,7 +32,6 @@ declare class Server extends events.EventEmitter {
* @param req - Client request.
* @param res - Client response.
* @param options - Additionnal options.
* @param
*/
web(
req: http.IncomingMessage,

View File

@ -3,32 +3,14 @@
// Definitions by: coderslagoon <https://github.com/coderslagoon>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* Check if input is IPv4 or IPv6.
*
* @param {input} input
*
* @returns {boolean}
*/
/** Check if input is IPv4 or IPv6. */
declare function isIp(input: string): boolean;
declare namespace isIp {
/**
* Check if input is IPv4.
*
* @param {input} input
*
* @returns {boolean}
*/
/** Check if input is IPv4. */
function v4(input: string): boolean;
/**
* Check if input is IPv6.
*
* @param {input} input
*
* @returns {boolean}
*/
/** Check if input is IPv6. */
function v6(input: string): boolean;
}

View File

@ -7,7 +7,7 @@ export = is_number;
/**
* Will test to see if the argument is a valid number, excluding Infinity and NaN.
* @param {*} num - Any value that should be tested for being a number
* @returns {boolean} - true if the parameter is a valid number, otherwise false
* @param num Any value that should be tested for being a number
* @returns true if the parameter is a valid number, otherwise false
*/
declare function is_number(num: any): boolean;

View File

@ -8,13 +8,14 @@
/**
* Affixes the given jquery selectors into the body and will be removed after each spec
* @param {string} selector The JQuery selector to be added to the dom
* @param selector The JQuery selector to be added to the dom
*/
declare function affix(selector: string): JQuery;
interface JQuery {
/** Affixes the given jquery selectors into the element and will be removed after each spec
* @param {string} selector The JQuery selector to be added to the dom
/**
* Affixes the given jquery selectors into the element and will be removed after each spec
* @param selector The JQuery selector to be added to the dom
*/
affix(selector: string): JQuery;
}

View File

@ -198,9 +198,9 @@ declare namespace jest {
/**
* Creates a test closure.
*
* @param {string} name The name of your test
* @param {fn?} ProvidesCallback The function for your test
* @param {timeout?} timeout The timeout for an async function test
* @param name The name of your test
* @param fn The function for your test
* @param timeout The timeout for an async function test
*/
(name: string, fn?: ProvidesCallback, timeout?: number): void;
/**
@ -290,7 +290,7 @@ declare namespace jest {
* The `expect` function is used every time you want to test a value.
* You will rarely call `expect` by itself.
*
* @param {any} actual The value to apply matchers against.
* @param actual The value to apply matchers against.
*/
(actual: any): Matchers<void>;
anything(): any;

View File

@ -14,8 +14,6 @@ interface JQueryMatchHeight {
/**
* Set all selected elements to the height of the tallest.
* If the items are on multiple rows, the items of each row will be set to the tallest of that row.
*
* @param options
*/
(options?: JQueryMatchHeight.Options): JQuery;
_update(): void;

View File

@ -47,8 +47,8 @@ export class Query<T> extends Readable implements Promise<T> {
where(conditions: Object | string): Query<T>;
// Implementing promise methods
then<T, never>(onfulfilled?: any | undefined | null): Promise<T | never>;
catch<never>(onrejected?: any | undefined | null): Promise<T>;
then<T, never>(onfulfilled?: any): Promise<T | never>;
catch<never>(onrejected?: any): Promise<T>;
[Symbol.toStringTag]: "Promise";
}

View File

@ -4,6 +4,7 @@
// TODOs
"ban-types": false,
"no-any-union": false,
"no-unnecessary-class": false,
"no-unnecessary-generics": false
}
}

View File

@ -80,8 +80,6 @@ export class Base<TConnection extends Connection> {
getConnection(id: string): Connection;
/**
* Shut down all existing connections
*
* @public
*/
hangup(): void;
}

View File

@ -8,13 +8,13 @@
import { Url } from 'url';
export type FSReadOptions = {
encoding?: null | undefined;
flag?: string | undefined;
encoding?: null;
flag?: string;
} | null | undefined;
export type FSWriteOptions = string | {
encoding?: string | null | undefined;
mode?: string | number | undefined;
flag?: string | undefined;
encoding?: string | null;
mode?: string | number;
flag?: string;
} | null | undefined;
export type ReadCallback = (err: NodeJS.ErrnoException | null, data: Buffer) => void;
@ -29,23 +29,23 @@ export interface FS {
}
export type JFReadOptions = {
encoding?: null | undefined;
flag?: string | undefined;
encoding?: null;
flag?: string;
throws?: boolean;
fs?: FS;
reviver?: ((key: any, value: any) => any) | undefined;
reviver?: (key: any, value: any) => any;
} | null | undefined;
export type JFWriteOptions = string | {
encoding?: string | null | undefined;
mode?: string | number | undefined;
flag?: string | undefined;
encoding?: string | null;
mode?: string | number;
flag?: string;
throws?: boolean;
fs?: FS;
EOL?: string;
spaces?: string | number | undefined;
replacer?: ((key: string, value: any) => any) | undefined;
} | null | undefined;
spaces?: string | number;
replacer?: (key: string, value: any) => any;
} | null;
export type JFReadCallback = (err: NodeJS.ErrnoException | null, data: any) => void;

40
types/jsrp/index.d.ts vendored
View File

@ -28,58 +28,58 @@ export class client {
/**
* Initialise the client SRP and calculate needed SRP values
* @param {ClientOptions} options - the client options including the username and password
* @param {function(): any} callback - called when the client instance is ready to use
* @param options - the client options including the username and password
* @param callback - called when the client instance is ready to use
*/
init(options: ClientOptions, callback: () => any): void;
/**
* Returns the hex representation of the client's A value
* @returns {string} - hex representation of A
* @returns hex representation of A
*/
getPublicKey(): string;
/**
* Set the salt generated by the server for later computations
* @param {string} hexSalt - hex value of the salt
* @param hexSalt - hex value of the salt
*/
setSalt(hexSalt: string): void;
/**
* Sets the server's B value on the client and compute values to complete authentication
* @param {string} hexB - hex representation of B
* @param hexB - hex representation of B
* @throws Will throw an error if the server provides an incorrect value
*/
setServerPublicKey(hexB: string): void;
/**
* Returns the hex representation of the client's M1 proof
* @returns {string} - hex representation of M1
* @returns hex representation of M1
*/
getProof(): string;
/**
* Verifies the server's M2 proof against the client's. Only call after using {@link getProof}.
* @param {string} hexM2 - hex representation of M2
* @returns {boolean} - true if it matches the client's proof, false if it doesn't
* @param hexM2 - hex representation of M2
* @returns true if it matches the client's proof, false if it doesn't
*/
checkServerProof(hexM2: string): boolean;
/**
* Returns the hex representation of the shared secret key, K
* @returns {string} - hex representation of K
* @returns hex representation of K
*/
getSharedKey(): string;
/**
* Generate the v and salt values from values passed into init().
* @param {function(*, Verifier): *} callback - callback has an error as the first argument, or an object containing the verifier and salt as the second.
* @param callback - callback has an error as the first argument, or an object containing the verifier and salt as the second.
*/
createVerifier(callback: (error: any, result: Verifier) => any): void;
/**
* Returns the hex representation of the salt
* @returns {string} - hex representation of the salt
* @returns hex representation of the salt
*/
getSalt(): string;
}
@ -90,46 +90,46 @@ export class server {
/**
* Initialise the server SRP and calculate needed SRP values
* @param {ServerOptions} options - the server options including the verifier and salt
* @param {function(): void} callback - called when the server instance is ready to use
* @param options - the server options including the verifier and salt
* @param callback - called when the server instance is ready to use
*/
init(options: ServerOptions, callback: () => any): void;
/**
* Returns the hex representation of the server's B value
* @returns {string} - hex representation of B
* @returns hex representation of B
*/
getPublicKey(): string;
/**
* Returns the hex representation of the salt, as was passed into {@link init}
* @returns {string} - hex representation of the salt
* @returns hex representation of the salt
*/
getSalt(): string;
/**
* Sets the client's A value on the server, and compute values to complete authentication
* @param {string} hexA - hex representation of A
* @param hexA - hex representation of A
* @throws Will throw an error if the client provides an incorrect value
*/
setClientPublicKey(hexA: string): void;
/**
* Returns the hex representation of the shared secret key, K
* @returns {string} - hex representation of K
* @returns hex representation of K
*/
getSharedKey(): string;
/**
* Verifies the clients's M1 proof against the server's.
* @param {string} M1hex - hex representation of M1
* @returns {boolean} - true if it matches the server's proof, false if it doesn't
* @param M1hex - hex representation of M1
* @returns true if it matches the server's proof, false if it doesn't
*/
checkClientProof(M1hex: string): boolean;
/**
* Returns the hex representation of the server's M2 proof
* @returns {string} - hex representation of M2
* @returns hex representation of M2
*/
getProof(): string;
}

View File

@ -64,8 +64,8 @@ declare namespace JSZip {
/**
* Prepare the content in the asked type.
* @param {String} type the type of the result.
* @param {OnUpdateCallback} onUpdate a function to call on each internal update.
* @param type the type of the result.
* @param onUpdate a function to call on each internal update.
* @return Promise the promise of the result.
*/
async<T extends OutputType>(type: T, onUpdate?: OnUpdateCallback): Promise<OutputByType[T]>;
@ -75,7 +75,8 @@ declare namespace JSZip {
interface JSZipFileOptions {
/** Set to `true` if the data is `base64` encoded. For example image data from a `<canvas>` element. Plain text and HTML do not need this option. */
base64?: boolean;
/** Set to `true` if the data should be treated as raw content, `false` if this is a text. If `base64` is used,
/**
* Set to `true` if the data should be treated as raw content, `false` if this is a text. If `base64` is used,
* this defaults to `true`, if the data is not a `string`, this will be set to `true`.
*/
binary?: boolean;

View File

@ -1,7 +1,8 @@
{
"extends": "dtslint/dt.json",
"rules": {
// TODO
"no-any-union": false
// TODOs
"no-any-union": false,
"no-unnecessary-class": false
}
}

View File

@ -1,6 +1,8 @@
{
"extends": "dtslint/dt.json",
"rules": {
"no-duplicate-imports": false
// TODOs
"no-duplicate-imports": false,
"no-redundant-jsdoc": false
}
}

View File

@ -1,7 +1,8 @@
{
"extends": "dtslint/dt.json",
"rules": {
// TODO
"no-mergeable-namespace": false
// TODOs
"no-mergeable-namespace": false,
"no-unnecsesary-class": false
}
}

View File

@ -82,6 +82,5 @@ export interface ModuleInfos {
/**
* Run the license check
* @param opts specifies the path to the module to check dependencies of
* @param callback
*/
export function init(opts: InitOpts, callback: (err: Error, ret: ModuleInfos) => void): void;

View File

@ -13,7 +13,6 @@ export = LineByLineReader;
interface LineByLineReader extends EventEmitter {
/**
* subscribe to an event emitted by reader
* @param event {@link LineByLineReaderEvent}
* @param listener A void function with one param
*/
on(event: LineByLineReaderEvent, listener: (value: any) => void): this;

View File

@ -3,6 +3,7 @@
"rules": {
// TODOs
"no-any-union": false,
"no-unnecessary-class": false,
"no-unnecessary-generics": false
}
}

View File

@ -6,15 +6,11 @@
interface LoadJsonFile {
/**
* Returns a promise for the parsed JSON.
*
* @param filepath
*/
(filepath: string): Promise<any>;
/**
* Returns the parsed JSON.
*
* @param filepath
*/
sync(filepath: string): any;
}

View File

@ -12,7 +12,6 @@ export = makeDir;
/**
* Returns a `Promise` for the path to the created directory.
* @param path Directory to create.
* @param options
*/
declare function makeDir(path: string, options?: makeDir.Options): Promise<string>;
@ -20,7 +19,6 @@ declare namespace makeDir {
/**
* Returns the path to the created directory.
* @param path Directory to create.
* @param options
*/
function sync(path: string, options?: Options): string;

View File

@ -52,7 +52,7 @@ declare namespace merge2 {
* If you set end === false in options, this event give you a notice that
* you should add more streams to merge, or end the mergedStream.
*
* @param {string} event The 'queueDrain' event
* @param event The 'queueDrain' event
*
* @return This stream
*/

View File

@ -1 +1,7 @@
{ "extends": "dtslint/dt.json" }
{
"extends": "dtslint/dt.json",
"rules": {
// TODO
"no-unnecessary-class": false
}
}

View File

@ -49,8 +49,6 @@ declare namespace morgan {
* client error codes, cyan for redirection codes, and uncolored for
* all other codes.
* :method :url :status :response-time ms - :res[content-length]
* @param format
* @param options
*/
(format: 'dev', options?: Options): express.RequestHandler;

View File

@ -23,7 +23,8 @@ declare namespace multer {
dest?: string;
/** The storage engine to use for uploaded files. */
storage?: StorageEngine;
/** An object specifying the size limits of the following optional properties. This object is passed to busboy
/**
* An object specifying the size limits of the following optional properties. This object is passed to busboy
* directly, and the details of properties can be found on https://github.com/mscdex/busboy#busboy-methods
*/
limits?: {

View File

@ -6,10 +6,8 @@
/**
* Match utility function which supports multiple pattern globbing.
*
* @param {string[]} paths list to match against.
* @param {string[]} patterns globbing patterns to use. e.g. `[*, "!cake"]`.
* @param {multimatch.MultimatchOptions} [options]
* @returns {string[]}
* @param paths list to match against.
* @param patterns globbing patterns to use. e.g. `[*, "!cake"]`.
*/
declare function multimatch(paths: string[], patterns: string | string[], options?: multimatch.MultimatchOptions): string[];
@ -61,7 +59,8 @@ declare namespace multimatch {
/** Suppress the behavior of treating a leading `!` character as negation. */
nonegate?: boolean;
/** Returns from negate expressions the same as if they were not negated.
/**
* Returns from negate expressions the same as if they were not negated.
* (Ie, true on a hit, false on a miss.)
*/
flipNegate?: boolean;

View File

@ -12,7 +12,7 @@ declare class NeDBLoggerDataStore {
/**
* Insert a new document
* @param {Function} cb Optional callback, signature: err, insertedDoc
* @param cb Optional callback, signature: err, insertedDoc
*/
insert<T>(newDoc: T, cb?: (err: Error, document: T) => void): void;
}

View File

@ -103,7 +103,9 @@ declare class horseman {
/** Fire a mouse event. */
mouseEvent(type?: string, x?: number, y?: number, button?: string): this;
/** Handles page events. * eventType can be one of:
/**
* Handles page events.
* eventType can be one of:
* initialized - callback()
* loadStarted - callback()
* loadFinished - callback(status)

View File

@ -1,6 +1,8 @@
{
"extends": "dtslint/dt.json",
"rules": {
"no-object-literal-type-assertion": false
// TODOs
"no-object-literal-type-assertion": false,
"no-unnecessary-class": false
}
}

View File

@ -46,21 +46,21 @@ export function init(config?: WavesConfig): void;
* Attach ripple effect by adding `.waves-effect` to HTML element.
* Make sure you call `init` to activate the ripple.
*
* @param {ElementTarget} elements elements to target.
* @param {(string | string[])} [classes] classes to add.
* @param elements elements to target.
* @param classes classes to add.
*/
export function attach(elements: ElementTarget, classes?: string | string[]): void;
/**
* Creates a ripple effect in HTML element programmatically.
* @param {ElementTarget} elements elements to target (must have `.waves-effect` already applied, ideally via `attach`).
* @param {RippleOptions} [options] specify how long to wait between starting and stopping the ripple, and it's position inside the element.
* @param elements elements to target (must have `.waves-effect` already applied, ideally via `attach`).
* @param options specify how long to wait between starting and stopping the ripple, and it's position inside the element.
*/
export function ripple(elements: ElementTarget, options?: RippleOptions): void;
/**
* Removes all ripples from inside an element immediately.
*
* @param {ElementTarget} elements elements to remove ripples from.
* @param elements elements to remove ripples from.
*/
export function calm(elements: ElementTarget): void;

View File

@ -1 +1,7 @@
{ "extends": "dtslint/dt.json" }
{
"extends": "dtslint/dt.json",
"rules": {
// TODOs
"no-unnecessary-class": false
}
}

View File

@ -35,9 +35,8 @@ export class Stanza extends Element {
* https://facebook.github.io/jsx/
* Returns a Stanza if name is presence, message or iq an ltx Element otherwise.
*
* @param {string} name name of the element
* @param {any} attrs attribute key/value pairs
* @return {Element} Stanza or Element
* @param name name of the element
* @param attrs attribute key/value pairs
*/
export function createStanza(name: string, attrs?: any): Element;

View File

@ -16,8 +16,8 @@ declare namespace addressparser {
*
* [{name: 'Name', address: 'address@domain'}]
*
* @param {String} str Address field
* @return {Array} An array of address objects
* @param str Address field
* @return An array of address objects
*/
declare function addressparser(address: string): addressparser.Address;

View File

@ -8,6 +8,7 @@
"jsdoc-format": false,
"max-line-length": false,
"no-consecutive-blank-lines": false,
"no-redundant-jsdoc": false,
"no-var-keyword": false,
"only-arrow-functions": false,
"prefer-const": false,

View File

@ -22,8 +22,6 @@ declare namespace pSettle {
* * `isFulfilled`
* * `isRejected`
* * `value` or `reason` (Depending on whether the promise fulfilled or rejected)
*
* @param input
*/
declare function pSettle<T>(input: Iterable<PromiseLike<T>>): Promise<Array<pSettle.SettledResult<T>>>;

View File

@ -1,5 +1,4 @@
// tslint:disable-next-line:no-duplicate-imports
import * as OAuth2Strategy from 'passport-oauth2';
import OAuth2Strategy = require('passport-oauth2');
import { Strategy, StrategyOptions, StrategyOptionsWithRequest, VerifyCallback, AuthorizationError, TokenError, InternalOAuthError } from 'passport-oauth2';
import { Strategy as PassportStrategy } from 'passport';
import { Request } from 'express';

View File

@ -18,7 +18,7 @@ declare class Pikaday {
* Extends the existing configuration options for Pikaday object with the options provided.
* Can be used to change/extend the configurations on runtime.
* @param options full/partial configuration options.
* @returns {} extended configurations.
* @returns extended configurations.
*/
config(options: Pikaday.PikadayOptions): Pikaday.PikadayOptions;

View File

@ -20,7 +20,7 @@ declare class Pikaday {
* Extends the existing configuration options for Pikaday object with the options provided.
* Can be used to change/extend the configurations on runtime.
* @param options full/partial configuration options.
* @returns {} extended configurations.
* @returns extended configurations.
*/
config(options: Pikaday.PikadayOptions): Pikaday.PikadayOptions;

View File

@ -6,10 +6,9 @@
/**
* Polylabel returns the pole of inaccessibility coordinate in [x, y] format.
*
* @param {Array<number>} polygon - Given polygon coordinates in GeoJSON-like format
* @param {number} precision - Precision (1.0 by default)
* @param {boolean} debug - Debugging for Console
* @return {Array<number>}
* @param polygon - Given polygon coordinates in GeoJSON-like format
* @param precision - Precision (1.0 by default)
* @param debug - Debugging for Console
* @example
* var p = polylabel(polygon, 1.0);
*/

View File

@ -45,7 +45,8 @@ declare namespace PouchDB {
/** Special condition to match the length of an array field in a document. Non-array fields cannot match this condition. */
$size?: number;
/** Divisor and Remainder are both positive or negative integers.
/**
* Divisor and Remainder are both positive or negative integers.
* Non-integer values result in a 404 status.
* Matches documents where (field % Divisor == Remainder) is true, and only when the document field is an integer.
* [divisor, remainder]

View File

@ -1,3 +1,7 @@
{
"extends": "dtslint/dt.json"
"extends": "dtslint/dt.json",
"rules": {
// TODO
"no-unnecessary-class": false
}
}

View File

@ -1 +1,7 @@
{ "extends": "dtslint/dt.json" }
{
"extends": "dtslint/dt.json",
"rules": {
// TODOs
"no-unnecessary-class": false
}
}

View File

@ -10,16 +10,9 @@
*/
export type ec_level = 'L' | 'M' | 'Q' | 'H';
/**
* image type. Possible values png (default), svg, pdf and eps.
*/
/** @default 'png' */
export type image_type = 'png' | 'svg' | 'pdf' | 'eps';
/**
* image options object:
*
* @interface IOptions
*/
export interface Options {
ec_level?: ec_level; // error correction level. One of L, M, Q, H. Default M.
type?: image_type; // image type. Possible values png(default), svg, pdf and eps.
@ -29,12 +22,12 @@ export interface Options {
}
export function image(text: string, level?: ec_level): NodeJS.ReadableStream;
export function image(text: string, optoins?: Options): NodeJS.ReadableStream;
export function image(text: string, options?: Options): NodeJS.ReadableStream;
export function imageSync(text: string, level?: ec_level): Buffer;
export function imageSync(text: string, optoins?: Options): string | Buffer;
export function imageSync(text: string, options?: Options): string | Buffer;
export function svgObject(text: string, level?: ec_level): any;
export function svgObject(text: string, optoins?: Options): any;
export function svgObject(text: string, options?: Options): any;
export function matrix(text: string, level?: ec_level): any[][];

View File

@ -13,7 +13,6 @@ export interface ParseOptions {
/**
* Parse a query string into an object.
* Leading ? or # are ignored, so you can pass location.search or location.hash directly.
* @param str
*/
export function parse(str: string, options?: ParseOptions): any;
@ -25,14 +24,10 @@ export interface StringifyOptions {
/**
* Stringify an object into a query string, sorting the keys.
*
* @param obj
*/
export function stringify(obj: object, options?: StringifyOptions): string;
/**
* Extract a query string from a URL that can be passed into .parse().
*
* @param str
*/
export function extract(str: string): string;

View File

@ -1,7 +1,8 @@
{
"extends": "dtslint/dt.json",
"rules": {
// TODO
"no-any-union": false
// TODOs
"no-any-union": false,
"no-redundant-jsdoc": false
}
}

View File

@ -1,3 +1,7 @@
{
"extends": "dtslint/dt.json"
"extends": "dtslint/dt.json",
"rules": {
// TODO
"no-unnecessary-class": false
}
}

View File

@ -8,7 +8,6 @@ export = RemoveMarkdown;
/**
* Strip Markdown formatting from text
* @param markdown Markdown text
* @param options
*/
declare function RemoveMarkdown(markdown: string, options?: {
stripListLeaders?: boolean

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