tslint changes

This commit is contained in:
Jeremy Simpson
2019-08-30 01:52:40 -07:00
parent 7603879d35
commit 7f7efbb94b
446 changed files with 70650 additions and 70661 deletions
+9 -9
View File
@@ -1,22 +1,22 @@
interface HTMLCanvasElement {
toBuffer(callback: (err: any, buffer: Buffer) => void): void;
toBuffer(): Buffer;
toBuffer(callback: (err: any, buffer: Buffer) => void): void;
toBuffer(): Buffer;
}
interface NodeCanvasImage extends HTMLImageElement {
src: any;
src: any;
}
interface NodeCanvas extends HTMLCanvasElement {
new(width?: number, height?: number): NodeCanvas;
new(width?: number, height?: number): NodeCanvas;
}
interface NodeStaticImage {
new(width?: number, height?: number): NodeCanvasImage;
new(width?: number, height?: number): NodeCanvasImage;
}
declare module "canvas" {
export function createCanvas(width: number, height: number): HTMLCanvasElement;
export type Canvas = HTMLCanvasElement;
export const Image: NodeStaticImage;
declare module 'canvas' {
export function createCanvas(width: number, height: number): HTMLCanvasElement;
export type Canvas = HTMLCanvasElement;
export const Image: NodeStaticImage;
}
+15 -15
View File
@@ -1,21 +1,21 @@
interface HTMLCanvasElement {
getContext(contextId: "webgl2", contextAttributes?: WebGLContextAttributes): WebGLRenderingContext | null;
getContext(contextId: 'webgl2', contextAttributes?: WebGLContextAttributes): WebGLRenderingContext | null;
}
interface WebGLRenderingContext {
readonly MAX_ELEMENT_INDEX: number;
readonly MAX_ELEMENT_INDEX: number;
}
interface Window {
readonly Notification: any;
readonly Notification: any;
}
interface NodeModule {
hot?: { accept(): void; };
hot?: { accept(): void; };
}
interface Promise<T> {
finally(handler: () => any): Promise<T>;
finally(handler: () => any): Promise<T>;
}
declare const requestIdleCallback: (callback: () => void) => number;
@@ -46,21 +46,21 @@ declare module 'passport-steam' { export const Strategy: any; }
declare module 'passport-patreon' { export const Strategy: any; }
declare module 'timsort' {
export function sort<T>(array: T[], compare: (a: T, b: T) => number): void;
export function sort<T>(array: T[], compare: (a: T, b: T) => number): void;
}
declare module 'color-convert' {
export const hex: {
lab(color: string): [number, number, number];
};
export const hex: {
lab(color: string): [number, number, number];
};
}
declare module 'delta-e' {
export interface LAB {
L: number;
A: number;
B: number;
}
export interface LAB {
L: number;
A: number;
B: number;
}
export function getDeltaE00(a: LAB, b: LAB): number;
export function getDeltaE00(a: LAB, b: LAB): number;
}
+20 -20
View File
@@ -1,22 +1,22 @@
declare module "fs" {
import * as Promise from "bluebird";
declare module 'fs' {
import * as Promise from "bluebird";
export function writeFileAsync(filename: string, data: any): Promise<void>;
export function writeFileAsync(filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string; } | string): Promise<void>;
export function writeFileAsync(filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string; } | string): Promise<void>;
export function appendFileAsync(filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string; } | string): Promise<void>;
export function appendFileAsync(filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string; } | string): Promise<void>;
export function appendFileAsync(filename: string, data: any): Promise<void>;
export function readFileAsync(filename: string, encoding: string): Promise<string>;
export function readFileAsync(filename: string, options: { encoding: string; flag?: string; }): Promise<string>;
export function readFileAsync(filename: string, options: { flag?: string; }): Promise<Buffer>;
export function readFileAsync(filename: string): Promise<Buffer>;
export function readdirAsync(path: string): Promise<string[]>;
export function unlinkAsync(path: string): Promise<void>;
export function mkdirAsync(path: string): Promise<void>;
export function mkdirAsync(path: string, mode: number): Promise<void>;
export function mkdirAsync(path: string, mode: string): Promise<void>;
export function renameAsync(oldPath: string, newPath: string): Promise<void>;
export function statAsync(path: string): Promise<Stats>;
export function rmdirAsync(path: string): Promise<void>;
export function writeFileAsync(filename: string, data: any): Promise<void>;
export function writeFileAsync(filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string; } | string): Promise<void>;
export function writeFileAsync(filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string; } | string): Promise<void>;
export function appendFileAsync(filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string; } | string): Promise<void>;
export function appendFileAsync(filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string; } | string): Promise<void>;
export function appendFileAsync(filename: string, data: any): Promise<void>;
export function readFileAsync(filename: string, encoding: string): Promise<string>;
export function readFileAsync(filename: string, options: { encoding: string; flag?: string; }): Promise<string>;
export function readFileAsync(filename: string, options: { flag?: string; }): Promise<Buffer>;
export function readFileAsync(filename: string): Promise<Buffer>;
export function readdirAsync(path: string): Promise<string[]>;
export function unlinkAsync(path: string): Promise<void>;
export function mkdirAsync(path: string): Promise<void>;
export function mkdirAsync(path: string, mode: number): Promise<void>;
export function mkdirAsync(path: string, mode: string): Promise<void>;
export function renameAsync(oldPath: string, newPath: string): Promise<void>;
export function statAsync(path: string): Promise<Stats>;
export function rmdirAsync(path: string): Promise<void>;
}
+59 -55
View File
@@ -1,62 +1,66 @@
declare module 'patreon' {
export interface PatronDataRelation {
data: {
id: string;
type: string;
};
links: {
related: string;
};
}
export interface PatronDataEntry {
attributes: {
title?: string;
description?: string;
amount_cents?: number;
created_at?: string;
declined_since?: string | null;
patron_pays_fees?: boolean;
pledge_cap_cents?: number;
total_historical_amount_cents?: number;
};
id: string;
relationships: {
patron: PatronDataRelation;
reward: PatronDataRelation;
};
type: string;
}
export interface PatronDataRelation {
data: {
id: string;
type: string;
};
links: {
related: string;
};
}
export interface PatronData {
rawJson: {
data: PatronDataEntry[];
included: PatronDataEntry[];
links: {
next?: string;
};
};
}
export interface PatronDataEntry {
attributes: {
title?: string;
description?: string;
amount_cents?: number;
created_at?: string;
declined_since?: string | null;
patron_pays_fees?: boolean;
pledge_cap_cents?: number;
total_historical_amount_cents?: number;
};
id: string;
relationships: {
patron: PatronDataRelation;
reward: PatronDataRelation;
};
type: string;
}
export interface PatreonClient {
(pathname: string): Promise<PatronData>;
getStore(): any;
setStore(store: { sync: () => void }): void;
}
export interface PatronData {
rawJson: {
data: PatronDataEntry[];
included: PatronDataEntry[];
links: {
next?: string;
};
};
}
export interface PatreonTokens {
access_token: string;
refresh_token: string;
expires_in: string;
scope: string;
token_type: string;
}
export interface PatreonClient {
(pathname: string): Promise<PatronData>;
export interface PatreonOAuthClient {
getTokens(redirectCode: string, redirectUri: string): Promise<PatreonTokens>;
refreshToken(refreshToken: string): Promise<any>;
}
getStore(): any;
export function patreon(accessToken: string): PatreonClient;
export function oauth(clientId: string, clientSecret: string): PatreonOAuthClient;
setStore(store: { sync: () => void }): void;
}
export interface PatreonTokens {
access_token: string;
refresh_token: string;
expires_in: string;
scope: string;
token_type: string;
}
export interface PatreonOAuthClient {
getTokens(redirectCode: string, redirectUri: string): Promise<PatreonTokens>;
refreshToken(refreshToken: string): Promise<any>;
}
export function patreon(accessToken: string): PatreonClient;
export function oauth(clientId: string, clientSecret: string): PatreonOAuthClient;
}