mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Fix lint failures (#16904)
This commit is contained in:
parent
4daa34112b
commit
2266dcb934
20
types/bagpipes/index.d.ts
vendored
20
types/bagpipes/index.d.ts
vendored
@ -3,7 +3,7 @@
|
||||
// Definitions by: Michael Mrowetz <https://github.com/micmro>
|
||||
// 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.
|
||||
|
||||
@ -1 +1,6 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
"callable-types": false
|
||||
}
|
||||
}
|
||||
|
||||
3
types/bonjour/index.d.ts
vendored
3
types/bonjour/index.d.ts
vendored
@ -2,7 +2,8 @@
|
||||
// Project: https://github.com/watson/bonjour
|
||||
// Definitions by: Quentin Lampin <https://github.com/quentin-ol/>, Nicolas Voigt <https://github.com/octo-sniffle>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
///<reference types="node" />
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
declare function bonjour(opts?: bonjour.BonjourOptions): bonjour.Bonjour;
|
||||
export = bonjour;
|
||||
|
||||
2
types/chai-arrays/index.d.ts
vendored
2
types/chai-arrays/index.d.ts
vendored
@ -3,7 +3,7 @@
|
||||
// Definitions by: Clément Prévot <https://github.com/clementprevot/>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
///<reference types="chai" />
|
||||
/// <reference types="chai" />
|
||||
|
||||
declare global {
|
||||
namespace Chai {
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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');
|
||||
|
||||
@ -1 +1,7 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
{
|
||||
"extends": "dtslint/dt.json" ,
|
||||
"rules": {
|
||||
"no-namespace":false,
|
||||
"object-literal-key-quotes": false
|
||||
}
|
||||
}
|
||||
|
||||
@ -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 = <myfabric.CircleWithLineInfos> new fabric.Circle({
|
||||
const c = <CircleWithLineInfos> new fabric.Circle({
|
||||
left,
|
||||
top,
|
||||
strokeWidth: 5,
|
||||
@ -317,11 +315,11 @@ function sample5() {
|
||||
);
|
||||
|
||||
canvas.on('object:moving', e => {
|
||||
const p = <myfabric.CircleWithLineInfos> 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 = <CircleWithLineInfos> 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 = <myfabric.ImageWithInfo> obj;
|
||||
const img = <ImageWithInfo> 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 = <myfabric.ImageWithInfo> obj;
|
||||
const img = <ImageWithInfo> obj;
|
||||
img.left += (img.movingLeft ? -1 : 1);
|
||||
img.top += 1;
|
||||
if (img.left > 900 || img.top > 500) {
|
||||
|
||||
6
types/google-protobuf/index.d.ts
vendored
6
types/google-protobuf/index.d.ts
vendored
@ -70,12 +70,12 @@ export abstract class Message {
|
||||
static computeOneofCase(msg: Message, oneof: number[]): number;
|
||||
static getWrapperField<T extends Message>(
|
||||
msg: Message,
|
||||
ctor: {new() : T},
|
||||
ctor: { new(): T },
|
||||
fieldNumber: number,
|
||||
required?: number): T;
|
||||
static getRepeatedWrapperField<T extends Message>(
|
||||
msg: Message,
|
||||
ctor: {new() : T},
|
||||
ctor: { new(): T },
|
||||
fieldNumber: number): T[];
|
||||
static setWrapperField<T extends Message>(
|
||||
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[],
|
||||
|
||||
2
types/jquery.growl/index.d.ts
vendored
2
types/jquery.growl/index.d.ts
vendored
@ -3,7 +3,7 @@
|
||||
// Definitions by: Amir.h Yeganemehr <https://github.com/yeganemehr>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
///<reference types="jquery" />
|
||||
/// <reference types="jquery" />
|
||||
|
||||
declare namespace growl {
|
||||
interface Options {
|
||||
|
||||
@ -1 +0,0 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
1
types/leaflet/index.d.ts
vendored
1
types/leaflet/index.d.ts
vendored
@ -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;
|
||||
|
||||
2
types/memcached/index.d.ts
vendored
2
types/memcached/index.d.ts
vendored
@ -4,7 +4,7 @@
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.1
|
||||
|
||||
///<reference types="node" />
|
||||
/// <reference types="node" />
|
||||
|
||||
import events = require("events");
|
||||
export = Memcached;
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
|
||||
"class-name": true,
|
||||
"indent": [true, "spaces"],
|
||||
"quotemark": [true, "double"]
|
||||
"quotemark": [true, "double"],
|
||||
"comment-format": false
|
||||
}
|
||||
}
|
||||
|
||||
2
types/sharp/index.d.ts
vendored
2
types/sharp/index.d.ts
vendored
@ -3,7 +3,7 @@
|
||||
// Definitions by: François Nguyen <https://github.com/lith-light-g>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
///<reference types="node" />
|
||||
/// <reference types="node" />
|
||||
|
||||
import { Duplex } from "stream";
|
||||
|
||||
|
||||
2
types/shelljs/index.d.ts
vendored
2
types/shelljs/index.d.ts
vendored
@ -3,7 +3,7 @@
|
||||
// Definitions by: Niklas Mollenhauer <https://github.com/nikeee>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
///<reference types="node"/>
|
||||
/// <reference types="node"/>
|
||||
|
||||
import child = require("child_process");
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user