diff --git a/types/activex-libreoffice/tslint.json b/types/activex-libreoffice/tslint.json index 098cdac415..58ae722582 100644 --- a/types/activex-libreoffice/tslint.json +++ b/types/activex-libreoffice/tslint.json @@ -3,6 +3,7 @@ "rules": { "interface-name": [false], "ban-types": false, + "no-redundant-jsdoc": false, "no-unnecessary-qualifier": false } } \ No newline at end of file diff --git a/types/angular-block-ui/index.d.ts b/types/angular-block-ui/index.d.ts index 47ba9902b9..f415d386e9 100644 --- a/types/angular-block-ui/index.d.ts +++ b/types/angular-block-ui/index.d.ts @@ -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; diff --git a/types/angular/angular-tests.ts b/types/angular/angular-tests.ts index 03f7af5160..6d8b11bffe 100644 --- a/types/angular/angular-tests.ts +++ b/types/angular/angular-tests.ts @@ -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); } diff --git a/types/angular/index.d.ts b/types/angular/index.d.ts index bcc8ab7466..45b9bea058 100644 --- a/types/angular/index.d.ts +++ b/types/angular/index.d.ts @@ -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 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(successCallback: (promiseValue: T) => IPromise|TResult, errorCallback?: null | undefined, notifyCallback?: (state: any) => any): IPromise; - then(successCallback: (promiseValue: T) => IPromise|TResult2, errorCallback?: null | undefined, notifyCallback?: (state: any) => any): IPromise; + then(successCallback: (promiseValue: T) => IPromise|TResult, errorCallback?: null, notifyCallback?: (state: any) => any): IPromise; + then(successCallback: (promiseValue: T) => IPromise|TResult2, errorCallback?: null, notifyCallback?: (state: any) => any): IPromise; then(successCallback: (promiseValue: T) => IPromise|TResult, errorCallback: (reason: any) => IPromise|TCatch, notifyCallback?: (state: any) => any): IPromise; then(successCallback: (promiseValue: T) => IPromise|TResult2, errorCallback: (reason: any) => IPromise|TCatch2, notifyCallback?: (state: any) => any): IPromise; @@ -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; /** * total amount of pending template requests being downloaded. - * @type {number} */ totalPendingRequests: number; } diff --git a/types/annyang/index.d.ts b/types/annyang/index.d.ts index fee0cb9acb..76f2bdb455 100644 --- a/types/annyang/index.d.ts +++ b/types/annyang/index.d.ts @@ -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; } diff --git a/types/applicationinsights-js/tslint.json b/types/applicationinsights-js/tslint.json index e4be61c456..482dffd727 100644 --- a/types/applicationinsights-js/tslint.json +++ b/types/applicationinsights-js/tslint.json @@ -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 } } diff --git a/types/arrify/index.d.ts b/types/arrify/index.d.ts index 896ee23224..a1dda1b9ec 100644 --- a/types/arrify/index.d.ts +++ b/types/arrify/index.d.ts @@ -12,7 +12,6 @@ * arrify(1) // returns [1] * @example * arrify([2, 3]) // returns [2, 3] - * @param val */ declare function arrify(val: undefined | null | T | T[]): T[]; export = arrify; diff --git a/types/ascii2mathml/index.d.ts b/types/ascii2mathml/index.d.ts index 2b02dfea15..dcb9f7bb98 100644 --- a/types/ascii2mathml/index.d.ts +++ b/types/ascii2mathml/index.d.ts @@ -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; diff --git a/types/async/tslint.json b/types/async/tslint.json index b1ab4a96cc..9380375afa 100644 --- a/types/async/tslint.json +++ b/types/async/tslint.json @@ -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, diff --git a/types/atom-mocha-test-runner/atom-mocha-test-runner-tests.ts b/types/atom-mocha-test-runner/atom-mocha-test-runner-tests.ts index 434e48f261..cae2dd0e54 100644 --- a/types/atom-mocha-test-runner/atom-mocha-test-runner-tests.ts +++ b/types/atom-mocha-test-runner/atom-mocha-test-runner-tests.ts @@ -34,5 +34,5 @@ async function runTests(): Promise { }; num = await defaultMochaRunner(runnerArgs); - return await testRunner(runnerArgs); + return testRunner(runnerArgs); } diff --git a/types/autosize/index.d.ts b/types/autosize/index.d.ts index a189b32817..b66dcc2aae 100644 --- a/types/autosize/index.d.ts +++ b/types/autosize/index.d.ts @@ -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; } diff --git a/types/babel-core/index.d.ts b/types/babel-core/index.d.ts index a2476245c1..3a41d2d252 100644 --- a/types/babel-core/index.d.ts +++ b/types/babel-core/index.d.ts @@ -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 ; } diff --git a/types/backbone.marionette/index.d.ts b/types/backbone.marionette/index.d.ts index be3dfd8582..cd8ccd3821 100644 --- a/types/backbone.marionette/index.d.ts +++ b/types/backbone.marionette/index.d.ts @@ -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 extends Backbone.ViewOptions, 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; } diff --git a/types/bagpipes/index.d.ts b/types/bagpipes/index.d.ts index ec1d0cceb7..309ae38318 100755 --- a/types/bagpipes/index.d.ts +++ b/types/bagpipes/index.d.ts @@ -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; diff --git a/types/bitcoinjs-lib/index.d.ts b/types/bitcoinjs-lib/index.d.ts index 796758715d..4caa6e1e2d 100644 --- a/types/bitcoinjs-lib/index.d.ts +++ b/types/bitcoinjs-lib/index.d.ts @@ -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 diff --git a/types/blob-util/index.d.ts b/types/blob-util/index.d.ts index 9ab6cb4b5f..7710734bf2 100644 --- a/types/blob-util/index.d.ts +++ b/types/blob-util/index.d.ts @@ -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; /** * Convert a binary string to a Blob. - * - * @param binary * @param type the content type */ export function binaryStringToBlob(binary: string, type?: string): Promise; /** * Convert a Blob to a base-64 string. - * - * @param blob */ export function blobToBase64String(blob: Blob): Promise; /** * Convert a base-64 string to a Blob. - * - * @param base64 * @param type the content type */ export function base64StringToBlob(base64: string, type?: string): Promise; /** * Convert a data URL string (e.g. `'data:image/png;base64,iVBORw0KG...'`) to a Blob. - * - * @param dataURL */ export function dataURLToBlob(dataURL: string): Promise; /** * Convert a Blob to a data URL string (e.g. `'data:image/png;base64,iVBORw0KG...'`). - * - * @param blob */ export function blobToDataURL(blob: Blob): Promise; @@ -75,7 +59,6 @@ export function blobToDataURL(blob: Blob): Promise; * * 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; /** * Convert a Blob to an ArrayBuffer. - * - * @param blob */ export function blobToArrayBuffer(blob: Blob): Promise; diff --git a/types/bluebird-global/tslint.json b/types/bluebird-global/tslint.json index 1d81af2349..31bf31d881 100644 --- a/types/bluebird-global/tslint.json +++ b/types/bluebird-global/tslint.json @@ -6,6 +6,7 @@ "array-type": false, "unified-signatures": false, "ban-types": false, + "no-redundant-undefined": false, "no-unnecessary-generics": false } } diff --git a/types/bluebird/tslint.json b/types/bluebird/tslint.json index 44da6a5d92..3f946593ed 100644 --- a/types/bluebird/tslint.json +++ b/types/bluebird/tslint.json @@ -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, diff --git a/types/bootstrap-slider/index.d.ts b/types/bootstrap-slider/index.d.ts index 557c7aa5ad..b17f912d57 100644 --- a/types/bootstrap-slider/index.d.ts +++ b/types/bootstrap-slider/index.d.ts @@ -134,7 +134,6 @@ interface SliderPlugin { (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; /** diff --git a/types/bull/index.d.ts b/types/bull/index.d.ts index 5754236da8..abfd4ddd98 100644 --- a/types/bull/index.d.ts +++ b/types/bull/index.d.ts @@ -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; /** * 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; diff --git a/types/bunyan-blackhole/index.d.ts b/types/bunyan-blackhole/index.d.ts index f8be6fc730..2ece8b2f40 100644 --- a/types/bunyan-blackhole/index.d.ts +++ b/types/bunyan-blackhole/index.d.ts @@ -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; diff --git a/types/chai-jest-snapshot/index.d.ts b/types/chai-jest-snapshot/index.d.ts index f19158e282..40ce5afc1b 100644 --- a/types/chai-jest-snapshot/index.d.ts +++ b/types/chai-jest-snapshot/index.d.ts @@ -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; } diff --git a/types/chroma-js/index.d.ts b/types/chroma-js/index.d.ts index f826c8f254..c18484dc1f 100644 --- a/types/chroma-js/index.d.ts +++ b/types/chroma-js/index.d.ts @@ -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. */ diff --git a/types/clipboard/index.d.ts b/types/clipboard/index.d.ts index 0aa51518dd..76d28674d6 100644 --- a/types/clipboard/index.d.ts +++ b/types/clipboard/index.d.ts @@ -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} element to use. + * @param elem Current element + * @returns 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; } diff --git a/types/combine-source-map/index.d.ts b/types/combine-source-map/index.d.ts index 43f1c994b0..3855942092 100644 --- a/types/combine-source-map/index.d.ts +++ b/types/combine-source-map/index.d.ts @@ -3,13 +3,15 @@ // Definitions by: 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; diff --git a/types/convert-source-map/index.d.ts b/types/convert-source-map/index.d.ts index 6b1346b61f..6950445a6c 100644 --- a/types/convert-source-map/index.d.ts +++ b/types/convert-source-map/index.d.ts @@ -3,7 +3,8 @@ // Definitions by: Andrew Gaspar , Melvin Groenhoff , 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. */ diff --git a/types/convict/index.d.ts b/types/convict/index.d.ts index 5aac427dd0..9a31e0ccbb 100644 --- a/types/convict/index.d.ts +++ b/types/convict/index.d.ts @@ -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; } diff --git a/types/cookie-signature/index.d.ts b/types/cookie-signature/index.d.ts index b9b29911a6..cb044f4636 100644 --- a/types/cookie-signature/index.d.ts +++ b/types/cookie-signature/index.d.ts @@ -3,19 +3,11 @@ // Definitions by: François Nguyen // 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; diff --git a/types/cordova-plugin-native-keyboard/index.d.ts b/types/cordova-plugin-native-keyboard/index.d.ts index 0f64199bd1..9acc3d0be5 100644 --- a/types/cordova-plugin-native-keyboard/index.d.ts +++ b/types/cordova-plugin-native-keyboard/index.d.ts @@ -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; diff --git a/types/cytoscape/index.d.ts b/types/cytoscape/index.d.ts index 3a618195d1..21d6d4344b 100644 --- a/types/cytoscape/index.d.ts +++ b/types/cytoscape/index.d.ts @@ -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; diff --git a/types/delay/index.d.ts b/types/delay/index.d.ts index f84c7ab5e4..0ec894f1e1 100644 --- a/types/delay/index.d.ts +++ b/types/delay/index.d.ts @@ -22,9 +22,9 @@ declare namespace delay { type PDelayedPassThroughThunk = ((value: TValue) => DelayedPromiseLike) & DelayedPromiseLike; interface DelayedPromiseLike { - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, - onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise; + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | null, + onrejected?: ((reason: any) => TResult2 | PromiseLike) | null): Promise; + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | null): Promise; cancel(): void; } } diff --git a/types/dom-inputevent/index.d.ts b/types/dom-inputevent/index.d.ts index df1cce5ec4..0d2111a0e0 100644 --- a/types/dom-inputevent/index.d.ts +++ b/types/dom-inputevent/index.d.ts @@ -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); -} diff --git a/types/dwt/tslint.json b/types/dwt/tslint.json index acce7c8a0b..5d3b93bdf9 100644 --- a/types/dwt/tslint.json +++ b/types/dwt/tslint.json @@ -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] diff --git a/types/dwt/v12/tslint.json b/types/dwt/v12/tslint.json index acce7c8a0b..5d3b93bdf9 100644 --- a/types/dwt/v12/tslint.json +++ b/types/dwt/v12/tslint.json @@ -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] diff --git a/types/electron-settings/v2/index.d.ts b/types/electron-settings/v2/index.d.ts index a869fd52b8..2f767358e5 100644 --- a/types/electron-settings/v2/index.d.ts +++ b/types/electron-settings/v2/index.d.ts @@ -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 diff --git a/types/execa/index.d.ts b/types/execa/index.d.ts index c74c60672d..84c6939798 100644 --- a/types/execa/index.d.ts +++ b/types/execa/index.d.ts @@ -43,7 +43,7 @@ interface ExecaReturns { type ExecaError = Error & ExecaReturns; interface ExecaChildPromise { - catch(onrejected?: ((reason: ExecaError) => TResult | PromiseLike) | undefined | null): Promise; + catch(onrejected?: ((reason: ExecaError) => TResult | PromiseLike) | null): Promise; } type ExecaChildProcess = ChildProcess & ExecaChildPromise & Promise; diff --git a/types/express-brute-mongo/index.d.ts b/types/express-brute-mongo/index.d.ts index 56af09a099..0b637ed37b 100644 --- a/types/express-brute-mongo/index.d.ts +++ b/types/express-brute-mongo/index.d.ts @@ -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; diff --git a/types/express-brute-mongo/tslint.json b/types/express-brute-mongo/tslint.json index c0ad422b87..81e3db2614 100644 --- a/types/express-brute-mongo/tslint.json +++ b/types/express-brute-mongo/tslint.json @@ -1,8 +1,9 @@ { "extends": "dtslint/dt.json", "rules": { - // TODO + // TODOs "ban-types": false, - "dt-header": false + "dt-header": false, + "no-unnecessary-class": false } } diff --git a/types/express-mysql-session/index.d.ts b/types/express-mysql-session/index.d.ts index f8d6282ecd..14c857b5dc 100644 --- a/types/express-mysql-session/index.d.ts +++ b/types/express-mysql-session/index.d.ts @@ -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; } diff --git a/types/firebird/index.d.ts b/types/firebird/index.d.ts index eaa20682a6..771a61f706 100644 --- a/types/firebird/index.d.ts +++ b/types/firebird/index.d.ts @@ -29,10 +29,6 @@ declare module 'firebird' { * Connects you to database, * * @param database a database name in Firebird notation, i.e. : - * @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. : - * @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; } diff --git a/types/flickity/index.d.ts b/types/flickity/index.d.ts index fda440b1fe..ae5dc46cb7 100644 --- a/types/flickity/index.d.ts +++ b/types/flickity/index.d.ts @@ -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; diff --git a/types/fm-websync/index.d.ts b/types/fm-websync/index.d.ts index ef5d51d64b..997c4666d1 100644 --- a/types/fm-websync/index.d.ts +++ b/types/fm-websync/index.d.ts @@ -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; } diff --git a/types/fs-extra-promise-es6/index.d.ts b/types/fs-extra-promise-es6/index.d.ts index f5847dd6f0..0f52b5c02e 100644 --- a/types/fs-extra-promise-es6/index.d.ts +++ b/types/fs-extra-promise-es6/index.d.ts @@ -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; 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; export function readFileAsync(filename: string): Promise; -/** - * writeFileAsync - * @param filename - * @param data - * @param options: - * string: encoding - * OpenOptions: options - */ export function writeFileAsync(filename: string, data: any, options?: OpenOptions | string): Promise; -/** - * appendFileAsync - * @param filename - * @param data - * @param option: - * string: encoding - * OpenOptions: option - */ export function appendFileAsync(filename: string, data: any, option?: OpenOptions | string): Promise; export function existsAsync(path: string): Promise; diff --git a/types/fs-extra-promise/index.d.ts b/types/fs-extra-promise/index.d.ts index 9d174f791f..de47c81a1e 100644 --- a/types/fs-extra-promise/index.d.ts +++ b/types/fs-extra-promise/index.d.ts @@ -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; export function createFileAsync(file: string): Promise; @@ -75,32 +67,9 @@ export function futimesAsync(fd: number, atime: number, mtime: number): Promise< export function fsyncAsync(fd: number): Promise; 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; export function readFileAsync(filename: string): Promise; -/** - * writeFileAsync - * @param filename - * @param data - * @param options: - * string: encoding - * WriteOptions: options - */ export function writeFileAsync(filename: string, data: any, options?: string | WriteOptions): Promise; -/** - * appendFileAsync - * @param filename - * @param data - * @param options: - * string: encoding - * WriteOptions: options - */ export function appendFileAsync(filename: string, data: any, option?: string | WriteOptions): Promise; export function existsAsync(path: string): Promise; diff --git a/types/fs-extra/index.d.ts b/types/fs-extra/index.d.ts index 60c112c68b..84548e48a4 100644 --- a/types/fs-extra/index.d.ts +++ b/types/fs-extra/index.d.ts @@ -154,15 +154,12 @@ export function lstat(path: string | Buffer): Promise; /** * 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; /** * 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; /** * 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; diff --git a/types/geodesy/index.d.ts b/types/geodesy/index.d.ts index 1d8ef3e110..d66de9fe3d 100644 --- a/types/geodesy/index.d.ts +++ b/types/geodesy/index.d.ts @@ -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 { diff --git a/types/geolib/index.d.ts b/types/geolib/index.d.ts index 8842c3eb20..b8638ecc71 100644 --- a/types/geolib/index.d.ts +++ b/types/geolib/index.d.ts @@ -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}` diff --git a/types/google-protobuf/google-protobuf-tests.ts b/types/google-protobuf/google-protobuf-tests.ts index 19421754ac..ee9a1c8d66 100644 --- a/types/google-protobuf/google-protobuf-tests.ts +++ b/types/google-protobuf/google-protobuf-tests.ts @@ -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: diff --git a/types/graphite-udp/index.d.ts b/types/graphite-udp/index.d.ts index 167b85673a..dbd07ddf43 100644 --- a/types/graphite-udp/index.d.ts +++ b/types/graphite-udp/index.d.ts @@ -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; diff --git a/types/grecaptcha/index.d.ts b/types/grecaptcha/index.d.ts index 59d1fa6699..067139e6c9 100644 --- a/types/grecaptcha/index.d.ts +++ b/types/grecaptcha/index.d.ts @@ -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; /** diff --git a/types/har-format/index.d.ts b/types/har-format/index.d.ts index 09ea2791fd..3ab7fd773e 100644 --- a/types/har-format/index.d.ts +++ b/types/har-format/index.d.ts @@ -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`)_ */ diff --git a/types/haversine/index.d.ts b/types/haversine/index.d.ts index aa3c0cb1aa..6fed860d8b 100644 --- a/types/haversine/index.d.ts +++ b/types/haversine/index.d.ts @@ -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, diff --git a/types/hls.js/index.d.ts b/types/hls.js/index.d.ts index f496f2d165..3567db3f87 100644 --- a/types/hls.js/index.d.ts +++ b/types/hls.js/index.d.ts @@ -1540,7 +1540,7 @@ declare namespace Hls { * Customized text track syncronization controller. */ interface TimelineController { - /**d + /** * clean-up all used resources */ destory(): void; diff --git a/types/http-assert/index.d.ts b/types/http-assert/index.d.ts index 47b283db92..4e9ca6657d 100644 --- a/types/http-assert/index.d.ts +++ b/types/http-assert/index.d.ts @@ -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(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(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(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(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(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(a: T, b: T, status?: number, msg?: string, opts?: {}): void; + type Assert = (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; diff --git a/types/http-proxy/index.d.ts b/types/http-proxy/index.d.ts index 4ed829d390..6c4b885ac2 100644 --- a/types/http-proxy/index.d.ts +++ b/types/http-proxy/index.d.ts @@ -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, diff --git a/types/is-ip/index.d.ts b/types/is-ip/index.d.ts index c706d50397..70d8ebb88e 100644 --- a/types/is-ip/index.d.ts +++ b/types/is-ip/index.d.ts @@ -3,32 +3,14 @@ // Definitions by: 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; } diff --git a/types/is-number/index.d.ts b/types/is-number/index.d.ts index 27d7328456..fff535c46a 100644 --- a/types/is-number/index.d.ts +++ b/types/is-number/index.d.ts @@ -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; diff --git a/types/jasmine-fixture/index.d.ts b/types/jasmine-fixture/index.d.ts index a49aeca029..82449ffc01 100644 --- a/types/jasmine-fixture/index.d.ts +++ b/types/jasmine-fixture/index.d.ts @@ -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; } diff --git a/types/jest/index.d.ts b/types/jest/index.d.ts index 80afeab207..18b3db361a 100644 --- a/types/jest/index.d.ts +++ b/types/jest/index.d.ts @@ -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; anything(): any; diff --git a/types/jquery-match-height/index.d.ts b/types/jquery-match-height/index.d.ts index 491a0dbe1d..2c2a69db67 100644 --- a/types/jquery-match-height/index.d.ts +++ b/types/jquery-match-height/index.d.ts @@ -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; diff --git a/types/jsforce/query.d.ts b/types/jsforce/query.d.ts index d0353ec638..242d89b358 100644 --- a/types/jsforce/query.d.ts +++ b/types/jsforce/query.d.ts @@ -47,8 +47,8 @@ export class Query extends Readable implements Promise { where(conditions: Object | string): Query; // Implementing promise methods - then(onfulfilled?: any | undefined | null): Promise; - catch(onrejected?: any | undefined | null): Promise; + then(onfulfilled?: any): Promise; + catch(onrejected?: any): Promise; [Symbol.toStringTag]: "Promise"; } diff --git a/types/jsforce/tslint.json b/types/jsforce/tslint.json index 5fdd35f19c..3b1f082eb2 100644 --- a/types/jsforce/tslint.json +++ b/types/jsforce/tslint.json @@ -4,6 +4,7 @@ // TODOs "ban-types": false, "no-any-union": false, + "no-unnecessary-class": false, "no-unnecessary-generics": false } } diff --git a/types/json-rpc-ws/index.d.ts b/types/json-rpc-ws/index.d.ts index c3023c409e..9faaeefd66 100644 --- a/types/json-rpc-ws/index.d.ts +++ b/types/json-rpc-ws/index.d.ts @@ -80,8 +80,6 @@ export class Base { getConnection(id: string): Connection; /** * Shut down all existing connections - * - * @public */ hangup(): void; } diff --git a/types/jsonfile/index.d.ts b/types/jsonfile/index.d.ts index bed60556a1..62227c9e84 100644 --- a/types/jsonfile/index.d.ts +++ b/types/jsonfile/index.d.ts @@ -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; diff --git a/types/jsrp/index.d.ts b/types/jsrp/index.d.ts index 27f52c9e91..6cdb2abd7f 100644 --- a/types/jsrp/index.d.ts +++ b/types/jsrp/index.d.ts @@ -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; } diff --git a/types/jszip/index.d.ts b/types/jszip/index.d.ts index 0962f46ff8..a6253e60b8 100644 --- a/types/jszip/index.d.ts +++ b/types/jszip/index.d.ts @@ -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(type: T, onUpdate?: OnUpdateCallback): Promise; @@ -75,7 +75,8 @@ declare namespace JSZip { interface JSZipFileOptions { /** Set to `true` if the data is `base64` encoded. For example image data from a `` 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; diff --git a/types/kafka-node/tslint.json b/types/kafka-node/tslint.json index b1439230db..75a24b3163 100644 --- a/types/kafka-node/tslint.json +++ b/types/kafka-node/tslint.json @@ -1,7 +1,8 @@ { "extends": "dtslint/dt.json", "rules": { - // TODO - "no-any-union": false + // TODOs + "no-any-union": false, + "no-unnecessary-class": false } } diff --git a/types/keycloak-js/tslint.json b/types/keycloak-js/tslint.json index f2ffe2445b..df4e2dbdfb 100644 --- a/types/keycloak-js/tslint.json +++ b/types/keycloak-js/tslint.json @@ -1,6 +1,8 @@ { "extends": "dtslint/dt.json", "rules": { - "no-duplicate-imports": false + // TODOs + "no-duplicate-imports": false, + "no-redundant-jsdoc": false } } diff --git a/types/knuddels-userapps-api/tslint.json b/types/knuddels-userapps-api/tslint.json index 07a8255955..67eb97841e 100644 --- a/types/knuddels-userapps-api/tslint.json +++ b/types/knuddels-userapps-api/tslint.json @@ -1,7 +1,8 @@ { "extends": "dtslint/dt.json", "rules": { - // TODO - "no-mergeable-namespace": false + // TODOs + "no-mergeable-namespace": false, + "no-unnecsesary-class": false } } diff --git a/types/license-checker/index.d.ts b/types/license-checker/index.d.ts index ec4ec39658..d0286a05af 100644 --- a/types/license-checker/index.d.ts +++ b/types/license-checker/index.d.ts @@ -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; diff --git a/types/line-by-line/index.d.ts b/types/line-by-line/index.d.ts index 605c5cd07e..9cfeab723c 100644 --- a/types/line-by-line/index.d.ts +++ b/types/line-by-line/index.d.ts @@ -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; diff --git a/types/linq4js/tslint.json b/types/linq4js/tslint.json index 3393f9dcca..bb491510c7 100644 --- a/types/linq4js/tslint.json +++ b/types/linq4js/tslint.json @@ -3,6 +3,7 @@ "rules": { // TODOs "no-any-union": false, + "no-unnecessary-class": false, "no-unnecessary-generics": false } } diff --git a/types/load-json-file/index.d.ts b/types/load-json-file/index.d.ts index d52a24d8fe..ec554289a5 100644 --- a/types/load-json-file/index.d.ts +++ b/types/load-json-file/index.d.ts @@ -6,15 +6,11 @@ interface LoadJsonFile { /** * Returns a promise for the parsed JSON. - * - * @param filepath */ (filepath: string): Promise; /** * Returns the parsed JSON. - * - * @param filepath */ sync(filepath: string): any; } diff --git a/types/make-dir/index.d.ts b/types/make-dir/index.d.ts index 905343c883..a47b86dfac 100644 --- a/types/make-dir/index.d.ts +++ b/types/make-dir/index.d.ts @@ -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; @@ -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; diff --git a/types/merge2/index.d.ts b/types/merge2/index.d.ts index c9c6ddb606..e5f836658e 100644 --- a/types/merge2/index.d.ts +++ b/types/merge2/index.d.ts @@ -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 */ diff --git a/types/modesl/tslint.json b/types/modesl/tslint.json index 3db14f85ea..6a82dd0467 100644 --- a/types/modesl/tslint.json +++ b/types/modesl/tslint.json @@ -1 +1,7 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + // TODO + "no-unnecessary-class": false + } +} diff --git a/types/morgan/index.d.ts b/types/morgan/index.d.ts index e557bd46d9..097758465a 100644 --- a/types/morgan/index.d.ts +++ b/types/morgan/index.d.ts @@ -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; diff --git a/types/multer/index.d.ts b/types/multer/index.d.ts index 8682c57e3a..d6e73f9ddf 100644 --- a/types/multer/index.d.ts +++ b/types/multer/index.d.ts @@ -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?: { diff --git a/types/multimatch/index.d.ts b/types/multimatch/index.d.ts index 3eeecc3791..67af567cfa 100644 --- a/types/multimatch/index.d.ts +++ b/types/multimatch/index.d.ts @@ -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; diff --git a/types/nedb-logger/index.d.ts b/types/nedb-logger/index.d.ts index 58f0fa718c..9ac1d823f3 100644 --- a/types/nedb-logger/index.d.ts +++ b/types/nedb-logger/index.d.ts @@ -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(newDoc: T, cb?: (err: Error, document: T) => void): void; } diff --git a/types/node-horseman/index.d.ts b/types/node-horseman/index.d.ts index 46ca810233..760bcd9527 100644 --- a/types/node-horseman/index.d.ts +++ b/types/node-horseman/index.d.ts @@ -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) diff --git a/types/node-pg-migrate/tslint.json b/types/node-pg-migrate/tslint.json index 1061428d6e..11ffe86764 100644 --- a/types/node-pg-migrate/tslint.json +++ b/types/node-pg-migrate/tslint.json @@ -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 } } diff --git a/types/node-waves/index.d.ts b/types/node-waves/index.d.ts index b4f3f946ef..fd2cb4937c 100644 --- a/types/node-waves/index.d.ts +++ b/types/node-waves/index.d.ts @@ -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; diff --git a/types/node-wit/tslint.json b/types/node-wit/tslint.json index 3db14f85ea..d5ed3f0240 100644 --- a/types/node-wit/tslint.json +++ b/types/node-wit/tslint.json @@ -1 +1,7 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + // TODOs + "no-unnecessary-class": false + } +} diff --git a/types/node-xmpp-core/index.d.ts b/types/node-xmpp-core/index.d.ts index 20937aae98..79d742cfd0 100644 --- a/types/node-xmpp-core/index.d.ts +++ b/types/node-xmpp-core/index.d.ts @@ -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; diff --git a/types/nodemailer/lib/addressparser.d.ts b/types/nodemailer/lib/addressparser.d.ts index 4a6f2962cf..dbf5cda468 100644 --- a/types/nodemailer/lib/addressparser.d.ts +++ b/types/nodemailer/lib/addressparser.d.ts @@ -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; diff --git a/types/openpgp/tslint.json b/types/openpgp/tslint.json index c28368c002..ee0546a40f 100644 --- a/types/openpgp/tslint.json +++ b/types/openpgp/tslint.json @@ -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, diff --git a/types/p-settle/index.d.ts b/types/p-settle/index.d.ts index 26acaccfb1..7298ea055e 100644 --- a/types/p-settle/index.d.ts +++ b/types/p-settle/index.d.ts @@ -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(input: Iterable>): Promise>>; diff --git a/types/passport-oauth2/passport-oauth2-tests.ts b/types/passport-oauth2/passport-oauth2-tests.ts index 23f97c38ea..bfedf67dad 100644 --- a/types/passport-oauth2/passport-oauth2-tests.ts +++ b/types/passport-oauth2/passport-oauth2-tests.ts @@ -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'; diff --git a/types/pikaday-time/index.d.ts b/types/pikaday-time/index.d.ts index d1cd056b79..bc8b76a2ef 100644 --- a/types/pikaday-time/index.d.ts +++ b/types/pikaday-time/index.d.ts @@ -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; diff --git a/types/pikaday/index.d.ts b/types/pikaday/index.d.ts index 956356f265..9dc370054f 100644 --- a/types/pikaday/index.d.ts +++ b/types/pikaday/index.d.ts @@ -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; diff --git a/types/polylabel/index.d.ts b/types/polylabel/index.d.ts index b9a16ed265..f43724741a 100644 --- a/types/polylabel/index.d.ts +++ b/types/polylabel/index.d.ts @@ -6,10 +6,9 @@ /** * Polylabel returns the pole of inaccessibility coordinate in [x, y] format. * - * @param {Array} polygon - Given polygon coordinates in GeoJSON-like format - * @param {number} precision - Precision (1.0 by default) - * @param {boolean} debug - Debugging for Console - * @return {Array} + * @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); */ diff --git a/types/pouchdb-find/index.d.ts b/types/pouchdb-find/index.d.ts index d45b8c40bc..7e974b8921 100644 --- a/types/pouchdb-find/index.d.ts +++ b/types/pouchdb-find/index.d.ts @@ -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] diff --git a/types/prosemirror-inputrules/tslint.json b/types/prosemirror-inputrules/tslint.json index f93cf8562a..f0f7a6f17a 100644 --- a/types/prosemirror-inputrules/tslint.json +++ b/types/prosemirror-inputrules/tslint.json @@ -1,3 +1,7 @@ { - "extends": "dtslint/dt.json" + "extends": "dtslint/dt.json", + "rules": { + // TODO + "no-unnecessary-class": false + } } diff --git a/types/prosemirror-markdown/tslint.json b/types/prosemirror-markdown/tslint.json index 3db14f85ea..d5ed3f0240 100644 --- a/types/prosemirror-markdown/tslint.json +++ b/types/prosemirror-markdown/tslint.json @@ -1 +1,7 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + // TODOs + "no-unnecessary-class": false + } +} diff --git a/types/qr-image/index.d.ts b/types/qr-image/index.d.ts index 593adce02f..a84f9b10ce 100644 --- a/types/qr-image/index.d.ts +++ b/types/qr-image/index.d.ts @@ -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[][]; diff --git a/types/query-string/index.d.ts b/types/query-string/index.d.ts index f2145df75f..e7f51453eb 100644 --- a/types/query-string/index.d.ts +++ b/types/query-string/index.d.ts @@ -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; diff --git a/types/quill/tslint.json b/types/quill/tslint.json index b1439230db..b7d2f20244 100644 --- a/types/quill/tslint.json +++ b/types/quill/tslint.json @@ -1,7 +1,8 @@ { "extends": "dtslint/dt.json", "rules": { - // TODO - "no-any-union": false + // TODOs + "no-any-union": false, + "no-redundant-jsdoc": false } } diff --git a/types/relay-runtime/tslint.json b/types/relay-runtime/tslint.json index f93cf8562a..f0f7a6f17a 100644 --- a/types/relay-runtime/tslint.json +++ b/types/relay-runtime/tslint.json @@ -1,3 +1,7 @@ { - "extends": "dtslint/dt.json" + "extends": "dtslint/dt.json", + "rules": { + // TODO + "no-unnecessary-class": false + } } diff --git a/types/remove-markdown/index.d.ts b/types/remove-markdown/index.d.ts index 6268109366..57e1bdea8c 100644 --- a/types/remove-markdown/index.d.ts +++ b/types/remove-markdown/index.d.ts @@ -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 diff --git a/types/restify-plugins/index.d.ts b/types/restify-plugins/index.d.ts index fd9688c937..05a289c529 100644 --- a/types/restify-plugins/index.d.ts +++ b/types/restify-plugins/index.d.ts @@ -309,7 +309,7 @@ export function dateParser(delta?: number): RequestHandler; export function gzipResponse(options?: any): RequestHandler; export interface ServeStatic { - appendRequestPath?: boolean | undefined; + appendRequestPath?: boolean; directory?: string; maxAge?: number; match?: any; diff --git a/types/restling/index.d.ts b/types/restling/index.d.ts index 02a083078a..2a06d6c3aa 100644 --- a/types/restling/index.d.ts +++ b/types/restling/index.d.ts @@ -9,93 +9,93 @@ import { ServerResponse } from "http"; /** * Create a DELETE request. - * @param {string} url A url address. - * @param {RestlingOptions} options Options. - * @return {Promise} Result. + * @param url A url address. + * @param options Options. + * @return Result. */ export function del(url: string, options?: RestlingOptions): Promise; /** * Create a GET request. - * @param {string} url A url address. - * @param {RestlingOptions} options Options. - * @return {Promise} Result. + * @param url A url address. + * @param options Options. + * @return Result. */ export function get(url: string, options?: RestlingOptions): Promise; /** * Create a HEAD request. - * @param {string} url A url address. - * @param {RestlingOptions} options Options. - * @return {Promise} Result. + * @param url A url address. + * @param options Options. + * @return Result. */ export function head(url: string, options?: RestlingOptions): Promise; /** * Send json data via GET method. - * @param {string} url A url address. - * @param {any} data JSON body - * @param {RestlingOptions} options Options. - * @return {Promise} Result. + * @param url A url address. + * @param data JSON body + * @param options Options. + * @return Result. */ export function json(url: string, data?: any, options?: RestlingOptions, method?: string): Promise; /** * Create a PATCH request. - * @param {string} url A url address. - * @param {RestlingOptions} options Options. - * @return {Promise} Result. + * @param url A url address. + * @param options Options. + * @return Result. */ export function patch(url: string, options?: RestlingOptions): Promise; /** * Send json data via PATCH method. - * @param {string} url A url address. - * @param {any} data JSON body - * @param {RestlingOptions} options Options. - * @return {Promise} Result. + * @param url A url address. + * @param data JSON body + * @param options Options. + * @return Result. */ export function patchJson(url: string, data?: any, options?: RestlingOptions): Promise; /** * Create a POST request. - * @param {string} url A url address. - * @param {RestlingOptions} options Options. - * @return {Promise} Result. + * @param url A url address. + * @param options Options. + * @return Result. */ export function post(url: string, options?: RestlingOptions): Promise; /** * Send json data via POST method. - * @param {string} url A url address. - * @param {any} data JSON body - * @param {RestlingOptions} options Options. - * @return {Promise} Result. + * @param url A url address. + * @param data JSON body + * @param options Options. + * @return Result. */ export function postJson(url: string, data?: any, options?: RestlingOptions): Promise; /** * Create a PUT request. - * @param {string} url A url address. - * @param {RestlingOptions} options Options. - * @return {Promise} Result. + * @param url A url address. + * @param options Options. + * @return Result. */ export function put(url: string, options?: RestlingOptions): Promise; /** * Send json data via PUT method. - * @param {string} url A url address. - * @param {any} data JSON body - * @param {RestlingOptions} options Options. - * @return {Promise} Result. + * @param url A url address. + * @param data JSON body + * @param options Options. + * @return Result. */ export function putJson(url: string, data?: any, options?: RestlingOptions): Promise; /** * Create a request. - * @param {string} url A url address. - * @param {RestlingOptions} options Options. - * @return {Promise} Result. + * @param url A url address. + * @param options Options. + * @return Result. */ export function request(url: string, options?: RestlingOptions): Promise; @@ -107,7 +107,6 @@ export function allAsync(requests: { [key: string]: { url: string, options?: Res /** * Interface for the result. - * @interface */ export interface RestlingResult { data?: any; @@ -116,7 +115,6 @@ export interface RestlingResult { /** * Interface for the header. - * @interface */ export interface RestlerOptionsHeader { [headerName: string]: string; @@ -124,109 +122,91 @@ export interface RestlerOptionsHeader { /** * Interface for restler options. - * @interface */ export interface RestlingOptions { /** * OAuth Bearer Token. - * @type {string} */ accessToken?: string; /** * HTTP Agent instance to use. If not defined globalAgent will be used. If false opts out of connection pooling with an Agent, defaults request to Connection: close. - * @type {any} */ agent?: any; /** * A http.Client instance if you want to reuse or implement some kind of connection pooling. - * @type {any} */ client?: any; /** * Data to be added to the body of the request. - * @type {any} */ data?: any; /** * Encoding of the response body - * @type {string} */ decoding?: string; /** * Encoding of the request body. - * @type {string} */ encoding?: string; /** * If set will recursively follow redirects. - * @type {boolean} */ followRedirects?: boolean; /** * A hash of HTTP headers to be sent. - * @type {RestlerOptionsHeader} */ headers?: RestlerOptionsHeader; /** * Request method - * @type {string} */ method?: string; /** * If set the data passed will be formatted as multipart/form-encoded. - * @type {boolean} */ multipart?: boolean; /** * A function that will be called on the returned data. Use any of predefined restler.parsers. - * @type {any} */ parser?: any; /** * Basic auth password. - * @type {string} */ password?: string; /** * Query string variables as a javascript object, will override the querystring in the URL. - * @type {any} */ query?: any; /** * If true, the server certificate is verified against the list of supplied CAs. * An 'error' event is emitted if verification fails. Verification happens at the connection level, before the HTTP request is sent. - * @type {boolean} */ rejectUnauthorized?: boolean; /** * Emit the timeout event when the response does not return within the said value (in ms). - * @type {number} */ timeout?: number; /** * Basic auth username. - * @type {string} */ username?: string; /** * Options for xml2js. - * @type {any} */ xml2js?: any; } diff --git a/types/rfc2047/index.d.ts b/types/rfc2047/index.d.ts index 224ec8bbd0..a7b05e08fc 100644 --- a/types/rfc2047/index.d.ts +++ b/types/rfc2047/index.d.ts @@ -5,14 +5,14 @@ /** * Decode - * @param {string} encodedText Encoded Text - * @return {string} Decoded Text + * @param encodedText Encoded Text + * @return Decoded Text */ export function decode(encodedText: string): string; /** * Encode - * @param {string} decodedText Decoded Text - * @return {string} Encoded Text + * @param decodedText Decoded Text + * @return Encoded Text */ export function encode(decodedText: string): string; diff --git a/types/riot/index.d.ts b/types/riot/index.d.ts index 079132db72..2a7a22b596 100644 --- a/types/riot/index.d.ts +++ b/types/riot/index.d.ts @@ -66,8 +66,8 @@ export interface StyleManager { /** * Save a tag style to be later injected into DOM - * @param {string} css - css string - * @param {string} name - if it's passed the css will be mapped to a tagname + * @param css - css string + * @param name - if it's passed the css will be mapped to a tagname */ add(css: string, name?: string): void; @@ -109,7 +109,7 @@ export interface DOMUtil { /** * Check if a DOM node is an svg element * @param element - node to check - * @returns { boolean } True if element is an svg element + * @returns True if element is an svg element */ isSvg(element: Element): element is SVGElement; @@ -715,7 +715,7 @@ export function compile(callback: () => void): void; * Compiles the given tag but doesn't execute it, if `skipExecution` parameter is `true` * @param tag Tag definition * @param skipExecution If `true` tag is not executed after compilation - * @return {string} Compiled JavaScript as string + * @return Compiled JavaScript as string */ export function compile(tag: string, skipExecution?: boolean): string; diff --git a/types/safe-regex/index.d.ts b/types/safe-regex/index.d.ts index 582f8fa443..41aca4c6b3 100644 --- a/types/safe-regex/index.d.ts +++ b/types/safe-regex/index.d.ts @@ -4,4 +4,4 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped export = safe_regex; -declare function safe_regex(re: string | RegExp, opts?: { limit?: number | undefined }): boolean; +declare function safe_regex(re: string | RegExp, opts?: { limit?: number }): boolean; diff --git a/types/sap__xsenv/index.d.ts b/types/sap__xsenv/index.d.ts index 3858f77feb..6f1b895a33 100644 --- a/types/sap__xsenv/index.d.ts +++ b/types/sap__xsenv/index.d.ts @@ -21,7 +21,7 @@ export function cfServiceCredentials(filter: ServiceFilter): any; /** * Returns an array of Cloud Foundry services matching the given filter. * - * @param filter {(string|Object|function)} + * @param filter * - if string, returns the service with the same service instance name (name property) * - if Object, should have some of these properties [name, label, tag, plan] and returns all services * where all of the given properties match. Given tag matches if it is present in the tags array. @@ -35,12 +35,12 @@ export function filterCFServices(filter: ServiceFilter): any; * * If a service is not found in VCAP_SERVICES, returns default service configuration loaded from a JSON file. * - * @param query {object} describes requested Cloud Foundry services, each property value is a filter + * @param query describes requested Cloud Foundry services, each property value is a filter * as described in filterCFServices. - * @param servicesFile {string} path to JSON file to load default service configuration (default is default-services.json). + * @param servicesFile path to JSON file to load default service configuration (default is default-services.json). * If null, do not load default service configuration. * - * @returns {object} with the same properties as in query argument where the value of each + * @returns with the same properties as in query argument where the value of each * property is the respective service credentials object. * @throws Error, if for some of the requested services no or multiple instances are found; Error, if query parameter is not provided */ diff --git a/types/serialize-javascript/index.d.ts b/types/serialize-javascript/index.d.ts index deb4331961..b0331a3d03 100644 --- a/types/serialize-javascript/index.d.ts +++ b/types/serialize-javascript/index.d.ts @@ -9,7 +9,7 @@ declare namespace serializeJavascript { * This option is the same as the space argument that can be passed to JSON.stringify. * It can be used to add whitespace and indentation to the serialized output to make it more readable. */ - space?: string | number | undefined; + space?: string | number; /** * This option is a signal to serialize() that the object being serialized does not contain any function or regexps values. * This enables a hot-path that allows serialization to be over 3x faster. @@ -21,9 +21,9 @@ declare namespace serializeJavascript { /** * Serialize JavaScript to a superset of JSON that includes regular expressions and functions. - * @param {any} input data to serialize - * @param {serializeJavascript.SerializeJSOptions} options optional object - * @returns {string} serialized data + * @param input data to serialize + * @param options optional object + * @returns serialized data */ declare function serializeJavascript(input: any, options?: serializeJavascript.SerializeJSOptions): string; export = serializeJavascript; diff --git a/types/sha1/index.d.ts b/types/sha1/index.d.ts index 81b2202dc3..bb55d2f4fc 100644 --- a/types/sha1/index.d.ts +++ b/types/sha1/index.d.ts @@ -8,9 +8,9 @@ /** * js function for hashing messages with SHA1 * - * @param {(string | Buffer)} message - a string or buffer to hash - * @param {Sha1Options} options - an options object - * @returns {string} the resultant SHA1 hash of the given message + * @param message - a string or buffer to hash + * @param options - an options object + * @returns the resultant SHA1 hash of the given message */ declare function main(message: string | Buffer, options?: Sha1Options): string | Uint8Array; export = main; diff --git a/types/simple-oauth2/index.d.ts b/types/simple-oauth2/index.d.ts index 37add22766..499f39e56e 100644 --- a/types/simple-oauth2/index.d.ts +++ b/types/simple-oauth2/index.d.ts @@ -83,7 +83,7 @@ export interface OAuthClient { authorizationCode: { /** * Redirect the user to the autorization page - * @return {string} the absolute authorization url + * @return the absolute authorization url */ authorizeURL(params?: { /** A string that represents the registered application URI where the user is redirected after authentication */ diff --git a/types/sinon/index.d.ts b/types/sinon/index.d.ts index f8258efc95..9442289490 100644 --- a/types/sinon/index.d.ts +++ b/types/sinon/index.d.ts @@ -529,7 +529,7 @@ declare namespace Sinon { /** * Creates a new object with the given functions as the prototype and stubs all implemented functions. * - * @type TType Type being stubbed. + * @template TType Type being stubbed. * @param constructor Object or class to stub. * @returns A stubbed version of the constructor. * @remarks The given constructor function is not invoked. See also the stub API. @@ -543,7 +543,7 @@ declare namespace Sinon { /** * Stubbed type of an object with members replaced by stubs. * - * @type TType Type being stubbed. + * @template TType Type being stubbed. */ interface StubbableType { new(...args: any[]): TType; @@ -552,7 +552,7 @@ declare namespace Sinon { /** * An instance of a stubbed object type with members replaced by stubs. * - * @type TType Object type being stubbed. + * @template TType Object type being stubbed. */ type SinonStubbedInstance = { [P in keyof TType]: SinonStub; diff --git a/types/slocket/index.d.ts b/types/slocket/index.d.ts index a33ab9ffd8..c21fb10c23 100644 --- a/types/slocket/index.d.ts +++ b/types/slocket/index.d.ts @@ -19,9 +19,9 @@ interface Slocket { declare namespace slocket { interface Slocket extends EventEmitter { then( - onfulfilled?: ((value: Lock) => TResult1 | PromiseLike) | undefined | null, - onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise; + onfulfilled?: ((value: Lock) => TResult1 | PromiseLike) | null, + onrejected?: ((reason: any) => TResult2 | PromiseLike) | null): Promise; + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | null): Promise; } interface Lock { diff --git a/types/snazzy-info-window/index.d.ts b/types/snazzy-info-window/index.d.ts index e4f644ece0..bf0f527b28 100644 --- a/types/snazzy-info-window/index.d.ts +++ b/types/snazzy-info-window/index.d.ts @@ -304,7 +304,6 @@ declare class SnazzyInfoWindow extends google.maps.OverlayView { * Set the position of the info window. * A valid Google Map instance must be associated to the info window. * This could be either through the marker or map option. - * @param latLng */ setPosition(latLng: google.maps.LatLng | google.maps.LatLngLiteral): void; diff --git a/types/soundmanager2/index.d.ts b/types/soundmanager2/index.d.ts index d211e4c359..5f5e9a1ffb 100644 --- a/types/soundmanager2/index.d.ts +++ b/types/soundmanager2/index.d.ts @@ -60,7 +60,6 @@ declare namespace soundmanager { * soundmanager2_flash9.swf and debug versions etc.) Note that SM2 will * append the correct SWF file name, depending on flashVersion and * debugMode settings. - * @type {string} */ url?: string; @@ -110,8 +109,6 @@ declare namespace soundmanager { clearOnPosition(id: string, msecOffset: number, callback?: (() => void)): SMSound; /** * Creates a sound object, supporting an arbitrary number of optional arguments. Returns a SMSound object instance. At minimum, a url parameter is required. - * @param {SoundProperties} properties [description] - * @return {SMSound} [description] */ createSound(properties: SoundProperties): SMSound; destroySound(id: string): void; @@ -135,7 +132,7 @@ declare namespace soundmanager { setVolume(id: string, volume: number): SMSound; /** * Sets the volume of all sound objects. Accepted values: 0-100. Affects volume property. - * @param {number} volume [Volume of all sound objects. Accepted values: 0 - 100] + * @param volume Volume of all sound objects. Accepted values: 0 - 100 */ setVolume(volume: number): void; stop(id: string): SMSound; diff --git a/types/sshpk/tslint.json b/types/sshpk/tslint.json index 3db14f85ea..6a82dd0467 100644 --- a/types/sshpk/tslint.json +++ b/types/sshpk/tslint.json @@ -1 +1,7 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + // TODO + "no-unnecessary-class": false + } +} diff --git a/types/string-similarity/string-similarity-tests.ts b/types/string-similarity/string-similarity-tests.ts index 216c1dedf2..1e5003522c 100644 --- a/types/string-similarity/string-similarity-tests.ts +++ b/types/string-similarity/string-similarity-tests.ts @@ -9,16 +9,11 @@ const match: stringSimilarity.BestMatch = stringSimilarity.findBestMatch('Olive- ]); // ratings accessible -for (const rating of match.ratings){ - isString(rating.target); - isNumber(rating.rating); +for (const rating of match.ratings) { + rating.target; // $ExpectType string + rating.rating; // $ExpectType number } // bestMatch accessible match.bestMatch.rating; match.bestMatch.target; - -function isString(x: string): void { -} -function isNumber(x: number): void { -} diff --git a/types/strong-cluster-control/index.d.ts b/types/strong-cluster-control/index.d.ts index e0b3fb5c12..d0d577236c 100644 --- a/types/strong-cluster-control/index.d.ts +++ b/types/strong-cluster-control/index.d.ts @@ -53,7 +53,6 @@ declare namespace StrongClusterControl { /** * @description Stop the controller, after stopping workers (if the size is being controlled, see setSize()). - * @param callback */ stop(callback?: () => any): this; diff --git a/types/sumo-logger/index.d.ts b/types/sumo-logger/index.d.ts index 9ada2e9051..bc89e0eaa8 100644 --- a/types/sumo-logger/index.d.ts +++ b/types/sumo-logger/index.d.ts @@ -118,7 +118,8 @@ declare class SumoLogger { */ log(event: Partial & T): void; - /** Force any pending logs to be sent immediately. This is mainly for use in a + /** + * Force any pending logs to be sent immediately. This is mainly for use in a * logOut/`window.onBeforeUnload` flow to ensure that any remaining queued * messages are sent to Sumo Logic. */ diff --git a/types/swagger-sails-hook/index.d.ts b/types/swagger-sails-hook/index.d.ts index 203dc5d62f..6376d6d94b 100644 --- a/types/swagger-sails-hook/index.d.ts +++ b/types/swagger-sails-hook/index.d.ts @@ -14,7 +14,7 @@ export = SwaggerHook; /** * Create a new `swagger-sails-hook` sails hook and register it with `sails` - * @param {any} sails - reference to the running sails instance + * @param sails - reference to the running sails instance * @returns SailsHook - `swagger-sails-hook` object implementing the Sails' hook specification. */ declare function SwaggerHook(sails: any): SwaggerHook.SailsHook; @@ -30,7 +30,7 @@ declare namespace SwaggerHook { /** * Perform startup tasks. * All Sails configuration is guaranteed to be completed before a hook’s initialize function runs. - * @param {Function} done - called when `swagger-sails-hook`'s startup tasks have finished. + * @param done - called when `swagger-sails-hook`'s startup tasks have finished. */ initialize(done: () => any): void; diff --git a/types/tabris-plugin-firebase/index.d.ts b/types/tabris-plugin-firebase/index.d.ts index 3a9e7b350f..0ade0c9dcf 100644 --- a/types/tabris-plugin-firebase/index.d.ts +++ b/types/tabris-plugin-firebase/index.d.ts @@ -68,7 +68,6 @@ declare class NativeObject { /** * Gets the current value of the given *property*. - * @param property */ get(property: string): any; @@ -116,14 +115,11 @@ declare class NativeObject { /** * Sets the given property. - * @param property - * @param value */ set(property: string, value: any): this; /** * Sets all key-value pairs in the properties object as widget properties. - * @param properties */ set(properties: object): this; @@ -137,9 +133,8 @@ declare class NativeObject { /** * An application-wide unique identifier automatically assigned to all native objects on creation. - * @static */ - readonly cid: string; + static readonly cid: string; } interface PropertyChangedEvent { diff --git a/types/thrift/thrift-tests.ts b/types/thrift/thrift-tests.ts index da9e9eafa0..c829b8e41c 100644 --- a/types/thrift/thrift-tests.ts +++ b/types/thrift/thrift-tests.ts @@ -23,11 +23,9 @@ interface MockServiceHandlers { } class MockProcessor { - constructor() {} } class MockClient { - constructor() {} } const mockServiceHandlers: MockServiceHandlers = { diff --git a/types/tinymce/tslint.json b/types/tinymce/tslint.json index a42975357d..4df63472dd 100644 --- a/types/tinymce/tslint.json +++ b/types/tinymce/tslint.json @@ -3,6 +3,7 @@ "rules": { // TODOs "no-empty-interface": false, + "no-unnecessary-class": false, "no-unnecessary-generics": false } } diff --git a/types/tocktimer/index.d.ts b/types/tocktimer/index.d.ts index 20bd344c83..a48929f169 100644 --- a/types/tocktimer/index.d.ts +++ b/types/tocktimer/index.d.ts @@ -31,13 +31,12 @@ declare namespace t { class Tock { /** * Create a Tock instance - * @param opts */ constructor(opts?: TockOptions) /** * Start the timer - * @param [time] {Number} Optional. Can be either a countdown value or a starting value. + * @param time Can be either a countdown value or a starting value. * If a countdown timer then set time to count down from. * If a starting value then set time to the desired start time to count up from. */ @@ -65,14 +64,11 @@ declare namespace t { /** * Convert number of milliseconds to a MM:SS time string. Won't handle times greater than 1 hour - * @param ms */ msToTime: (ms: number) => string; /** * Convert number of milliseconds to timecode string - * @param ms - * @param showMs */ msToTimecode: (ms: number, showMs?: boolean) => string; @@ -80,7 +76,6 @@ declare namespace t { * Convert a time string to a number of milliseconds. Should be a duration as a string of form MM:SS, MM:SS:ms, MM:SS.ms, HH:MM:SS * Alternatively a time in the future can be provided using the form yyyy-mm-dd HH:MM:SS.ms. The difference between this time and present will be returned. * If the input cannot be recognized as one of the above then 0 is returned - * @param ms */ timeToMS: (time: string) => number; } diff --git a/types/undertaker-registry/index.d.ts b/types/undertaker-registry/index.d.ts index 02bff9fab3..34b56b4113 100644 --- a/types/undertaker-registry/index.d.ts +++ b/types/undertaker-registry/index.d.ts @@ -8,7 +8,7 @@ declare class UndertakerRegistry { * Returns the task with that name or undefined if no task is registered with that name. * Useful for custom task storage. * Custom registries can override this method when inheriting from this default registry. - * @param taskName {string} - Name of task. + * @param taskName - Name of task. */ get(taskName: string): TTaskFunction; @@ -16,7 +16,7 @@ declare class UndertakerRegistry { * No-op method that receives the undertaker instance. * Useful to set pre-defined tasks using the undertaker.task(taskName, fn) method. * Custom registries can override this method when inheriting from this default registry. - * @param taker {any} - Instance of undertaker. + * @param taker - Instance of undertaker. */ init(taker: any): void; @@ -25,8 +25,8 @@ declare class UndertakerRegistry { * If set modifies a task, it should return the new task so Undertaker can properly maintain metadata for the task. * Useful for adding custom behavior to every task as it is registered in the system. * Custom registries can override this method when inheriting from this default registry. - * @param taskName {string} - Name of task. - * @param fn {UndertakerRegistry.TaskFunction} - Task function. + * @param taskName - Name of task. + * @param fn - Task function. */ set(taskName: string, fn: TTaskFunction): TTaskFunction; diff --git a/types/universal-router/index.d.ts b/types/universal-router/index.d.ts index b17256ce77..47a7384872 100644 --- a/types/universal-router/index.d.ts +++ b/types/universal-router/index.d.ts @@ -60,9 +60,9 @@ export type Routes = Array>; * @template R Result that every action function resolves to. If the action * returns a Promise, R can be the type the Promise resolves to. * - * @param {Routes | Route} routes - Single route or array of routes. - * @param {string | String | Context & C} pathOrContext - path to resolve or + * @param routes - Single route or array of routes. + * @param pathOrContext - path to resolve or * context object that contains the path along with other data. - * @return {Promise} - Result of matched action function wrapped in a Promsie. + * @return - Result of matched action function wrapped in a Promsie. */ export function resolve(routes: Routes | Route, pathOrContext: string | String | Context & C): Promise; diff --git a/types/vast-client/index.d.ts b/types/vast-client/index.d.ts index 680e1e2dd8..4ab079a431 100644 --- a/types/vast-client/index.d.ts +++ b/types/vast-client/index.d.ts @@ -200,7 +200,7 @@ export interface VastRequestOptions { * A VAST XML document. When response is provided, no Ajax request is made and thus the url parameter is ignored. */ response?: string; - /**a + /** * A URL handler module, used to fetch the VAST document instead of the default ones. */ urlhandler?: any; diff --git a/types/viewerjs/index.d.ts b/types/viewerjs/index.d.ts index 28c26c911e..20a0806633 100644 --- a/types/viewerjs/index.d.ts +++ b/types/viewerjs/index.d.ts @@ -212,7 +212,6 @@ declare namespace Viewer { /** * Change the global default options. - * @param options */ function setDefaults(options: ViewerOption): void; @@ -222,7 +221,8 @@ declare namespace Viewer { function noConflict(): void; } -/** * JavaScript image viewer. +/** + * JavaScript image viewer. * @see {@link https://github.com/fengyuanchen/viewerjs} */ declare class Viewer { @@ -292,7 +292,6 @@ declare class Viewer { /** * Rotate the image to an absolute degree. - * @param degree */ rotateTo(degree: number): void; @@ -365,7 +364,8 @@ declare class Viewer { destroy(): void; } -/** JavaScript image viewer. +/** + * JavaScript image viewer. * @see {@link https://github.com/fengyuanchen/viewerjs} */ export = Viewer; diff --git a/types/vinyl-fs/index.d.ts b/types/vinyl-fs/index.d.ts index 4e0ac3317b..d3b13baeaa 100644 --- a/types/vinyl-fs/index.d.ts +++ b/types/vinyl-fs/index.d.ts @@ -108,12 +108,14 @@ export interface SrcOptions extends globStream.Options { } export interface DestOptions { - /** Specify the working directory the folder is relative to + /** + * Specify the working directory the folder is relative to * Default is process.cwd() */ cwd?: string; - /** Specify the mode the files should be created with + /** + * Specify the mode the files should be created with * Default is the mode of the input file (file.stat.mode) * or the process mode if the input file has no mode property */ @@ -125,12 +127,14 @@ export interface DestOptions { /** Specify if existing files with the same path should be overwritten or not. Default is true, to always overwrite existing files */ overwrite?: boolean; - /** Enables sourcemap support on files passed through the stream. Will write inline soucemaps if + /** + * Enables sourcemap support on files passed through the stream. Will write inline soucemaps if * specified as true. Specifying a string path will write external sourcemaps at the given path. */ sourcemaps?: true | string; - /** When creating a symlink, whether or not the created symlink should be relative. If false, + /** + * When creating a symlink, whether or not the created symlink should be relative. If false, * the symlink will be absolute. Note: This option will be ignored if a junction is being created. */ relativeSymlinks?: boolean; diff --git a/types/webassembly-js-api/tslint.json b/types/webassembly-js-api/tslint.json index 65c83fb1e3..d8590b6513 100644 --- a/types/webassembly-js-api/tslint.json +++ b/types/webassembly-js-api/tslint.json @@ -1,6 +1,8 @@ { "extends": "dtslint/dt.json", "rules": { - "dt-header": false + // TODOs + "dt-header": false, + "no-unnecessary-class": false } } diff --git a/types/webdriverio/tslint.json b/types/webdriverio/tslint.json index 1881fbd79d..5ab241cb96 100644 --- a/types/webdriverio/tslint.json +++ b/types/webdriverio/tslint.json @@ -6,6 +6,7 @@ "no-declare-current-package": false, "no-single-declare-module": false, "unified-signatures": false, + "no-unnecessary-class": false, "no-unnecessary-generics": false } }