diff --git a/types/bagpipes/index.d.ts b/types/bagpipes/index.d.ts index 82a1fa32f4..ec1d0cceb7 100755 --- a/types/bagpipes/index.d.ts +++ b/types/bagpipes/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Michael Mrowetz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -interface FittingContext { +export interface FittingContext { /** The input defined in the fitting definition * (string, number, object, array) */ @@ -17,9 +17,9 @@ interface FittingContext { * Fitting types has pre-defined fittings `system` and `user` * but can be any any string for custom types like `swagger` or `node-machine` */ -type FittingType = "system" | "user" | string; +export type FittingType = "system" | "user" | string; -interface FittingDef { +export interface FittingDef { /** * If type is omitted (as it must be for in-line usage), Bagpipes will * first check the user fittings then the system fittings for the name and @@ -46,8 +46,8 @@ interface FittingDef { * * Will be called called when the `Pipe` it is contained it gets 'played' */ -type Fitting = ( - context: FittingContext, +export type Fitting = ( + context: FittingContext, next: {(err: Error | null | undefined, res?: any): void}) => void; /** @@ -58,18 +58,18 @@ type Fitting = ( * * @param {Object} fittingDef Fitting Definition */ -type FittingFactory = (fittingDef: FittingDef, bagpipes: any) => Fitting; +export type FittingFactory = (fittingDef: FittingDef, bagpipes: any) => Fitting; /** * Hashmap of `fittingType`s (the name of a fitting) and the * `FittingFactory` functions used to create them */ -interface FittingTypesMap { +export interface FittingTypesMap { [fittingType: string]: FittingFactory; } /** The Pipe Definition */ -type PipeDef = any[] | string | FittingDef; +export type PipeDef = any[] | string | FittingDef; /** Hashmap of Pipe Definitons */ export interface PipeDefMap { @@ -143,10 +143,10 @@ export function create(pipesDefs: PipeDefMap, conf?: Config): Bagpipes; // Types for imports from `pipeworks` module -type Affinity = "hoist" | "sink"; +export type Affinity = "hoist" | "sink"; /** PipeDef used in `pipeworks` module */ -interface PipeworksOptions { +export interface PipeworksOptions { /** * Adds to the pre and post queues, respectively. * Ensures a pipe gets fitted before or after the main execution pipeline. diff --git a/types/bagpipes/tslint.json b/types/bagpipes/tslint.json index 3db14f85ea..a4bcc87748 100755 --- a/types/bagpipes/tslint.json +++ b/types/bagpipes/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "callable-types": false + } +} diff --git a/types/bonjour/index.d.ts b/types/bonjour/index.d.ts index bba5debb3c..0c2578121e 100644 --- a/types/bonjour/index.d.ts +++ b/types/bonjour/index.d.ts @@ -2,7 +2,8 @@ // Project: https://github.com/watson/bonjour // Definitions by: Quentin Lampin , Nicolas Voigt // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// + +/// declare function bonjour(opts?: bonjour.BonjourOptions): bonjour.Bonjour; export = bonjour; diff --git a/types/chai-arrays/index.d.ts b/types/chai-arrays/index.d.ts index d387d1614d..d50be4f101 100644 --- a/types/chai-arrays/index.d.ts +++ b/types/chai-arrays/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Clément Prévot // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare global { namespace Chai { diff --git a/types/debessmann/debessmann-tests.ts b/types/debessmann/debessmann-tests.ts index 3e44ff8cd6..802257992e 100644 --- a/types/debessmann/debessmann-tests.ts +++ b/types/debessmann/debessmann-tests.ts @@ -1,7 +1,7 @@ import {DM, Event, EventId} from 'debessmann'; let eventId: EventId = {seq: 0, time: new Date()}; -let e: Event = {_id: eventId, headers: {'header1': 'header1Val'}}; +let e: Event = {_id: eventId, headers: {header1: 'header1Val'}}; let dm: DM = { init(endpoint: string, auth: string): void { diff --git a/types/electron-config/electron-config-tests.ts b/types/electron-config/electron-config-tests.ts index bf1ad2087b..a5ac9e9ec3 100644 --- a/types/electron-config/electron-config-tests.ts +++ b/types/electron-config/electron-config-tests.ts @@ -13,7 +13,7 @@ const electronConfig = new ElectronConfig(); electronConfig.set('foo', 'bar'); electronConfig.set({ foo: 'bar', - 'foo2': 'bar2', + foo2: 'bar2', }); electronConfig.delete('foo'); electronConfig.get('foo'); diff --git a/types/electron-config/tslint.json b/types/electron-config/tslint.json index 3db14f85ea..e830836d23 100644 --- a/types/electron-config/tslint.json +++ b/types/electron-config/tslint.json @@ -1 +1,7 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json" , + "rules": { + "no-namespace":false, + "object-literal-key-quotes": false + } +} diff --git a/types/fabric/fabric-tests.ts b/types/fabric/fabric-tests.ts index 770467590c..9966e081d8 100644 --- a/types/fabric/fabric-tests.ts +++ b/types/fabric/fabric-tests.ts @@ -259,18 +259,16 @@ function sample4() { }); } -namespace myfabric { - export interface CircleWithLineInfos extends fabric.Circle { +interface CircleWithLineInfos extends fabric.Circle { line1?: fabric.Line; line2?: fabric.Line; line3?: fabric.Line; line4?: fabric.Line; - } } function sample5() { const makeCircle = (left: number, top: number, line1?: fabric.Line, line2?: fabric.Line, line3?: fabric.Line, line4?: fabric.Line): fabric.Circle => { - const c = new fabric.Circle({ + const c = new fabric.Circle({ left, top, strokeWidth: 5, @@ -317,11 +315,11 @@ function sample5() { ); canvas.on('object:moving', e => { - const p = e.target; - p.line1 && p.line1.set({ 'x2': p.left, 'y2': p.top }); - p.line2 && p.line2.set({ 'x1': p.left, 'y1': p.top }); - p.line3 && p.line3.set({ 'x1': p.left, 'y1': p.top }); - p.line4 && p.line4.set({ 'x1': p.left, 'y1': p.top }); + const p = e.target; + p.line1 && p.line1.set({ x2: p.left, y2: p.top }); + p.line2 && p.line2.set({ x1: p.left, y1: p.top }); + p.line3 && p.line3.set({ x1: p.left, y1: p.top }); + p.line4 && p.line4.set({ x1: p.left, y1: p.top }); canvas.renderAll(); }); } @@ -351,10 +349,8 @@ function sample6() { }); } -namespace myfabric { - export interface ImageWithInfo extends fabric.Image { +interface ImageWithInfo extends fabric.Image { movingLeft: boolean; - } } function sample7() { @@ -362,7 +358,7 @@ function sample7() { setInterval(() => { fabric.Image.fromURL('../assets/ladybug.png', obj => { - const img = obj; + const img = obj; img.set('left', fabric.util.getRandomInt(200, 600)).set('top', -50); img.movingLeft = !!Math.round(Math.random()); canvas.add(img); @@ -371,7 +367,7 @@ function sample7() { const animate = (function animate() { canvas.forEachObject(obj => { - const img = obj; + const img = obj; img.left += (img.movingLeft ? -1 : 1); img.top += 1; if (img.left > 900 || img.top > 500) { diff --git a/types/google-protobuf/index.d.ts b/types/google-protobuf/index.d.ts index 5ff6b6259d..bb1d2fb3a5 100644 --- a/types/google-protobuf/index.d.ts +++ b/types/google-protobuf/index.d.ts @@ -70,12 +70,12 @@ export abstract class Message { static computeOneofCase(msg: Message, oneof: number[]): number; static getWrapperField( msg: Message, - ctor: {new() : T}, + ctor: { new(): T }, fieldNumber: number, required?: number): T; static getRepeatedWrapperField( msg: Message, - ctor: {new() : T}, + ctor: { new(): T }, fieldNumber: number): T[]; static setWrapperField( msg: Message, @@ -94,7 +94,7 @@ export abstract class Message { msg: Message, fieldNumber: number, value: T | undefined, - ctor: {new() : T}, + ctor: { new(): T }, index?: number): T; static toMap( field: any[], diff --git a/types/jquery.growl/index.d.ts b/types/jquery.growl/index.d.ts index 2a847b8ef7..7b52ee311b 100644 --- a/types/jquery.growl/index.d.ts +++ b/types/jquery.growl/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Amir.h Yeganemehr // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare namespace growl { interface Options { diff --git a/types/js-search/tslint.json b/types/js-search/tslint.json deleted file mode 100644 index 3db14f85ea..0000000000 --- a/types/js-search/tslint.json +++ /dev/null @@ -1 +0,0 @@ -{ "extends": "dtslint/dt.json" } diff --git a/types/leaflet/index.d.ts b/types/leaflet/index.d.ts index fd89874f54..135fa8b93f 100644 --- a/types/leaflet/index.d.ts +++ b/types/leaflet/index.d.ts @@ -1377,7 +1377,6 @@ declare namespace L { containerPointToLayerPoint(point: PointExpression): Point; containerPointToLatLng(point: PointExpression): LatLng; layerPointToContainerPoint(point: PointExpression): Point; - containerPointToLatLng(point: PointExpression): LatLng; latLngToContainerPoint(latlng: LatLngExpression): Point; mouseEventToContainerPoint(ev: MouseEvent): Point; mouseEventToLayerPoint(ev: MouseEvent): Point; diff --git a/types/memcached/index.d.ts b/types/memcached/index.d.ts index 3c46efe396..b6574a0dd4 100644 --- a/types/memcached/index.d.ts +++ b/types/memcached/index.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.1 -/// +/// import events = require("events"); export = Memcached; diff --git a/types/pixi.js/tslint.json b/types/pixi.js/tslint.json index 3d52e5ceec..6f863f926f 100644 --- a/types/pixi.js/tslint.json +++ b/types/pixi.js/tslint.json @@ -9,6 +9,7 @@ "class-name": true, "indent": [true, "spaces"], - "quotemark": [true, "double"] + "quotemark": [true, "double"], + "comment-format": false } } diff --git a/types/sharp/index.d.ts b/types/sharp/index.d.ts index 0776b80b81..36b9af1ef7 100644 --- a/types/sharp/index.d.ts +++ b/types/sharp/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: François Nguyen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// import { Duplex } from "stream"; diff --git a/types/shelljs/index.d.ts b/types/shelljs/index.d.ts index c8a7dbaec6..3586ca06d7 100644 --- a/types/shelljs/index.d.ts +++ b/types/shelljs/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Niklas Mollenhauer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// import child = require("child_process");