mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-07 18:50:14 +00:00
Merge branch 'master' into remove-three-types
This commit is contained in:
19
types/arcgis-js-api/v3/index.d.ts
vendored
19
types/arcgis-js-api/v3/index.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
// Type definitions for ArcGIS API for JavaScript 3.27
|
||||
// Type definitions for ArcGIS API for JavaScript 3.28
|
||||
// Project: https://developers.arcgis.com/javascript/3/
|
||||
// Definitions by: Esri <https://github.com/Esri>
|
||||
// Bjorn Svensson <https://github.com/bsvensson>
|
||||
@@ -3477,19 +3477,19 @@ declare module "esri/basemaps" {
|
||||
var basemaps: {
|
||||
/** The Light Gray Canvas basemap is designed to be used as a neutral background map for overlaying and emphasizing other map layers. */
|
||||
gray: any;
|
||||
/** The World Imagery map is a detailed imagery map layer and labels that is designed to be used as a basemap for various maps and applications. */
|
||||
/** The World Imagery with Labels map is a detailed imagery map layer and labels that is designed to be used as a basemap for various maps and applications: https://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer */
|
||||
hybrid: any;
|
||||
/** The Ocean Basemap is designed to be used as a basemap by marine GIS professionals and as a reference map by anyone interested in ocean data. */
|
||||
oceans: any;
|
||||
/** The OpenStreetMap is a community map layer that is designed to be used as a basemap for various maps and applications. */
|
||||
osm: any;
|
||||
/** The World Imagery map is a detailed imagery map layer that is designed to be used as a basemap for various maps and applications. */
|
||||
/** The World Imagery map is a detailed imagery map layer that is designed to be used as a basemap for various maps and applications: https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer. */
|
||||
satellite: any;
|
||||
/** The Streets basemap presents a multiscale street map for the world. */
|
||||
/** The Streets basemap presents a multiscale street map for the world: https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer. */
|
||||
streets: any;
|
||||
/** The Terrain with Labels basemap is designed to be used to overlay and emphasize other thematic map layers. */
|
||||
terrain: any;
|
||||
/** The Topographic map includes boundaries, cities, water features, physiographic features, parks, landmarks, transportation, and buildings. */
|
||||
/** The Topographic map includes boundaries, cities, water features, physiographic features, parks, landmarks, transportation, and buildings: https://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer */
|
||||
topo: any;
|
||||
};
|
||||
export = basemaps;
|
||||
@@ -9228,8 +9228,9 @@ declare module "esri/lang" {
|
||||
* @param data The data object used in the substitution.
|
||||
* @param template The template used for the substitution.
|
||||
* @param first When true, returns only the first property found in the data object.
|
||||
* @param format The format object used in the substitution.
|
||||
*/
|
||||
substitute(data: any, template?: string, first?: boolean): string;
|
||||
substitute(data: any, template?: string, first?: boolean, format?: any): string;
|
||||
/**
|
||||
* Iterates through the argument array and searches for the identifier to which the argument value matches.
|
||||
* @param array The argument array for testing.
|
||||
@@ -10000,6 +10001,8 @@ declare module "esri/layers/FeatureLayer" {
|
||||
displayField: string;
|
||||
/** Indicates the field names for the editor fields. */
|
||||
editFieldsInfo: any;
|
||||
/** Applicable to ArcGIS Online hosted feature services. */
|
||||
editingInfo: any;
|
||||
/** The array of fields in the layer. */
|
||||
fields: Field[];
|
||||
/** The full extent of the layer. */
|
||||
@@ -10054,6 +10057,8 @@ declare module "esri/layers/FeatureLayer" {
|
||||
supportsAttachmentsByUploadId: boolean;
|
||||
/** When true, the layer supports the Calculate REST operation when updating features. */
|
||||
supportsCalculate: boolean;
|
||||
/** If true, the layer supports a user-defined field description. */
|
||||
supportsFieldDescription: boolean;
|
||||
/** When true, the layer supports statistical functions in query operations. */
|
||||
supportsStatistics: boolean;
|
||||
/** When true, the layer is suspended. */
|
||||
@@ -10468,6 +10473,8 @@ declare module "esri/layers/Field" {
|
||||
class Field {
|
||||
/** The alias name for the field. */
|
||||
alias: string;
|
||||
/** A string that describes the default value set for a field. */
|
||||
defaultValue: string;
|
||||
/** Domain associated with the field. */
|
||||
domain: Domain;
|
||||
/** Indicates whether the field is editable. */
|
||||
|
||||
4
types/countries-and-timezones/index.d.ts
vendored
4
types/countries-and-timezones/index.d.ts
vendored
@@ -16,9 +16,9 @@ export interface Timezone {
|
||||
countries: string[];
|
||||
}
|
||||
|
||||
export function getAllCountries(): Country[];
|
||||
export function getAllCountries(): {[key: string]: Country};
|
||||
|
||||
export function getAllTimezones(): Timezone[];
|
||||
export function getAllTimezones(): {[key: string]: Timezone};
|
||||
|
||||
export function getCountriesForTimezone(timezoneId: string): Country[];
|
||||
|
||||
|
||||
98
types/elliptic/index.d.ts
vendored
98
types/elliptic/index.d.ts
vendored
@@ -4,7 +4,7 @@
|
||||
// Gaylor Bosson <https://github.com/Gilthoniel>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import BN = require('bn.js');
|
||||
import BN = require("bn.js");
|
||||
|
||||
// incomplete typings
|
||||
export const utils: any;
|
||||
@@ -29,10 +29,10 @@ export namespace curve {
|
||||
g: base.BasePoint;
|
||||
redN: BN;
|
||||
|
||||
constructor(type: string, conf: base.BaseCurveOptions)
|
||||
constructor(type: string, conf: base.BaseCurveOptions);
|
||||
|
||||
validate(point: base.BasePoint): boolean;
|
||||
decodePoint(bytes: Buffer | string, enc?: 'hex'): base.BasePoint;
|
||||
decodePoint(bytes: Buffer | string, enc?: "hex"): base.BasePoint;
|
||||
}
|
||||
|
||||
namespace base {
|
||||
@@ -83,7 +83,12 @@ export namespace curve {
|
||||
|
||||
constructor(conf: edwards.EdwardsConf);
|
||||
|
||||
point(x: BNInput, y: BNInput, z?: BNInput, t?: BNInput): edwards.EdwardsPoint;
|
||||
point(
|
||||
x: BNInput,
|
||||
y: BNInput,
|
||||
z?: BNInput,
|
||||
t?: BNInput
|
||||
): edwards.EdwardsPoint;
|
||||
pointFromX(x: BNInput, odd?: boolean): edwards.EdwardsPoint;
|
||||
pointFromY(y: BNInput, odd?: boolean): edwards.EdwardsPoint;
|
||||
pointFromJSON(obj: BNInput[]): edwards.EdwardsPoint;
|
||||
@@ -144,7 +149,7 @@ export namespace curves {
|
||||
n: BN | undefined | null;
|
||||
hash: any; // ?
|
||||
|
||||
constructor(options: PresetCurve.Options)
|
||||
constructor(options: PresetCurve.Options);
|
||||
}
|
||||
|
||||
namespace PresetCurve {
|
||||
@@ -172,17 +177,47 @@ export class ec {
|
||||
g: any;
|
||||
hash: any;
|
||||
|
||||
constructor(options: string | curves.PresetCurve)
|
||||
constructor(options: string | curves.PresetCurve);
|
||||
|
||||
keyPair(options: ec.KeyPairOptions): ec.KeyPair;
|
||||
keyFromPrivate(priv: Buffer | string | ec.KeyPair, enc?: string): ec.KeyPair;
|
||||
keyFromPublic(pub: Buffer | string | {x: string, y: string} | ec.KeyPair, enc?: string): ec.KeyPair;
|
||||
keyFromPrivate(
|
||||
priv: Buffer | string | ec.KeyPair,
|
||||
enc?: string
|
||||
): ec.KeyPair;
|
||||
keyFromPublic(
|
||||
pub: Buffer | string | { x: string; y: string } | ec.KeyPair,
|
||||
enc?: string
|
||||
): ec.KeyPair;
|
||||
genKeyPair(options?: ec.GenKeyPairOptions): ec.KeyPair;
|
||||
sign(msg: BNInput, key: Buffer | ec.KeyPair, enc: string, options?: ec.SignOptions): ec.Signature;
|
||||
sign(msg: BNInput, key: Buffer | ec.KeyPair, options?: ec.SignOptions): ec.Signature;
|
||||
verify(msg: BNInput, signature: ec.Signature | ec.SignatureOptions, key: Buffer | ec.KeyPair, enc?: string): boolean;
|
||||
recoverPubKey(msg: BNInput, signature: ec.Signature | ec.SignatureOptions, j: number, enc?: string): any;
|
||||
getKeyRecoveryParam(e: Error | undefined, signature: ec.Signature | ec.SignatureOptions, Q: BN, enc?: string): number;
|
||||
sign(
|
||||
msg: BNInput,
|
||||
key: Buffer | ec.KeyPair,
|
||||
enc: string,
|
||||
options?: ec.SignOptions
|
||||
): ec.Signature;
|
||||
sign(
|
||||
msg: BNInput,
|
||||
key: Buffer | ec.KeyPair,
|
||||
options?: ec.SignOptions
|
||||
): ec.Signature;
|
||||
verify(
|
||||
msg: BNInput,
|
||||
signature: ec.Signature | ec.SignatureOptions,
|
||||
key: Buffer | ec.KeyPair,
|
||||
enc?: string
|
||||
): boolean;
|
||||
recoverPubKey(
|
||||
msg: BNInput,
|
||||
signature: ec.Signature | ec.SignatureOptions,
|
||||
j: number,
|
||||
enc?: string
|
||||
): any;
|
||||
getKeyRecoveryParam(
|
||||
e: Error | undefined,
|
||||
signature: ec.Signature | ec.SignatureOptions,
|
||||
Q: BN,
|
||||
enc?: string
|
||||
): number;
|
||||
}
|
||||
|
||||
export namespace ec {
|
||||
@@ -201,21 +236,32 @@ export namespace ec {
|
||||
}
|
||||
|
||||
class KeyPair {
|
||||
static fromPublic(ec: ec, pub: Buffer | string | {x: string, y: string} | KeyPair, enc?: string): KeyPair;
|
||||
static fromPrivate(ec: ec, priv: Buffer | string | KeyPair, enc?: string): KeyPair;
|
||||
static fromPublic(
|
||||
ec: ec,
|
||||
pub: Buffer | string | { x: string; y: string } | KeyPair,
|
||||
enc?: string
|
||||
): KeyPair;
|
||||
static fromPrivate(
|
||||
ec: ec,
|
||||
priv: Buffer | string | KeyPair,
|
||||
enc?: string
|
||||
): KeyPair;
|
||||
|
||||
ec: ec;
|
||||
|
||||
constructor(ec: ec, options: KeyPairOptions)
|
||||
constructor(ec: ec, options: KeyPairOptions);
|
||||
|
||||
validate(): { readonly result: boolean, readonly reason: string };
|
||||
validate(): { readonly result: boolean; readonly reason: string };
|
||||
getPublic(compact: boolean, enc?: string): any; // ?
|
||||
getPublic(enc?: string): any; // ?
|
||||
getPrivate(enc?: 'hex'): Buffer | BN | string;
|
||||
getPrivate(enc?: "hex"): Buffer | BN | string;
|
||||
derive(pub: any): any; // ?
|
||||
sign(msg: BNInput, enc: string, options?: SignOptions): Signature;
|
||||
sign(msg: BNInput, options?: SignOptions): Signature;
|
||||
verify(msg: BNInput, signature: Signature | SignatureOptions): boolean;
|
||||
verify(
|
||||
msg: BNInput,
|
||||
signature: Signature | SignatureOptions | string
|
||||
): boolean;
|
||||
inspect(): string;
|
||||
}
|
||||
|
||||
@@ -224,7 +270,7 @@ export namespace ec {
|
||||
s: BN;
|
||||
recoveryParam: number | null;
|
||||
|
||||
constructor(options: SignatureOptions | Signature, enc?: string)
|
||||
constructor(options: SignatureOptions | Signature, enc?: string);
|
||||
|
||||
toDER(enc?: string | null): any; // ?
|
||||
}
|
||||
@@ -246,10 +292,14 @@ export namespace ec {
|
||||
export class eddsa {
|
||||
curve: curve.edwards;
|
||||
|
||||
constructor(name: 'ed25519');
|
||||
constructor(name: "ed25519");
|
||||
|
||||
sign(message: eddsa.Bytes, secret: eddsa.Bytes): eddsa.Signature;
|
||||
verify(message: eddsa.Bytes, sig: eddsa.Bytes | eddsa.Signature, pub: eddsa.Bytes | eddsa.Point | eddsa.KeyPair): boolean;
|
||||
verify(
|
||||
message: eddsa.Bytes,
|
||||
sig: eddsa.Bytes | eddsa.Signature,
|
||||
pub: eddsa.Bytes | eddsa.Point | eddsa.KeyPair
|
||||
): boolean;
|
||||
hashInt(): BN;
|
||||
keyFromPublic(pub: eddsa.Bytes): eddsa.KeyPair;
|
||||
keyFromSecret(secret: eddsa.Bytes): eddsa.KeyPair;
|
||||
@@ -281,9 +331,9 @@ export namespace eddsa {
|
||||
secret(): Buffer;
|
||||
sign(message: Bytes): Signature;
|
||||
verify(message: Bytes, sig: Signature | Bytes): boolean;
|
||||
getSecret(enc: 'hex'): string;
|
||||
getSecret(enc: "hex"): string;
|
||||
getSecret(): Buffer;
|
||||
getPublic(enc: 'hex'): string;
|
||||
getPublic(enc: "hex"): string;
|
||||
getPublic(): Buffer;
|
||||
}
|
||||
|
||||
|
||||
6
types/node/child_process.d.ts
vendored
6
types/node/child_process.d.ts
vendored
@@ -19,9 +19,9 @@ declare module "child_process" {
|
||||
readonly pid: number;
|
||||
readonly connected: boolean;
|
||||
kill(signal?: string): void;
|
||||
send(message: any, callback?: (error: Error) => void): boolean;
|
||||
send(message: any, sendHandle?: net.Socket | net.Server, callback?: (error: Error) => void): boolean;
|
||||
send(message: any, sendHandle?: net.Socket | net.Server, options?: MessageOptions, callback?: (error: Error) => void): boolean;
|
||||
send(message: any, callback?: (error: Error | null) => void): boolean;
|
||||
send(message: any, sendHandle?: net.Socket | net.Server, callback?: (error: Error | null) => void): boolean;
|
||||
send(message: any, sendHandle?: net.Socket | net.Server, options?: MessageOptions, callback?: (error: Error | null) => void): boolean;
|
||||
disconnect(): void;
|
||||
unref(): void;
|
||||
ref(): void;
|
||||
|
||||
2
types/node/cluster.d.ts
vendored
2
types/node/cluster.d.ts
vendored
@@ -24,7 +24,7 @@ declare module "cluster" {
|
||||
class Worker extends events.EventEmitter {
|
||||
id: number;
|
||||
process: child.ChildProcess;
|
||||
send(message: any, sendHandle?: any, callback?: (error: Error) => void): boolean;
|
||||
send(message: any, sendHandle?: any, callback?: (error: Error | null) => void): boolean;
|
||||
kill(signal?: string): void;
|
||||
destroy(signal?: string): void;
|
||||
disconnect(): void;
|
||||
|
||||
2
types/node/globals.d.ts
vendored
2
types/node/globals.d.ts
vendored
@@ -891,7 +891,7 @@ declare namespace NodeJS {
|
||||
domain: Domain;
|
||||
|
||||
// Worker
|
||||
send?(message: any, sendHandle?: any): void;
|
||||
send?(message: any, sendHandle?: any, options?: { swallowErrors?: boolean}, callback?: (error: Error | null) => void): boolean;
|
||||
disconnect(): void;
|
||||
connected: boolean;
|
||||
|
||||
|
||||
@@ -69,15 +69,15 @@ async function testPromisify() {
|
||||
});
|
||||
|
||||
_boolean = cp.send(1, (error) => {
|
||||
const _err: Error = error;
|
||||
const _err: Error | null = error;
|
||||
});
|
||||
_boolean = cp.send('one', (error) => {
|
||||
const _err: Error = error;
|
||||
const _err: Error | null = error;
|
||||
});
|
||||
_boolean = cp.send({
|
||||
type: 'test'
|
||||
}, (error) => {
|
||||
const _err: Error = error;
|
||||
const _err: Error | null = error;
|
||||
});
|
||||
|
||||
_boolean = cp.send(1, _socket);
|
||||
@@ -87,15 +87,15 @@ async function testPromisify() {
|
||||
}, _socket);
|
||||
|
||||
_boolean = cp.send(1, _socket, (error) => {
|
||||
const _err: Error = error;
|
||||
const _err: Error | null = error;
|
||||
});
|
||||
_boolean = cp.send('one', _socket, (error) => {
|
||||
const _err: Error = error;
|
||||
const _err: Error | null = error;
|
||||
});
|
||||
_boolean = cp.send({
|
||||
type: 'test'
|
||||
}, _socket, (error) => {
|
||||
const _err: Error = error;
|
||||
const _err: Error | null = error;
|
||||
});
|
||||
|
||||
_boolean = cp.send(1, _socket, {
|
||||
@@ -113,19 +113,19 @@ async function testPromisify() {
|
||||
_boolean = cp.send(1, _socket, {
|
||||
keepOpen: true
|
||||
}, (error) => {
|
||||
const _err: Error = error;
|
||||
const _err: Error | null = error;
|
||||
});
|
||||
_boolean = cp.send('one', _socket, {
|
||||
keepOpen: true
|
||||
}, (error) => {
|
||||
const _err: Error = error;
|
||||
const _err: Error | null = error;
|
||||
});
|
||||
_boolean = cp.send({
|
||||
type: 'test'
|
||||
}, _socket, {
|
||||
keepOpen: true
|
||||
}, (error) => {
|
||||
const _err: Error = error;
|
||||
const _err: Error | null = error;
|
||||
});
|
||||
|
||||
_boolean = cp.send(1, _server);
|
||||
@@ -135,15 +135,15 @@ async function testPromisify() {
|
||||
}, _server);
|
||||
|
||||
_boolean = cp.send(1, _server, (error) => {
|
||||
const _err: Error = error;
|
||||
const _err: Error | null = error;
|
||||
});
|
||||
_boolean = cp.send('one', _server, (error) => {
|
||||
const _err: Error = error;
|
||||
const _err: Error | null = error;
|
||||
});
|
||||
_boolean = cp.send({
|
||||
type: 'test'
|
||||
}, _server, (error) => {
|
||||
const _err: Error = error;
|
||||
const _err: Error | null = error;
|
||||
});
|
||||
|
||||
_boolean = cp.send(1, _server, {
|
||||
@@ -161,19 +161,19 @@ async function testPromisify() {
|
||||
_boolean = cp.send(1, _server, {
|
||||
keepOpen: true
|
||||
}, (error) => {
|
||||
const _err: Error = error;
|
||||
const _err: Error | null = error;
|
||||
});
|
||||
_boolean = cp.send('one', _server, {
|
||||
keepOpen: true
|
||||
}, (error) => {
|
||||
const _err: Error = error;
|
||||
const _err: Error | null = error;
|
||||
});
|
||||
_boolean = cp.send({
|
||||
type: 'test'
|
||||
}, _server, {
|
||||
keepOpen: true
|
||||
}, (error) => {
|
||||
const _err: Error = error;
|
||||
const _err: Error | null = error;
|
||||
});
|
||||
|
||||
const stdin: Writable | null = cp.stdio[0];
|
||||
|
||||
@@ -56,3 +56,11 @@ import { EventEmitter } from "events";
|
||||
dest = report.writeReport('asdasd');
|
||||
dest = report.writeReport(new Error());
|
||||
}
|
||||
{
|
||||
if (process.send) {
|
||||
let r: boolean = process.send('aMessage');
|
||||
r = process.send({ msg: "foo"}, {});
|
||||
r = process.send({ msg: "foo"}, {}, { swallowErrors: true });
|
||||
r = process.send({ msg: "foo"}, {}, { swallowErrors: true }, (err: Error | null) => {});
|
||||
}
|
||||
}
|
||||
|
||||
2
types/nodegit/tree-builder.d.ts
vendored
2
types/nodegit/tree-builder.d.ts
vendored
@@ -11,5 +11,5 @@ export class Treebuilder {
|
||||
get(filename: string): TreeEntry;
|
||||
insert(filename: string, id: Oid, filemode: number): Promise<TreeEntry>;
|
||||
remove(filename: string): number;
|
||||
write(): Oid;
|
||||
write(): Promise<Oid>;
|
||||
}
|
||||
|
||||
70
types/parcel-bundler/index.d.ts
vendored
70
types/parcel-bundler/index.d.ts
vendored
@@ -1,12 +1,30 @@
|
||||
// Type definitions for parcel-bundler 1.10
|
||||
// Type definitions for parcel-bundler 1.12
|
||||
// Project: https://github.com/parcel-bundler/parcel#readme
|
||||
// Definitions by: pinage404 <https://github.com/pinage404>
|
||||
// Nick Woodward <https://github.com/nick-woodward>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
import * as http from 'http';
|
||||
import * as https from 'https';
|
||||
import * as express from "express-serve-static-core";
|
||||
|
||||
declare namespace ParcelBundler {
|
||||
interface HttpsOptions {
|
||||
/**
|
||||
* Path to custom certificate
|
||||
*
|
||||
* @default "./ssl/c.crt"
|
||||
*/
|
||||
cert?: string;
|
||||
/**
|
||||
* Path to custom key
|
||||
*
|
||||
* @default "./ssl/k.key"
|
||||
*/
|
||||
key?: string;
|
||||
}
|
||||
|
||||
interface ParcelOptions {
|
||||
/**
|
||||
* The out directory to put the build files in
|
||||
@@ -74,20 +92,7 @@ declare namespace ParcelBundler {
|
||||
https?:
|
||||
| true
|
||||
| false
|
||||
| {
|
||||
/**
|
||||
* Path to custom certificate
|
||||
*
|
||||
* @default "./ssl/c.crt"
|
||||
*/
|
||||
cert?: string;
|
||||
/**
|
||||
* Path to custom key
|
||||
*
|
||||
* @default "./ssl/k.key"
|
||||
*/
|
||||
key?: string;
|
||||
};
|
||||
| HttpsOptions;
|
||||
/**
|
||||
* 3 = log everything, 2 = log warnings & errors, 1 = log errors
|
||||
*
|
||||
@@ -124,6 +129,27 @@ declare namespace ParcelBundler {
|
||||
* @default false
|
||||
*/
|
||||
detailedReport?: boolean;
|
||||
|
||||
/**
|
||||
* Expose modules as UMD under this name, disabled by default
|
||||
*/
|
||||
global?: string;
|
||||
|
||||
/**
|
||||
* By default, package.json dependencies are not included when using 'node' or 'electron' with the 'target' option.
|
||||
*
|
||||
* Set to true to add them to the bundle.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
bundleNodeModules?: true | false;
|
||||
|
||||
/**
|
||||
* Enable or disable HMR while watching
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
hmr?: true | false;
|
||||
}
|
||||
|
||||
type ParcelAsset = any;
|
||||
@@ -161,6 +187,11 @@ declare namespace ParcelBundler {
|
||||
* A Map<Asset, number(line number inside the bundle)> of all the locations of the assets inside the bundle, used to generate accurate source maps
|
||||
*/
|
||||
offsets: Map<ParcelAsset, number>;
|
||||
|
||||
/**
|
||||
* A Set of all child bundles
|
||||
*/
|
||||
childBundles: Set<any>;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -177,6 +208,15 @@ declare class ParcelBundler {
|
||||
bundle(): Promise<ParcelBundler.ParcelBundle>;
|
||||
|
||||
middleware(): (req: express.Request, res: express.Response, next: express.NextFunction) => any;
|
||||
|
||||
serve(port?: number, https?: true | false | ParcelBundler.HttpsOptions, host?: string): Promise<http.Server | https.Server>;
|
||||
|
||||
on(name: 'buildEnd', cb: () => void): void;
|
||||
on(name: 'bundled', cb: (bundle: ParcelBundler.ParcelBundle) => void): void;
|
||||
on(name: 'buildStart', cb: (entryPoints: string[]) => void): void;
|
||||
on(name: 'buildError', cb: (error: Error) => void): void;
|
||||
|
||||
off(name: 'buildEnd'| 'bundled'| 'buildStart'| 'buildError', cb: (...any: any[]) => void): void;
|
||||
}
|
||||
|
||||
export = ParcelBundler;
|
||||
|
||||
@@ -6,6 +6,20 @@ const files = ["./index.d.ts"];
|
||||
|
||||
const bundler = new ParcelBundler(files, parcelOption);
|
||||
|
||||
bundler.on('buildStart', (entryPoints) => {
|
||||
console.log(entryPoints);
|
||||
});
|
||||
|
||||
bundler.on('bundled', (bundle) => {
|
||||
console.log(bundle);
|
||||
});
|
||||
|
||||
bundler.on('buildEnd', () => console.log('Parcel bundler finished!'));
|
||||
|
||||
const cb = () => {};
|
||||
bundler.on('buildEnd', cb);
|
||||
bundler.off('buildEnd', cb);
|
||||
|
||||
bundler.addAssetType('md', 'markdown-asset');
|
||||
|
||||
bundler.addPackager('md', 'markdown-packager');
|
||||
@@ -13,3 +27,11 @@ bundler.addPackager('md', 'markdown-packager');
|
||||
bundler.middleware();
|
||||
|
||||
bundler.bundle().then(bundle => bundle.name);
|
||||
|
||||
bundler.serve(1234, false, 'localhost').then((server) => server.close());
|
||||
|
||||
const otherBundler = new ParcelBundler(['./missing.d.ts'], parcelOption);
|
||||
|
||||
otherBundler.on('buildError', (error) => console.log(error));
|
||||
|
||||
otherBundler.bundle();
|
||||
|
||||
@@ -1975,9 +1975,9 @@ class Rectangle {
|
||||
};
|
||||
|
||||
() => {
|
||||
const a: boolean = R.pathSatisfies(x => x > 0, ["x"], {x: 1, y: 2}); // => true
|
||||
const b: boolean = R.pathSatisfies(x => x > 0, ["x"])({x: 1, y: 2}); // => true
|
||||
const c: boolean = R.pathSatisfies(x => x > 0)(["x"])({x: 1, y: 2}); // => true
|
||||
const a: boolean = R.pathSatisfies((x: number) => x > 0, ["x"], {x: 1, y: 2}); // => true
|
||||
const b: boolean = R.pathSatisfies((x: number) => x > 0, ["x"])({x: 1, y: 2}); // => true
|
||||
const c: boolean = R.pathSatisfies((x: number) => x > 0)(["x"])({x: 1, y: 2}); // => true
|
||||
};
|
||||
|
||||
() => {
|
||||
@@ -2091,9 +2091,9 @@ class Rectangle {
|
||||
};
|
||||
|
||||
() => {
|
||||
const a: boolean = R.propSatisfies(x => x > 0, "x", {x: 1, y: 2}); // => true
|
||||
const b: boolean = R.propSatisfies(x => x > 0, "x")({x: 1, y: 2}); // => true
|
||||
const c: boolean = R.propSatisfies(x => x > 0)("x")({x: 1, y: 2}); // => true
|
||||
const a: boolean = R.propSatisfies((x: number) => x > 0, "x", {x: 1, y: 2}); // => true
|
||||
const b: boolean = R.propSatisfies((x: number) => x > 0, "x")({x: 1, y: 2}); // => true
|
||||
const c: boolean = R.propSatisfies((x: number) => x > 0)("x")({x: 1, y: 2}); // => true
|
||||
};
|
||||
|
||||
() => {
|
||||
|
||||
2
types/react-autocomplete/index.d.ts
vendored
2
types/react-autocomplete/index.d.ts
vendored
@@ -76,7 +76,7 @@ declare namespace Autocomplete {
|
||||
* and the width of the dropdown menu.
|
||||
*/
|
||||
renderMenu?: (
|
||||
items: any[],
|
||||
items: ReactNode[],
|
||||
value: string,
|
||||
styles: CSSProperties,
|
||||
) => ReactNode;
|
||||
|
||||
@@ -16,3 +16,8 @@ render(
|
||||
/>,
|
||||
container,
|
||||
);
|
||||
|
||||
// $ExpectError
|
||||
const renderMenu: React.ComponentProps<typeof Autocomplete>['renderMenu'] = (
|
||||
(item: string[]) => <div></div>
|
||||
);
|
||||
|
||||
2
types/sequelize/index.d.ts
vendored
2
types/sequelize/index.d.ts
vendored
@@ -4380,7 +4380,7 @@ declare namespace sequelize {
|
||||
/**
|
||||
* Inserts multiple records at once
|
||||
*/
|
||||
bulkInsert(tableName: string, records: Object[], options?: QueryOptions,
|
||||
bulkInsert(tableName: string | { tableName: string, schema: string }, records: Object[], options?: QueryOptions,
|
||||
attributes?: string[] | string): Promise<Object>;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1217,6 +1217,7 @@ queryInterface.createTable( { tableName : 'y', schema : 'a' },
|
||||
queryInterface.changeColumn( { tableName : 'a', schema : 'b' }, 'c', { type : Sequelize.FLOAT },
|
||||
{ logging : () => s } );
|
||||
queryInterface.createTable( 'users', { id : { type : Sequelize.INTEGER, primaryKey : true, autoIncrement : true } } );
|
||||
queryInterface.bulkInsert({tableName:'users', schema:'test'}, [{}, {}, {}]);
|
||||
queryInterface.createTable( 'level', { id : { type : Sequelize.INTEGER, primaryKey : true, autoIncrement : true } } );
|
||||
queryInterface.addColumn( 'users', 'someEnum', Sequelize.ENUM( 'value1', 'value2', 'value3' ) );
|
||||
queryInterface.addColumn( 'users', 'so', { type : Sequelize.ENUM, values : ['value1', 'value2', 'value3'] } );
|
||||
|
||||
8
types/sinon/ts3.1/index.d.ts
vendored
8
types/sinon/ts3.1/index.d.ts
vendored
@@ -238,22 +238,22 @@ declare namespace Sinon {
|
||||
* Returns true if the spy was called before @param anotherSpy
|
||||
* @param anotherSpy
|
||||
*/
|
||||
calledBefore(anotherSpy: SinonSpy): boolean;
|
||||
calledBefore(anotherSpy: SinonInspectable): boolean;
|
||||
/**
|
||||
* Returns true if the spy was called after @param anotherSpy
|
||||
* @param anotherSpy
|
||||
*/
|
||||
calledAfter(anotherSpy: SinonSpy): boolean;
|
||||
calledAfter(anotherSpy: SinonInspectable): boolean;
|
||||
/**
|
||||
* Returns true if spy was called before @param anotherSpy, and no spy calls occurred between spy and @param anotherSpy.
|
||||
* @param anotherSpy
|
||||
*/
|
||||
calledImmediatelyBefore(anotherSpy: SinonSpy): boolean;
|
||||
calledImmediatelyBefore(anotherSpy: SinonInspectable): boolean;
|
||||
/**
|
||||
* Returns true if spy was called after @param anotherSpy, and no spy calls occurred between @param anotherSpy and spy.
|
||||
* @param anotherSpy
|
||||
*/
|
||||
calledImmediatelyAfter(anotherSpy: SinonSpy): boolean;
|
||||
calledImmediatelyAfter(anotherSpy: SinonInspectable): boolean;
|
||||
/**
|
||||
* Returns true if the spy was always called with @param obj as this.
|
||||
* @param obj
|
||||
|
||||
@@ -379,6 +379,7 @@ function testSpy() {
|
||||
let fn = (arg: string, arg2: number): boolean => true;
|
||||
const obj = class {
|
||||
foo() { }
|
||||
foobar(p1?: string) { return p1; }
|
||||
set bar(val: number) { }
|
||||
get bar() { return 0; }
|
||||
};
|
||||
@@ -387,8 +388,19 @@ function testSpy() {
|
||||
const spy = sinon.spy(); // $ExpectType SinonSpy<any[], any>
|
||||
const spyTwo = sinon.spy().named('spyTwo');
|
||||
|
||||
const methodSpy = sinon.spy(instance, 'foo');
|
||||
const methodSpy2 = sinon.spy(instance, 'bar', ['set', 'get']);
|
||||
const methodSpy = sinon.spy(instance, 'foo'); // $ExpectType SinonSpy<[], void>
|
||||
const methodSpy2 = sinon.spy(instance, 'bar', ['set', 'get']); // $ExpectType SinonSpy<any[], any>
|
||||
const methodSpy3 = sinon.spy(instance, 'foobar'); // $ExpectType SinonSpy<[(string | undefined)?], string | undefined>
|
||||
|
||||
methodSpy.calledBefore(methodSpy2);
|
||||
methodSpy.calledAfter(methodSpy2);
|
||||
methodSpy.calledImmediatelyBefore(methodSpy2);
|
||||
methodSpy.calledImmediatelyAfter(methodSpy2);
|
||||
|
||||
methodSpy.calledBefore(methodSpy3);
|
||||
methodSpy.calledAfter(methodSpy3);
|
||||
methodSpy.calledImmediatelyBefore(methodSpy3);
|
||||
methodSpy.calledImmediatelyAfter(methodSpy3);
|
||||
|
||||
let count = 0;
|
||||
count = spy.callCount;
|
||||
|
||||
17
types/vis/index.d.ts
vendored
17
types/vis/index.d.ts
vendored
@@ -1828,6 +1828,13 @@ export interface NodeOptions {
|
||||
|
||||
level?: number;
|
||||
|
||||
margin?: {
|
||||
top?: number;
|
||||
right?: number;
|
||||
bottom?: number;
|
||||
left?: number;
|
||||
};
|
||||
|
||||
mass?: number;
|
||||
|
||||
physics?: boolean;
|
||||
@@ -1839,11 +1846,11 @@ export interface NodeOptions {
|
||||
shape?: string;
|
||||
|
||||
shapeProperties?: {
|
||||
borderDashes: boolean | number[], // only for borders
|
||||
borderRadius: number, // only for box shape
|
||||
interpolation: boolean, // only for image and circularImage shapes
|
||||
useImageSize: boolean, // only for image and circularImage shapes
|
||||
useBorderWithImage: boolean // only for image shape
|
||||
borderDashes?: boolean | number[], // only for borders
|
||||
borderRadius?: number, // only for box shape
|
||||
interpolation?: boolean, // only for image and circularImage shapes
|
||||
useImageSize?: boolean, // only for image and circularImage shapes
|
||||
useBorderWithImage?: boolean // only for image shape
|
||||
};
|
||||
|
||||
size?: number;
|
||||
|
||||
Reference in New Issue
Block a user