mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
commit
c76cfa3c63
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
@ -2639,7 +2639,7 @@
|
||||
/types/nightmare/ @horiuchi @samyang-au @Bleser92
|
||||
/types/nightwatch/ @rkavalap @schlesiger
|
||||
/types/nivo-slider/ @AndersonFriaca
|
||||
/types/noble/ @swook @wind-rider @shantanubhadoria @lukel99 @bioball @keton @thegecko
|
||||
/types/noble/ @swook @shantanubhadoria @lukel99 @bioball @keton @thegecko
|
||||
/types/nock/ @bonnici @horiuchi @afharo @mastermatt @damour
|
||||
/types/nodal/ @charrondev
|
||||
/types/node/v4/ @eps1lon
|
||||
|
||||
@ -9,6 +9,7 @@ import {
|
||||
Response,
|
||||
IndexSettings,
|
||||
QueryParameters,
|
||||
Client
|
||||
} from 'algoliasearch';
|
||||
|
||||
let _algoliaResponse: Response = {
|
||||
@ -78,7 +79,7 @@ let _algoliaIndexSettings: IndexSettings = {
|
||||
ignorePlurals: false,
|
||||
disableTypoToleranceOnAttributes: '',
|
||||
separatorsToIndex: '',
|
||||
queryType: '',
|
||||
queryType: 'prefixAll',
|
||||
removeWordsIfNoResults: '',
|
||||
advancedSyntax: false,
|
||||
optionalWords: [''],
|
||||
@ -86,7 +87,7 @@ let _algoliaIndexSettings: IndexSettings = {
|
||||
disablePrefixOnAttributes: [''],
|
||||
disableExactOnAttributes: [''],
|
||||
exactOnSingleWordQuery: '',
|
||||
alternativesAsExact: false,
|
||||
alternativesAsExact: ['ignorePlurals'],
|
||||
attributeForDistinct: '',
|
||||
distinct: false,
|
||||
numericAttributesToIndex: [''],
|
||||
@ -147,7 +148,8 @@ let _algoliaQueryParameters: QueryParameters = {
|
||||
minProximity: 0,
|
||||
};
|
||||
|
||||
let index: Index = algoliasearch('', '').initIndex('');
|
||||
let client: Client = algoliasearch('', '');
|
||||
let index: Index = client.initIndex('');
|
||||
|
||||
let search = index.search({ query: '' });
|
||||
|
||||
@ -164,3 +166,12 @@ index.partialUpdateObjects([{}], () => {});
|
||||
index.partialUpdateObjects([{}], false, () => {});
|
||||
index.partialUpdateObjects([{}]).then(() => {});
|
||||
index.partialUpdateObjects([{}], false).then(() => {});
|
||||
|
||||
let indexName : string = index.indexName;
|
||||
|
||||
// complete copy
|
||||
client.copyIndex('from', 'to').then(()=>{})
|
||||
client.copyIndex('from', 'to', ()=> {})
|
||||
// with scope
|
||||
client.copyIndex('from', 'to', ['settings']).then(()=>{})
|
||||
client.copyIndex('from', 'to', ['synonyms', 'rules'], ()=> {})
|
||||
|
||||
39
types/algoliasearch/index.d.ts
vendored
39
types/algoliasearch/index.d.ts
vendored
@ -3,6 +3,7 @@
|
||||
// Definitions by: Baptiste Coquelle <https://github.com/cbaptiste>
|
||||
// Haroen Viaene <https://github.com/haroenv>
|
||||
// Aurélien Hervé <https://github.com/aherve>
|
||||
// Samuel Vaillant <https://github.com/samouss>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
@ -88,7 +89,16 @@ declare namespace algoliasearch {
|
||||
*/
|
||||
deleteIndex(name: string): Promise<Task>;
|
||||
/**
|
||||
* Copy an index from a specific index to a new one
|
||||
* Copy an index from a specific index to a new one
|
||||
* https://github.com/algolia/algoliasearch-client-js#copy-index---copyindex
|
||||
*/
|
||||
copyIndex(
|
||||
from: string,
|
||||
to: string,
|
||||
cb: (err: Error, res: Task) => void
|
||||
): void;
|
||||
/**
|
||||
* Copy settings of an index from a specific index to a new one
|
||||
* https://github.com/algolia/algoliasearch-client-js#copy-index---copyindex
|
||||
*/
|
||||
copyIndex(
|
||||
@ -98,13 +108,13 @@ declare namespace algoliasearch {
|
||||
cb: (err: Error, res: Task) => void
|
||||
): void;
|
||||
/**
|
||||
* Copy an index from a specific index to a new one
|
||||
* Copy settings of an index from a specific index to a new one
|
||||
* https://github.com/algolia/algoliasearch-client-js#copy-index---copyindex
|
||||
*/
|
||||
copyIndex(
|
||||
from: string,
|
||||
to: string,
|
||||
scope: ('settings' | 'synonyms' | 'rules')[]
|
||||
scope?: ('settings' | 'synonyms' | 'rules')[]
|
||||
): Promise<Task>;
|
||||
/**
|
||||
* Move index to a new one (and will overwrite the original one)
|
||||
@ -230,6 +240,7 @@ declare namespace algoliasearch {
|
||||
* Interface for the index algolia object
|
||||
*/
|
||||
interface Index {
|
||||
indexName: string;
|
||||
/**
|
||||
* Gets a specific object
|
||||
* https://github.com/algolia/algoliasearch-client-js#find-by-ids---getobjects
|
||||
@ -329,7 +340,7 @@ declare namespace algoliasearch {
|
||||
* Wait for an indexing task to be compete
|
||||
* https://github.com/algolia/algoliasearch-client-js#wait-for-operations---waittask
|
||||
*/
|
||||
waitTask(taskID: number, cb: (err: Error, res: any) => void): void;
|
||||
waitTask(taskID: number, cb: (err: Error, res: TaskStatus) => void): void;
|
||||
/**
|
||||
* Get an index settings
|
||||
* https://github.com/algolia/algoliasearch-client-js#get-settings---getsettings
|
||||
@ -561,7 +572,7 @@ declare namespace algoliasearch {
|
||||
* Wait for an indexing task to be compete
|
||||
* https://github.com/algolia/algoliasearch-client-js#wait-for-operations---waittask
|
||||
*/
|
||||
waitTask(taskID: number): Promise<any>;
|
||||
waitTask(taskID: number): Promise<TaskStatus>;
|
||||
/**
|
||||
* Get an index settings
|
||||
* https://github.com/algolia/algoliasearch-client-js#get-settings---getsettings
|
||||
@ -1481,6 +1492,13 @@ declare namespace algoliasearch {
|
||||
|
||||
interface Task {
|
||||
taskID: number;
|
||||
createdAt: string;
|
||||
objectID?: string;
|
||||
}
|
||||
|
||||
interface TaskStatus {
|
||||
status: 'published' | 'notPublished',
|
||||
pendingTask: boolean,
|
||||
}
|
||||
|
||||
interface IndexSettings {
|
||||
@ -1601,7 +1619,7 @@ declare namespace algoliasearch {
|
||||
* 'strict' Hits matching with 2 typos are not retrieved if there are some matching without typos.
|
||||
* https://github.com/algolia/algoliasearch-client-js#typotolerance
|
||||
*/
|
||||
typoTolerance?: any;
|
||||
typoTolerance?: boolean | 'min' | 'strict';
|
||||
/**
|
||||
* If set to false, disables typo tolerance on numeric tokens (numbers).
|
||||
* default: true
|
||||
@ -1634,7 +1652,7 @@ declare namespace algoliasearch {
|
||||
* 'prefixNone' No query word is interpreted as a prefix. This option is not recommended.
|
||||
* https://github.com/algolia/algoliasearch-client-js#querytype
|
||||
*/
|
||||
queryType?: any;
|
||||
queryType?: 'prefixAll' | 'prefixLast' | 'prefixNone';
|
||||
/**
|
||||
* This option is used to select a strategy in order to avoid having an empty result page
|
||||
* default: 'none'
|
||||
@ -1700,7 +1718,10 @@ declare namespace algoliasearch {
|
||||
* 'multiWordsSynonym': multiple-words synonym
|
||||
* https://github.com/algolia/algoliasearch-client-js#alternativesasexact
|
||||
*/
|
||||
alternativesAsExact?: any;
|
||||
alternativesAsExact?: (
|
||||
| "ignorePlurals"
|
||||
| "singleWordSynonym"
|
||||
| "multiWordsSynonym")[];
|
||||
/**
|
||||
* The name of the attribute used for the Distinct feature
|
||||
* default: null
|
||||
@ -1711,7 +1732,7 @@ declare namespace algoliasearch {
|
||||
* If set to 1, enables the distinct feature, disabled by default, if the attributeForDistinct index setting is set.
|
||||
* https://github.com/algolia/algoliasearch-client-js#distinct
|
||||
*/
|
||||
distinct?: any;
|
||||
distinct?: boolean | number;
|
||||
/**
|
||||
* All numerical attributes are automatically indexed as numerical filters
|
||||
* default ''
|
||||
|
||||
2
types/algoliasearch/lite/index.d.ts
vendored
2
types/algoliasearch/lite/index.d.ts
vendored
@ -3,6 +3,7 @@
|
||||
// Definitions by: Baptiste Coquelle <https://github.com/cbaptiste>
|
||||
// Haroen Viaene <https://github.com/haroenv>
|
||||
// Aurélien Hervé <https://github.com/aherve>
|
||||
// Samuel Vaillant <https://github.com/samouss>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
@ -67,6 +68,7 @@ declare namespace algoliasearch {
|
||||
* Interface for the index algolia object
|
||||
*/
|
||||
interface Index {
|
||||
indexName: string;
|
||||
/**
|
||||
* Gets a specific object
|
||||
* https://github.com/algolia/algoliasearch-client-js#find-by-ids---getobjects
|
||||
|
||||
1
types/bitcoinjs-lib/index.d.ts
vendored
1
types/bitcoinjs-lib/index.d.ts
vendored
@ -23,6 +23,7 @@ export interface In {
|
||||
hash: Buffer;
|
||||
index: number;
|
||||
sequence: number;
|
||||
witness: Buffer[];
|
||||
}
|
||||
|
||||
export interface Network {
|
||||
|
||||
21
types/correlation-id/correlation-id-tests.ts
Normal file
21
types/correlation-id/correlation-id-tests.ts
Normal file
@ -0,0 +1,21 @@
|
||||
import { withId, bindId, getId } from "correlation-id";
|
||||
|
||||
withId("my-id", () => {
|
||||
const id: string = getId() || "";
|
||||
});
|
||||
|
||||
withId(() => {
|
||||
const id: string = getId() || "";
|
||||
});
|
||||
|
||||
const x: string = bindId("my-id", (foo: string, bar: number): string => {
|
||||
const id: string = getId() || "";
|
||||
|
||||
return foo + bar + id;
|
||||
})("foo", 12);
|
||||
|
||||
const y: string = bindId((foo: string, bar: number): string => {
|
||||
const id: string = getId() || "";
|
||||
|
||||
return foo + bar + id;
|
||||
})("foo", 12);
|
||||
12
types/correlation-id/index.d.ts
vendored
Normal file
12
types/correlation-id/index.d.ts
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
// Type definitions for correlation-id 2.1
|
||||
// Project: https://github.com/toboid/correlation-id#readme
|
||||
// Definitions by: Nate <https://github.com/natemara>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export function withId(id: string, work: () => void): void;
|
||||
export function withId(work: () => void): void;
|
||||
|
||||
export function bindId<T extends (...p: any[]) => any>(id: string, work: T): T;
|
||||
export function bindId<T extends (...p: any[]) => any>(work: T): T;
|
||||
|
||||
export function getId(): string | undefined;
|
||||
16
types/correlation-id/tsconfig.json
Normal file
16
types/correlation-id/tsconfig.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": ["es6"],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": ["../"],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": ["index.d.ts", "correlation-id-tests.ts"]
|
||||
}
|
||||
3
types/correlation-id/tslint.json
Normal file
3
types/correlation-id/tslint.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
@ -11,8 +11,12 @@ const explorer = cosmiconfig("yourModuleName", {
|
||||
ignoreEmptySearchPlaces: false,
|
||||
});
|
||||
|
||||
const explorer2 = cosmiconfig("yourModuleName");
|
||||
|
||||
Promise.all([
|
||||
explorer.search(),
|
||||
explorer.search(path.join(__dirname)),
|
||||
explorer.searchSync(),
|
||||
explorer.searchSync(path.join(__dirname)),
|
||||
explorer.load(path.join(__dirname, "sample-config.json")),
|
||||
explorer.loadSync(path.join(__dirname, "sample-config.json")),
|
||||
|
||||
7
types/cosmiconfig/index.d.ts
vendored
7
types/cosmiconfig/index.d.ts
vendored
@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/davidtheclark/cosmiconfig
|
||||
// Definitions by: ozum <https://github.com/ozum>
|
||||
// szeck87 <https://github.com/szeck87>
|
||||
// saadq <https://github.com/saadq>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
@ -35,8 +36,8 @@ export interface Loaders {
|
||||
}
|
||||
|
||||
export interface Explorer {
|
||||
search(searchFrom: string): Promise<null | CosmiconfigResult>;
|
||||
searchSync(searchFrom: string): null | CosmiconfigResult;
|
||||
search(searchFrom?: string): Promise<null | CosmiconfigResult>;
|
||||
searchSync(searchFrom?: string): null | CosmiconfigResult;
|
||||
load(loadPath: string): Promise<CosmiconfigResult>;
|
||||
loadSync(loadPath: string): CosmiconfigResult;
|
||||
clearLoadCache(): void;
|
||||
@ -55,4 +56,4 @@ export interface ExplorerOptions {
|
||||
ignoreEmptySearchPlaces?: boolean;
|
||||
}
|
||||
|
||||
export default function cosmiconfig(moduleName: string, options: ExplorerOptions): Explorer;
|
||||
export default function cosmiconfig(moduleName: string, options?: ExplorerOptions): Explorer;
|
||||
|
||||
@ -22,4 +22,6 @@ c.result({ type: 'blob' }).then(blob => {
|
||||
x = blob;
|
||||
});
|
||||
|
||||
c.get();
|
||||
|
||||
c.destroy();
|
||||
|
||||
9
types/croppie/index.d.ts
vendored
9
types/croppie/index.d.ts
vendored
@ -3,6 +3,7 @@
|
||||
// Definitions by: Connor Peet <https://github.com/connor4312>
|
||||
// dklmuc <https://github.com/dklmuc>
|
||||
// Sarun Intaralawan <https://github.com/sarunint>
|
||||
// Knut Erik Helgesen <https://github.com/knuthelgesen>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export as namespace Croppie;
|
||||
@ -26,6 +27,8 @@ declare class Croppie {
|
||||
result(options: Croppie.ResultOptions & { type: 'rawcanvas' }): Promise<HTMLCanvasElement>;
|
||||
result(options?: Croppie.ResultOptions): Promise<HTMLCanvasElement>;
|
||||
|
||||
get(): Croppie.CropData;
|
||||
|
||||
rotate(degrees: 90 | 180 | 270 | -90 | -180 | -270): void;
|
||||
|
||||
setZoom(zoom: number): void;
|
||||
@ -59,4 +62,10 @@ declare namespace Croppie {
|
||||
showZoomer?: boolean;
|
||||
viewport?: { width: number, height: number, type?: CropType };
|
||||
}
|
||||
|
||||
interface CropData {
|
||||
points?: number[];
|
||||
orientation?: number;
|
||||
zoom?: number;
|
||||
}
|
||||
}
|
||||
|
||||
@ -64,6 +64,7 @@ const zero: boolean = specifier.zero;
|
||||
const width: number | undefined = specifier.width;
|
||||
const comma: boolean = specifier.comma;
|
||||
const precision: number | undefined = specifier.precision;
|
||||
const trim: boolean = specifier.trim;
|
||||
const type: 'e' | 'f' | 'g' | 'r' | 's' | '%' | 'p' | 'b' | 'o' | 'd' | 'x' | 'X' | 'c' | '' | 'n' = specifier.type;
|
||||
|
||||
const formatString: string = specifier.toString();
|
||||
|
||||
25
types/d3-format/index.d.ts
vendored
25
types/d3-format/index.d.ts
vendored
@ -1,12 +1,12 @@
|
||||
// Type definitions for D3JS d3-format module 1.2
|
||||
// Type definitions for D3JS d3-format module 1.3
|
||||
// Project: https://github.com/d3/d3-format/
|
||||
// Definitions by: Tom Wanzek <https://github.com/tomwanzek>
|
||||
// Alex Ford <https://github.com/gustavderdrache>
|
||||
// Boris Yankov <https://github.com/borisyankov>
|
||||
// denisname <https://github.com/denisname>
|
||||
// Alex Ford <https://github.com/gustavderdrache>
|
||||
// Boris Yankov <https://github.com/borisyankov>
|
||||
// denisname <https://github.com/denisname>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
// Last module patch version validated against: 1.2.0
|
||||
// Last module patch version validated against: 1.3.0
|
||||
|
||||
/**
|
||||
* Specification of locale to use when creating a new FormatLocaleObject
|
||||
@ -124,6 +124,11 @@ export interface FormatSpecifier {
|
||||
* See precisionFixed and precisionRound for help picking an appropriate precision.
|
||||
*/
|
||||
precision: number | undefined;
|
||||
/**
|
||||
* The '~' option trims insignificant trailing zeros across all format types.
|
||||
* This is most commonly used in conjunction with types 'r', 'e', 's' and '%'.
|
||||
*/
|
||||
trim: boolean;
|
||||
/**
|
||||
* The available type values are:
|
||||
*
|
||||
@ -140,9 +145,9 @@ export interface FormatSpecifier {
|
||||
* 'x' - hexadecimal notation, using lower-case letters, rounded to integer.
|
||||
* 'X' - hexadecimal notation, using upper-case letters, rounded to integer.
|
||||
* 'c' - converts the integer to the corresponding unicode character before printing.
|
||||
* '' (none) - like g, but trim insignificant trailing zeros.
|
||||
*
|
||||
* The type 'n' is also supported as shorthand for ',g'. For the 'g', 'n' and '' (none) types,
|
||||
* The type '' (none) is also supported as shorthand for '~g' (with a default precision of 12 instead of 6), and
|
||||
* the type 'n' is shorthand for ',g'. For the 'g', 'n' and '' (none) types,
|
||||
* decimal notation is used if the resulting string would have precision or fewer digits; otherwise, exponent notation is used.
|
||||
*/
|
||||
type: 'e' | 'f' | 'g' | 'r' | 's' | '%' | 'p' | 'b' | 'o' | 'd' | 'x' | 'X' | 'c' | '' | 'n';
|
||||
@ -175,7 +180,7 @@ export function formatDefaultLocale(defaultLocale: FormatLocaleDefinition): Form
|
||||
*
|
||||
* Uses the current default locale.
|
||||
*
|
||||
* The general form of a specifier is [[fill]align][sign][symbol][0][width][,][.precision][type].
|
||||
* The general form of a specifier is [[fill]align][sign][symbol][0][width][,][.precision][~][type].
|
||||
* For reference, an explanation of the segments of the specifier string, refer to the FormatSpecifier interface properties.
|
||||
*
|
||||
* @param specifier A Specifier string.
|
||||
@ -191,7 +196,7 @@ export function format(specifier: string): (n: number | { valueOf(): number }) =
|
||||
*
|
||||
* Uses the current default locale.
|
||||
*
|
||||
* The general form of a specifier is [[fill]align][sign][symbol][0][width][,][.precision][type].
|
||||
* The general form of a specifier is [[fill]align][sign][symbol][0][width][,][.precision][~][type].
|
||||
* For reference, an explanation of the segments of the specifier string, refer to the FormatSpecifier interface properties.
|
||||
*
|
||||
* @param specifier A Specifier string.
|
||||
@ -204,7 +209,7 @@ export function formatPrefix(specifier: string, value: number): (n: number | { v
|
||||
* Parses the specified specifier, returning an object with exposed fields that correspond to the
|
||||
* format specification mini-language and a toString method that reconstructs the specifier.
|
||||
*
|
||||
* The general form of a specifier is [[fill]align][sign][symbol][0][width][,][.precision][type].
|
||||
* The general form of a specifier is [[fill]align][sign][symbol][0][width][,][.precision][~][type].
|
||||
* For reference, an explanation of the segments of the specifier string, refer to the FormatSpecifier interface properties.
|
||||
*
|
||||
* @param specifier A specifier string.
|
||||
|
||||
@ -0,0 +1,9 @@
|
||||
import * as express from "express";
|
||||
import correlator from "express-correlation-id";
|
||||
|
||||
const app = express();
|
||||
app.use(correlator());
|
||||
app.use(correlator({}));
|
||||
app.use(correlator({ header: "x-correlation-id" }));
|
||||
|
||||
const x: string = correlator.getId() || "";
|
||||
14
types/express-correlation-id/index.d.ts
vendored
Normal file
14
types/express-correlation-id/index.d.ts
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
// Type definitions for express-correlation-id 1.2
|
||||
// Project: https://github.com/toboid/express-correlation-id#readme
|
||||
// Definitions by: Nate <https://github.com/natemara>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
import { RequestHandler } from "express-serve-static-core";
|
||||
|
||||
declare const correlator: {
|
||||
(options?: { header?: string }): RequestHandler;
|
||||
getId(): string | undefined;
|
||||
};
|
||||
|
||||
export default correlator;
|
||||
16
types/express-correlation-id/tsconfig.json
Normal file
16
types/express-correlation-id/tsconfig.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": ["es6"],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": ["../"],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": ["index.d.ts", "express-correlation-id-tests.ts"]
|
||||
}
|
||||
1
types/express-correlation-id/tslint.json
Normal file
1
types/express-correlation-id/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
@ -0,0 +1,28 @@
|
||||
/**
|
||||
* Create by AylaJK on 05/09/2018
|
||||
*/
|
||||
import express = require('express');
|
||||
const app = express();
|
||||
|
||||
import http = require('http');
|
||||
const server = http.createServer(app);
|
||||
|
||||
import expresssession = require('express-session');
|
||||
const session = expresssession({
|
||||
secret: 'my-secret',
|
||||
resave: true,
|
||||
saveUninitialized: true,
|
||||
});
|
||||
|
||||
import cookieparser = require('cookie-parser');
|
||||
const cookieParser = cookieparser('my-secret');
|
||||
|
||||
import socketio = require('socket.io');
|
||||
const io = socketio(server);
|
||||
|
||||
import sharedsession = require('express-socket.io-session');
|
||||
|
||||
io.use(sharedsession(session));
|
||||
io.use(sharedsession(session, { autoSave: true, saveUninitialized: true }));
|
||||
io.use(sharedsession(session, cookieParser));
|
||||
io.use(sharedsession(session, cookieParser, { autoSave: true, saveUninitialized: true }));
|
||||
28
types/express-socket.io-session/index.d.ts
vendored
Normal file
28
types/express-socket.io-session/index.d.ts
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
// Type definitions for express-socket.io-session 1.3
|
||||
// Project: https://github.com/oskosk/express-socket.io-session
|
||||
// Definitions by: AylaJK <https://github.com/AylaJK>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
import socketio = require('socket.io');
|
||||
import express = require('express');
|
||||
|
||||
declare function sharedsession(
|
||||
expressSessionMiddleware: express.RequestHandler,
|
||||
cookieParserMiddleware: express.RequestHandler,
|
||||
options?: sharedsession.SharedSessionOptions): sharedsession.SocketIoSharedSessionMiddleware;
|
||||
|
||||
declare function sharedsession(
|
||||
expressSessionMiddleware: express.RequestHandler,
|
||||
options?: sharedsession.SharedSessionOptions): sharedsession.SocketIoSharedSessionMiddleware;
|
||||
|
||||
declare namespace sharedsession {
|
||||
interface SharedSessionOptions {
|
||||
autoSave?: boolean;
|
||||
saveUninitialized?: boolean;
|
||||
}
|
||||
|
||||
type SocketIoSharedSessionMiddleware = (socket: socketio.Socket, next: (err?: any) => void) => void;
|
||||
}
|
||||
|
||||
export = sharedsession;
|
||||
23
types/express-socket.io-session/tsconfig.json
Normal file
23
types/express-socket.io-session/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"express-socket.io-session-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/express-socket.io-session/tslint.json
Normal file
1
types/express-socket.io-session/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
0
types/firefox-webext-browser/index.d.ts
vendored
Executable file → Normal file
0
types/firefox-webext-browser/index.d.ts
vendored
Executable file → Normal file
@ -7,8 +7,9 @@ const manifest: Glue.Manifest = {
|
||||
},
|
||||
register: {
|
||||
plugins: [
|
||||
"./test-plugin.js",
|
||||
{
|
||||
plugin: "./test",
|
||||
plugin: "./test.js",
|
||||
routes: {
|
||||
prefix: "test"
|
||||
}
|
||||
|
||||
4
types/glue/index.d.ts
vendored
4
types/glue/index.d.ts
vendored
@ -24,8 +24,8 @@ export interface Plugin {
|
||||
export interface Manifest {
|
||||
server: ServerOptions;
|
||||
register?: {
|
||||
plugins: string[] | Plugin[]
|
||||
plugins: string[] | Plugin[] | Array<(string|Plugin)>
|
||||
};
|
||||
}
|
||||
|
||||
export function compose(manifest: Manifest, options?: Options): Server;
|
||||
export function compose(manifest: Manifest, options?: Options): Promise<Server>;
|
||||
|
||||
3
types/noble/index.d.ts
vendored
3
types/noble/index.d.ts
vendored
@ -1,7 +1,6 @@
|
||||
// Type definitions for noble
|
||||
// Project: https://github.com/sandeepmistry/noble
|
||||
// Definitions by: Seon-Wook Park <https://github.com/swook>
|
||||
// Hans Bakker <https://github.com/wind-rider>
|
||||
// Shantanu Bhadoria <https://github.com/shantanubhadoria>
|
||||
// Luke Libraro <https://github.com/lukel99>
|
||||
// Dan Chao <https://github.com/bioball>
|
||||
@ -42,7 +41,7 @@ export declare class Peripheral extends events.EventEmitter {
|
||||
advertisement: Advertisement;
|
||||
rssi: number;
|
||||
services: Service[];
|
||||
state: string;
|
||||
state: 'error' | 'connecting' | 'connected' | 'disconnecting' | 'disconnected';
|
||||
|
||||
connect(callback?: (error: string) => void): void;
|
||||
disconnect(callback?: () => void): void;
|
||||
|
||||
32
types/node-forge/index.d.ts
vendored
32
types/node-forge/index.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
// Type definitions for node-forge 0.7.2
|
||||
// Type definitions for node-forge 0.7.5
|
||||
// Project: https://github.com/digitalbazaar/forge
|
||||
// Definitions by: Seth Westphal <https://github.com/westy92>
|
||||
// Kay Schecker <https://github.com/flynetworks>
|
||||
@ -16,22 +16,22 @@ declare module "node-forge" {
|
||||
|
||||
namespace pem {
|
||||
|
||||
interface EncodeOptions {
|
||||
maxline?: number;
|
||||
}
|
||||
interface EncodeOptions {
|
||||
maxline?: number;
|
||||
}
|
||||
|
||||
interface ObjectPEM {
|
||||
type: string;
|
||||
body: Bytes;
|
||||
procType?: any;
|
||||
contentDomain?: any;
|
||||
dekInfo?: any;
|
||||
headers?: any[];
|
||||
}
|
||||
interface ObjectPEM {
|
||||
type: string;
|
||||
body: Bytes;
|
||||
procType?: any;
|
||||
contentDomain?: any;
|
||||
dekInfo?: any;
|
||||
headers?: any[];
|
||||
}
|
||||
|
||||
function encode(msg: ObjectPEM, options?: EncodeOptions): string;
|
||||
function decode(str: string): ObjectPEM[];
|
||||
}
|
||||
function encode(msg: ObjectPEM, options?: EncodeOptions): string;
|
||||
function decode(str: string): ObjectPEM[];
|
||||
}
|
||||
|
||||
namespace pki {
|
||||
|
||||
@ -43,7 +43,9 @@ declare module "node-forge" {
|
||||
privateKey: Key;
|
||||
}
|
||||
|
||||
function pemToDer(pem: PEM): util.ByteStringBuffer;
|
||||
function privateKeyToPem(key: Key, maxline?: number): PEM;
|
||||
function privateKeyInfoToPem(key: Key, maxline?: number): PEM;
|
||||
function publicKeyToPem(key: Key, maxline?: number): PEM;
|
||||
function publicKeyFromPem(pem: PEM): Key;
|
||||
function privateKeyFromPem(pem: PEM): Key;
|
||||
|
||||
@ -8,6 +8,8 @@ let x: string = forge.ssh.privateKeyToOpenSSH(key);
|
||||
let pemKey: forge.pki.PEM = publicKeyPem;
|
||||
let publicKeyRsa = forge.pki.publicKeyFromPem(pemKey);
|
||||
let privateKeyRsa = forge.pki.privateKeyFromPem(privateKeyPem);
|
||||
let privateKeyRsa2 = forge.pki.privateKeyInfoToPem(privateKeyPem);
|
||||
let byteBufferString = forge.pki.pemToDer(privateKeyRsa);
|
||||
let certPem = forge.pki.certificateFromPem(pemKey);
|
||||
let cert = forge.pki.createCertificate();
|
||||
|
||||
|
||||
3
types/node-red/index.d.ts
vendored
3
types/node-red/index.d.ts
vendored
@ -215,5 +215,6 @@ export interface Nodes {
|
||||
* @param constructor - the constructor function for this node type
|
||||
* @param opts - optional additional options for the node
|
||||
*/
|
||||
registerType(type: string, constructor: (props: NodeProperties) => any, opts?: any): void;
|
||||
// tslint:disable-next-line no-unnecessary-generics
|
||||
registerType<T extends NodeProperties>(type: string, constructor: (props: T) => any, opts?: any): void;
|
||||
}
|
||||
|
||||
83
types/node/index.d.ts
vendored
83
types/node/index.d.ts
vendored
@ -23,6 +23,7 @@
|
||||
// Mohsen Azimi <https://github.com/mohsen1>
|
||||
// Hoàng Văn Khải <https://github.com/KSXGitHub>
|
||||
// Alexander T. <https://github.com/a-tarasyuk>
|
||||
// Lishude <https://github.com/islishude>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/** inspector module types */
|
||||
@ -560,6 +561,7 @@ declare namespace NodeJS {
|
||||
on(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
once(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
off(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
removeAllListeners(event?: string | symbol): this;
|
||||
setMaxListeners(n: number): this;
|
||||
getMaxListeners(): number;
|
||||
@ -1003,7 +1005,8 @@ declare module "events" {
|
||||
|
||||
namespace internal {
|
||||
export class EventEmitter extends internal {
|
||||
static listenerCount(emitter: EventEmitter, event: string | symbol): number; // deprecated
|
||||
/** @deprecated since v4.0.0 */
|
||||
static listenerCount(emitter: EventEmitter, event: string | symbol): number;
|
||||
static defaultMaxListeners: number;
|
||||
|
||||
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
@ -1012,6 +1015,7 @@ declare module "events" {
|
||||
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
off(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
removeAllListeners(event?: string | symbol): this;
|
||||
setMaxListeners(n: number): this;
|
||||
getMaxListeners(): number;
|
||||
@ -2253,33 +2257,33 @@ declare module "child_process" {
|
||||
|
||||
export function execFile(file: string): ChildProcess;
|
||||
export function execFile(file: string, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): ChildProcess;
|
||||
export function execFile(file: string, args: string[] | undefined | null): ChildProcess;
|
||||
export function execFile(file: string, args: string[] | undefined | null, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): ChildProcess;
|
||||
export function execFile(file: string, args?: ReadonlyArray<string> | null): ChildProcess;
|
||||
export function execFile(file: string, args: ReadonlyArray<string> | undefined | null, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): ChildProcess;
|
||||
|
||||
// no `options` definitely means stdout/stderr are `string`.
|
||||
export function execFile(file: string, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess;
|
||||
export function execFile(file: string, args: string[] | undefined | null, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess;
|
||||
export function execFile(file: string, args: ReadonlyArray<string> | undefined | null, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess;
|
||||
|
||||
// `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
|
||||
export function execFile(file: string, options: ExecFileOptionsWithBufferEncoding, callback: (error: Error | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess;
|
||||
export function execFile(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithBufferEncoding, callback: (error: Error | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess;
|
||||
export function execFile(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptionsWithBufferEncoding, callback: (error: Error | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess;
|
||||
|
||||
// `options` with well known `encoding` means stdout/stderr are definitely `string`.
|
||||
export function execFile(file: string, options: ExecFileOptionsWithStringEncoding, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess;
|
||||
export function execFile(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithStringEncoding, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess;
|
||||
export function execFile(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptionsWithStringEncoding, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess;
|
||||
|
||||
// `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
|
||||
// There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
|
||||
export function execFile(file: string, options: ExecFileOptionsWithOtherEncoding, callback: (error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess;
|
||||
export function execFile(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithOtherEncoding, callback: (error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess;
|
||||
export function execFile(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptionsWithOtherEncoding, callback: (error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess;
|
||||
|
||||
// `options` without an `encoding` means stdout/stderr are definitely `string`.
|
||||
export function execFile(file: string, options: ExecFileOptions, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess;
|
||||
export function execFile(file: string, args: string[] | undefined | null, options: ExecFileOptions, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess;
|
||||
export function execFile(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptions, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess;
|
||||
|
||||
// fallback if nothing else matches. Worst case is always `string | Buffer`.
|
||||
export function execFile(file: string, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null, callback: ((error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null): ChildProcess;
|
||||
export function execFile(file: string, args: string[] | undefined | null, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null, callback: ((error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null): ChildProcess;
|
||||
export function execFile(file: string, args: ReadonlyArray<string> | undefined | null, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null, callback: ((error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null): ChildProcess;
|
||||
|
||||
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
||||
export namespace execFile {
|
||||
@ -2308,7 +2312,7 @@ declare module "child_process" {
|
||||
gid?: number;
|
||||
windowsVerbatimArguments?: boolean;
|
||||
}
|
||||
export function fork(modulePath: string, args?: string[], options?: ForkOptions): ChildProcess;
|
||||
export function fork(modulePath: string, args?: ReadonlyArray<string>, options?: ForkOptions): ChildProcess;
|
||||
|
||||
export interface SpawnSyncOptions {
|
||||
cwd?: string;
|
||||
@ -2344,9 +2348,9 @@ declare module "child_process" {
|
||||
export function spawnSync(command: string, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
|
||||
export function spawnSync(command: string, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
|
||||
export function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns<Buffer>;
|
||||
export function spawnSync(command: string, args?: string[], options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
|
||||
export function spawnSync(command: string, args?: string[], options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
|
||||
export function spawnSync(command: string, args?: string[], options?: SpawnSyncOptions): SpawnSyncReturns<Buffer>;
|
||||
export function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
|
||||
export function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
|
||||
export function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptions): SpawnSyncReturns<Buffer>;
|
||||
|
||||
export interface ExecSyncOptions {
|
||||
cwd?: string;
|
||||
@ -2396,9 +2400,9 @@ declare module "child_process" {
|
||||
export function execFileSync(command: string, options?: ExecFileSyncOptionsWithStringEncoding): string;
|
||||
export function execFileSync(command: string, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer;
|
||||
export function execFileSync(command: string, options?: ExecFileSyncOptions): Buffer;
|
||||
export function execFileSync(command: string, args?: string[], options?: ExecFileSyncOptionsWithStringEncoding): string;
|
||||
export function execFileSync(command: string, args?: string[], options?: ExecFileSyncOptionsWithBufferEncoding): Buffer;
|
||||
export function execFileSync(command: string, args?: string[], options?: ExecFileSyncOptions): Buffer;
|
||||
export function execFileSync(command: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptionsWithStringEncoding): string;
|
||||
export function execFileSync(command: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer;
|
||||
export function execFileSync(command: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptions): Buffer;
|
||||
}
|
||||
|
||||
declare module "url" {
|
||||
@ -5715,6 +5719,8 @@ declare module "crypto" {
|
||||
digest(): Buffer;
|
||||
digest(encoding: HexBase64Latin1Encoding): string;
|
||||
}
|
||||
|
||||
/** @deprecated since v10.0.0 use createCipheriv() */
|
||||
export function createCipher(algorithm: string, password: any): Cipher;
|
||||
export function createCipheriv(algorithm: string, key: any, iv: any): Cipher;
|
||||
export interface Cipher extends NodeJS.ReadWriteStream {
|
||||
@ -5728,6 +5734,7 @@ declare module "crypto" {
|
||||
getAuthTag(): Buffer;
|
||||
setAAD(buffer: Buffer): this;
|
||||
}
|
||||
/** @deprecated since v10.0.0 use createCipheriv() */
|
||||
export function createDecipher(algorithm: string, password: any): Decipher;
|
||||
export function createDecipheriv(algorithm: string, key: any, iv: any): Decipher;
|
||||
export interface Decipher extends NodeJS.ReadWriteStream {
|
||||
@ -5813,17 +5820,16 @@ declare module "crypto" {
|
||||
export function getCurves(): string[];
|
||||
export function getHashes(): string[];
|
||||
export interface ECDH {
|
||||
convertKey(key: string | Buffer /*| TypedArray*/ | DataView, curve: string, inputEncoding?: string, outputEncoding?: string, format?: string): Buffer | string;
|
||||
generateKeys(): Buffer;
|
||||
generateKeys(encoding: HexBase64Latin1Encoding): string;
|
||||
generateKeys(encoding: HexBase64Latin1Encoding, format: ECDHKeyFormat): string;
|
||||
generateKeys(encoding: HexBase64Latin1Encoding, format?: ECDHKeyFormat): string;
|
||||
computeSecret(other_public_key: Buffer): Buffer;
|
||||
computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer;
|
||||
computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding, output_encoding: HexBase64Latin1Encoding): string;
|
||||
getPrivateKey(): Buffer;
|
||||
getPrivateKey(encoding: HexBase64Latin1Encoding): string;
|
||||
getPublicKey(): Buffer;
|
||||
getPublicKey(encoding: HexBase64Latin1Encoding): string;
|
||||
getPublicKey(encoding: HexBase64Latin1Encoding, format: ECDHKeyFormat): string;
|
||||
getPublicKey(encoding: HexBase64Latin1Encoding, format?: ECDHKeyFormat): string;
|
||||
setPrivateKey(private_key: Buffer): void;
|
||||
setPrivateKey(private_key: string, encoding: HexBase64Latin1Encoding): void;
|
||||
}
|
||||
@ -6220,6 +6226,38 @@ declare module "util" {
|
||||
export function isWeakSet(object: any): object is WeakSet<any>;
|
||||
export function isWebAssemblyCompiledModule(object: any): boolean;
|
||||
}
|
||||
|
||||
export class TextDecoder {
|
||||
readonly encoding: string;
|
||||
readonly fatal: boolean;
|
||||
readonly ignoreBOM: boolean;
|
||||
constructor(
|
||||
encoding?: string,
|
||||
options?: { fatal?: boolean; ignoreBOM?: boolean }
|
||||
);
|
||||
decode(
|
||||
input?:
|
||||
Int8Array
|
||||
| Int16Array
|
||||
| Int32Array
|
||||
| Uint8Array
|
||||
| Uint16Array
|
||||
| Uint32Array
|
||||
| Uint8ClampedArray
|
||||
| Float32Array
|
||||
| Float64Array
|
||||
| DataView
|
||||
| ArrayBuffer
|
||||
| null,
|
||||
options?: { stream?: boolean }
|
||||
): string;
|
||||
}
|
||||
|
||||
export class TextEncoder {
|
||||
readonly encoding: string;
|
||||
constructor();
|
||||
encode(input?: string): Uint8Array;
|
||||
}
|
||||
}
|
||||
|
||||
declare module "assert" {
|
||||
@ -6240,11 +6278,16 @@ declare module "assert" {
|
||||
}
|
||||
|
||||
export function fail(message: string): never;
|
||||
/** @deprecated since v10.0.0 */
|
||||
export function fail(actual: any, expected: any, message?: string, operator?: string): never;
|
||||
export function ok(value: any, message?: string): void;
|
||||
/** @deprecated use strictEqual() */
|
||||
export function equal(actual: any, expected: any, message?: string): void;
|
||||
/** @deprecated use notStrictEqual() */
|
||||
export function notEqual(actual: any, expected: any, message?: string): void;
|
||||
/** @deprecated use deepStrictEqual() */
|
||||
export function deepEqual(actual: any, expected: any, message?: string): void;
|
||||
/** @deprecated use notDeepStrictEqual() */
|
||||
export function notDeepEqual(acutal: any, expected: any, message?: string): void;
|
||||
export function strictEqual(actual: any, expected: any, message?: string): void;
|
||||
export function notStrictEqual(actual: any, expected: any, message?: string): void;
|
||||
|
||||
@ -109,6 +109,7 @@ namespace events_tests {
|
||||
result = emitter.prependListener(event, listener);
|
||||
result = emitter.prependOnceListener(event, listener);
|
||||
result = emitter.removeListener(event, listener);
|
||||
result = emitter.off(event, listener);
|
||||
result = emitter.removeAllListeners();
|
||||
result = emitter.removeAllListeners(event);
|
||||
result = emitter.setMaxListeners(42);
|
||||
@ -857,6 +858,35 @@ namespace util_tests {
|
||||
|
||||
// util.isDeepStrictEqual
|
||||
util.isDeepStrictEqual({foo: 'bar'}, {foo: 'bar'});
|
||||
|
||||
// util.TextDecoder()
|
||||
var td = new util.TextDecoder();
|
||||
new util.TextDecoder("utf-8");
|
||||
new util.TextDecoder("utf-8", { fatal: true });
|
||||
new util.TextDecoder("utf-8", { fatal: true, ignoreBOM: true });
|
||||
var ignoreBom: boolean = td.ignoreBOM;
|
||||
var fatal: boolean = td.fatal;
|
||||
var encoding: string = td.encoding;
|
||||
td.decode(new Int8Array(1));
|
||||
td.decode(new Int16Array(1));
|
||||
td.decode(new Int32Array(1));
|
||||
td.decode(new Uint8Array(1));
|
||||
td.decode(new Uint16Array(1));
|
||||
td.decode(new Uint32Array(1));
|
||||
td.decode(new Uint8ClampedArray(1));
|
||||
td.decode(new Float32Array(1));
|
||||
td.decode(new Float64Array(1));
|
||||
td.decode(new DataView(new Int8Array(1).buffer));
|
||||
td.decode(new ArrayBuffer(1));
|
||||
td.decode(null);
|
||||
td.decode(null, { stream: true });
|
||||
td.decode(new Int8Array(1), { stream: true });
|
||||
var decode: string = td.decode(new Int8Array(1));
|
||||
|
||||
// util.TextEncoder()
|
||||
var te = new util.TextEncoder();
|
||||
var teEncoding: string = te.encoding;
|
||||
var teEncodeRes: Uint8Array = te.encode("TextEncoder");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
2
types/node/v8/index.d.ts
vendored
2
types/node/v8/index.d.ts
vendored
@ -5588,7 +5588,7 @@ declare module "util" {
|
||||
);
|
||||
decode(
|
||||
input?:
|
||||
| Int8Array
|
||||
Int8Array
|
||||
| Int16Array
|
||||
| Int32Array
|
||||
| Uint8Array
|
||||
|
||||
33
types/node/v9/index.d.ts
vendored
33
types/node/v9/index.d.ts
vendored
@ -24,6 +24,7 @@
|
||||
// Mohsen Azimi <https://github.com/mohsen1>
|
||||
// Hoàng Văn Khải <https://github.com/KSXGitHub>
|
||||
// Alexander T. <https://github.com/a-tarasyuk>
|
||||
// Lishude <https://github.com/islishude>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/** inspector module types */
|
||||
@ -5659,6 +5660,38 @@ declare module "util" {
|
||||
export namespace promisify {
|
||||
const custom: symbol;
|
||||
}
|
||||
|
||||
export class TextDecoder {
|
||||
readonly encoding: string;
|
||||
readonly fatal: boolean;
|
||||
readonly ignoreBOM: boolean;
|
||||
constructor(
|
||||
encoding?: string,
|
||||
options?: { fatal?: boolean; ignoreBOM?: boolean }
|
||||
);
|
||||
decode(
|
||||
input?:
|
||||
Int8Array
|
||||
| Int16Array
|
||||
| Int32Array
|
||||
| Uint8Array
|
||||
| Uint16Array
|
||||
| Uint32Array
|
||||
| Uint8ClampedArray
|
||||
| Float32Array
|
||||
| Float64Array
|
||||
| DataView
|
||||
| ArrayBuffer
|
||||
| null,
|
||||
options?: { stream?: boolean }
|
||||
): string;
|
||||
}
|
||||
|
||||
export class TextEncoder {
|
||||
readonly encoding: string;
|
||||
constructor();
|
||||
encode(input?: string): Uint8Array;
|
||||
}
|
||||
}
|
||||
|
||||
declare module "assert" {
|
||||
|
||||
@ -854,6 +854,35 @@ namespace util_tests {
|
||||
|
||||
// util.isDeepStrictEqual
|
||||
util.isDeepStrictEqual({foo: 'bar'}, {foo: 'bar'});
|
||||
|
||||
// util.TextDecoder()
|
||||
var td = new util.TextDecoder();
|
||||
new util.TextDecoder("utf-8");
|
||||
new util.TextDecoder("utf-8", { fatal: true });
|
||||
new util.TextDecoder("utf-8", { fatal: true, ignoreBOM: true });
|
||||
var ignoreBom: boolean = td.ignoreBOM;
|
||||
var fatal: boolean = td.fatal;
|
||||
var encoding: string = td.encoding;
|
||||
td.decode(new Int8Array(1));
|
||||
td.decode(new Int16Array(1));
|
||||
td.decode(new Int32Array(1));
|
||||
td.decode(new Uint8Array(1));
|
||||
td.decode(new Uint16Array(1));
|
||||
td.decode(new Uint32Array(1));
|
||||
td.decode(new Uint8ClampedArray(1));
|
||||
td.decode(new Float32Array(1));
|
||||
td.decode(new Float64Array(1));
|
||||
td.decode(new DataView(new Int8Array(1).buffer));
|
||||
td.decode(new ArrayBuffer(1));
|
||||
td.decode(null);
|
||||
td.decode(null, { stream: true });
|
||||
td.decode(new Int8Array(1), { stream: true });
|
||||
var decode: string = td.decode(new Int8Array(1));
|
||||
|
||||
// util.TextEncoder()
|
||||
var te = new util.TextEncoder();
|
||||
var teEncoding: string = te.encoding;
|
||||
var teEncodeRes: Uint8Array = te.encode("TextEncoder");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
9
types/passport-oauth2/index.d.ts
vendored
9
types/passport-oauth2/index.d.ts
vendored
@ -1,15 +1,24 @@
|
||||
// Type definitions for passport-oauth2 1.4
|
||||
// Project: https://github.com/jaredhanson/passport-oauth2#readme
|
||||
// Definitions by: Pasi Eronen <https://github.com/pasieronen>
|
||||
// Wang Zishi <https://github.com/WangZishi>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
import { Request } from 'express';
|
||||
import { Strategy } from 'passport';
|
||||
import { OAuth2 } from 'oauth';
|
||||
|
||||
declare class OAuth2Strategy extends Strategy {
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* NOTE: The _oauth2 property is considered "protected". Subclasses are
|
||||
* allowed to use it when making protected resource requests to retrieve
|
||||
* the user profile.
|
||||
*/
|
||||
protected _oauth2: OAuth2;
|
||||
|
||||
constructor(options: OAuth2Strategy.StrategyOptions, verify: OAuth2Strategy.VerifyFunction);
|
||||
constructor(options: OAuth2Strategy.StrategyOptionsWithRequest, verify: OAuth2Strategy.VerifyFunctionWithRequest);
|
||||
|
||||
|
||||
@ -24,11 +24,11 @@ const strategy1: OAuth2Strategy = new OAuth2Strategy(strategyOptions1, verifyFun
|
||||
const strategy2: Strategy = new OAuth2Strategy(strategyOptions1, verifyFunction2);
|
||||
|
||||
function verifyFunction3(_req: Request, _accessToken: string, _refreshToken: string, _profile: any, verifyCallback: VerifyCallback) {
|
||||
verifyCallback(undefined, {userid: '1'});
|
||||
verifyCallback(undefined, { userid: '1' });
|
||||
}
|
||||
|
||||
function verifyFunction4(_req: Request, _accessToken: string, _refreshToken: string, _results: any, _profile: any, verifyCallback: VerifyCallback) {
|
||||
verifyCallback(undefined, {userid: '1'});
|
||||
verifyCallback(undefined, { userid: '1' });
|
||||
}
|
||||
|
||||
const strategyOptions2: StrategyOptionsWithRequest = {
|
||||
@ -49,3 +49,9 @@ const err1 = new AuthorizationError('Description', 'invalid_request', undefined)
|
||||
const err2 = new TokenError(undefined, 'invalid_request', undefined);
|
||||
|
||||
const err3 = new InternalOAuthError('Hello', {});
|
||||
|
||||
class MyStrategy extends OAuth2Strategy {
|
||||
useProtectedProperty() {
|
||||
this._oauth2.get('http://www.example.com/profile', 'token', 'http://www.example.com/callback');
|
||||
}
|
||||
}
|
||||
|
||||
1
types/pg/index.d.ts
vendored
1
types/pg/index.d.ts
vendored
@ -16,6 +16,7 @@ export interface ConnectionConfig {
|
||||
port?: number;
|
||||
host?: string;
|
||||
connectionString?: string;
|
||||
keepAlive?: boolean;
|
||||
}
|
||||
|
||||
export interface Defaults extends ConnectionConfig {
|
||||
|
||||
@ -9,6 +9,7 @@ const client = new Client({
|
||||
port: 5334,
|
||||
user: 'database-user',
|
||||
password: 'secretpassword!!',
|
||||
keepAlive: true,
|
||||
});
|
||||
client.connect(err => {
|
||||
if (err) {
|
||||
@ -125,6 +126,7 @@ const pool = new Pool({
|
||||
max: 20,
|
||||
idleTimeoutMillis: 30000,
|
||||
connectionTimeoutMillis: 2000,
|
||||
keepAlive: false,
|
||||
});
|
||||
console.log(pool.totalCount);
|
||||
pool.connect((err, client, done) => {
|
||||
|
||||
5
types/react-content-loader/index.d.ts
vendored
5
types/react-content-loader/index.d.ts
vendored
@ -1,6 +1,7 @@
|
||||
// Type definitions for react-content-loader 2.0
|
||||
// Type definitions for react-content-loader 3.1
|
||||
// Project: https://github.com/danilowoz/react-content-loader
|
||||
// Definitions by: Alaa Masoud <https://github.com/alaatm>
|
||||
// Sam Walsh <https://github.com/samwalshnz>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.6
|
||||
|
||||
@ -14,6 +15,8 @@ export interface ContentLoaderProps {
|
||||
height?: number;
|
||||
primaryColor?: string;
|
||||
secondaryColor?: string;
|
||||
primaryOpacity?: number;
|
||||
secondaryOpacity?: number;
|
||||
preserveAspectRatio?: 'none' | 'xMinYMin meet' | 'xMidYMin meet' | 'xMaxYMin meet' | 'xMinYMid meet' | 'xMidYMid meet' | 'xMaxYMid meet' |
|
||||
'xMinYMax meet' | 'xMidYMax meet' | 'xMaxYMax meet' | 'xMinYMin slice' | 'xMidYMin slice' | 'xMaxYMin slice' | 'xMinYMid slice' |
|
||||
'xMidYMid slice' | 'xMaxYMid slice' | 'xMinYMax slice' | 'xMidYMax slice' | 'xMaxYMax slice';
|
||||
|
||||
@ -10,6 +10,8 @@ const CustomComponent = () => {
|
||||
width={100}
|
||||
primaryColor="#333"
|
||||
secondaryColor="#999"
|
||||
primaryOpacity={0.06}
|
||||
secondaryOpacity={0.12}
|
||||
preserveAspectRatio="xMinYMin meet"
|
||||
className="my-class"
|
||||
>
|
||||
|
||||
10
types/react-data-grid/index.d.ts
vendored
10
types/react-data-grid/index.d.ts
vendored
@ -203,6 +203,16 @@ declare namespace AdazzleReactDataGrid {
|
||||
isSelectedKey?: string;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* A custom formatter for the select all checkbox cell
|
||||
* @default react-data-grid/src/formatters/SelectAll.js
|
||||
*/
|
||||
selectAllRenderer?: React.ComponentClass<any> | React.StatelessComponent<any>;
|
||||
/**
|
||||
* A custom formatter for select row column
|
||||
* @default AdazzleReactDataGridPlugins.Editors.CheckboxEditor
|
||||
*/
|
||||
rowActionsCell?: React.ComponentClass<any> | React.StatelessComponent<any>;
|
||||
/**
|
||||
* An event function called when a row is clicked.
|
||||
* Clicking the header row will trigger a call with -1 for the rowIdx.
|
||||
|
||||
@ -31,6 +31,35 @@ class CustomFilterHeaderCell extends React.Component<any, any> {
|
||||
}
|
||||
}
|
||||
|
||||
class CustomRowSelectorCell extends ReactDataGridPlugins.Editors.CheckboxEditor {
|
||||
render(){
|
||||
return super.render();
|
||||
}
|
||||
}
|
||||
|
||||
export interface ICustomSelectAllProps {
|
||||
onChange: any;
|
||||
inputRef: any;
|
||||
}
|
||||
|
||||
class CustomSelectAll extends React.Component<ICustomSelectAllProps> {
|
||||
render() {
|
||||
return (
|
||||
<div className='react-grid-checkbox-container checkbox-align'>
|
||||
<input
|
||||
className='react-grid-checkbox'
|
||||
type='checkbox'
|
||||
name='select-all-checkbox'
|
||||
id='select-all-checkbox'
|
||||
ref={this.props.inputRef}
|
||||
onChange={this.props.onChange}
|
||||
/>
|
||||
<label htmlFor='select-all-checkbox' className='react-grid-checkbox-label'></label>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
faker.locale = 'en_GB';
|
||||
|
||||
function createFakeRowObjectData(index:number):Object {
|
||||
@ -327,6 +356,8 @@ class Example extends React.Component<any, any> {
|
||||
keys: {rowKey: 'id', values: selectedRows}
|
||||
}
|
||||
}}
|
||||
rowActionsCell={CustomRowSelectorCell}
|
||||
selectAllRenderer={CustomSelectAll}
|
||||
onRowClick={this.onRowClick}
|
||||
/>
|
||||
|
||||
|
||||
31
types/react-native/index.d.ts
vendored
31
types/react-native/index.d.ts
vendored
@ -800,12 +800,6 @@ export interface TextStyle extends TextStyleIOS, TextStyleAndroid, ViewStyle {
|
||||
}
|
||||
|
||||
export interface TextPropsIOS {
|
||||
/**
|
||||
* Specifies whether fonts should scale to respect Text Size accessibility setting on iOS. The
|
||||
* default is `true`.
|
||||
*/
|
||||
allowFontScaling?: boolean;
|
||||
|
||||
/**
|
||||
* Specifies whether font should be scaled down automatically to fit given style constraints.
|
||||
*/
|
||||
@ -843,6 +837,12 @@ export interface TextPropsAndroid {
|
||||
|
||||
// https://facebook.github.io/react-native/docs/text.html#props
|
||||
export interface TextProps extends TextPropsIOS, TextPropsAndroid, AccessibilityProps {
|
||||
/**
|
||||
* Specifies whether fonts should scale to respect Text Size accessibility settings.
|
||||
* The default is `true`.
|
||||
*/
|
||||
allowFontScaling?: boolean;
|
||||
|
||||
/**
|
||||
* This can be one of the following values:
|
||||
*
|
||||
@ -1088,6 +1088,12 @@ export type ReturnKeyTypeOptions = ReturnKeyType | ReturnKeyTypeAndroid | Return
|
||||
*/
|
||||
export interface TextInputProps
|
||||
extends ViewProps, TextInputIOSProps, TextInputAndroidProps, AccessibilityProps {
|
||||
/**
|
||||
* Specifies whether fonts should scale to respect Text Size accessibility settings.
|
||||
* The default is `true`.
|
||||
*/
|
||||
allowFontScaling?: boolean;
|
||||
|
||||
/**
|
||||
* Can tell TextInput to automatically capitalize certain characters.
|
||||
* characters: all characters,
|
||||
@ -3837,6 +3843,19 @@ export interface SectionListProps<ItemT> extends ScrollViewProps {
|
||||
*/
|
||||
initialNumToRender?: number;
|
||||
|
||||
/**
|
||||
* Called once when the scroll position gets within onEndReachedThreshold of the rendered content.
|
||||
*/
|
||||
onEndReached?: ((info: { distanceFromEnd: number }) => void) | null;
|
||||
|
||||
/**
|
||||
* How far from the end (in units of visible length of the list) the bottom edge of the
|
||||
* list must be from the end of the content to trigger the `onEndReached` callback.
|
||||
* Thus a value of 0.5 will trigger `onEndReached` when the end of the content is
|
||||
* within half the visible length of the list.
|
||||
*/
|
||||
onEndReachedThreshold?: number | null;
|
||||
|
||||
/**
|
||||
* Used to extract a unique key for a given item at the specified index. Key is used for caching
|
||||
* and as the react key to track item re-ordering. The default extractor checks `item.key`, then
|
||||
|
||||
3
types/read-package-tree/index.d.ts
vendored
3
types/read-package-tree/index.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
// Type definitions for read-package-tree 5.1
|
||||
// Type definitions for read-package-tree 5.2
|
||||
// Project: https://github.com/npm/read-package-tree
|
||||
// Definitions by: Melvin Groenhoff <https://github.com/mgroenhoff>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@ -9,6 +9,7 @@ declare function rpt(root: string, filterWith: (node: rpt.Node, kidName: string)
|
||||
declare namespace rpt {
|
||||
class Node {
|
||||
id: number;
|
||||
name: string;
|
||||
package: any;
|
||||
children: Node[];
|
||||
parent: Node | null;
|
||||
|
||||
7
types/rebass/index.d.ts
vendored
7
types/rebass/index.d.ts
vendored
@ -264,6 +264,13 @@ export interface HeadingLinkProps extends BaseProps<HeadingLinkClass> {
|
||||
type HeadingLinkClass = React.StatelessComponent<HeadingLinkProps>
|
||||
export declare const HeadingLink: HeadingLinkClass;
|
||||
|
||||
export interface LinkProps extends BaseProps<LinkClass> {
|
||||
is?: string | Object | Function;
|
||||
href?: string;
|
||||
}
|
||||
type LinkClass = React.StatelessComponent<LinkProps>
|
||||
export declare const Link: LinkClass;
|
||||
|
||||
export interface InlineFormProps extends BaseProps<InlineFormClass> {
|
||||
label?: string;
|
||||
name?: string;
|
||||
|
||||
2
types/three/three-trackballcontrols.d.ts
vendored
2
types/three/three-trackballcontrols.d.ts
vendored
@ -31,6 +31,8 @@ export class TrackballControls extends EventDispatcher {
|
||||
|
||||
reset(): void;
|
||||
|
||||
dispose(): void;
|
||||
|
||||
checkDistances(): void;
|
||||
|
||||
zoomCamera(): void;
|
||||
|
||||
126
types/video.js/index.d.ts
vendored
126
types/video.js/index.d.ts
vendored
@ -4,6 +4,7 @@
|
||||
// Simon Clériot <https://github.com/scleriot>
|
||||
// Sean Bennett <https://github.com/SWBennett06>
|
||||
// Christoph Wagner <https://github.com/IgelCampus>
|
||||
// Gio Freitas <https://github.com/giofreitas>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
// The Video.js API allows you to interact with the video through
|
||||
@ -15,6 +16,9 @@ export = videojs;
|
||||
export as namespace videojs;
|
||||
|
||||
declare namespace videojs {
|
||||
const getComponent: typeof Component.getComponent;
|
||||
const registerComponent: typeof Component.registerComponent;
|
||||
|
||||
interface PlayerOptions {
|
||||
techOrder?: string[];
|
||||
sourceOrder?: boolean;
|
||||
@ -35,6 +39,7 @@ declare namespace videojs {
|
||||
language?: string;
|
||||
notSupportedMessage?: string;
|
||||
plugins?: any;
|
||||
poster?: string;
|
||||
}
|
||||
|
||||
interface Source {
|
||||
@ -42,39 +47,102 @@ declare namespace videojs {
|
||||
src: string;
|
||||
}
|
||||
|
||||
interface Player {
|
||||
play(): Player;
|
||||
pause(): Player;
|
||||
paused(): boolean;
|
||||
src(newSource: string | Source | Source[]): Player;
|
||||
currentTime(seconds: number): Player;
|
||||
currentTime(): number;
|
||||
duration(): number;
|
||||
interface Dimensions {
|
||||
width: number;
|
||||
height: number;
|
||||
}
|
||||
|
||||
class Component {
|
||||
constructor(player: Player, options: any);
|
||||
|
||||
static getComponent(name: 'Player'|'player'): typeof Player;
|
||||
static getComponent(name: 'Component'|'component' | string): typeof Component;
|
||||
static registerComponent(name: string, ComponentToRegister: typeof Component): typeof Component;
|
||||
|
||||
$(selector: string, context?: string|Element): Element;
|
||||
$$(selector: string, context?: string|Element): NodeList;
|
||||
addClass(classToAdd: string): void;
|
||||
blur(): void;
|
||||
cancelAnimationFrame(id: number): number;
|
||||
children(): Component[];
|
||||
clearInterval(intervalId: number): number;
|
||||
clearTimeout(timeoutId: number): number;
|
||||
contentEl(): Element;
|
||||
createEl(tagNameopt?: string, properties?: any, attributes?: any): Element;
|
||||
currentDimension(widthOrHeight: 'width'|'height'): number;
|
||||
currentDimensions(): Dimensions;
|
||||
currentHeight(): number;
|
||||
currentWidth(): number;
|
||||
dimension(widthOrHeight: 'width'|'height'): number;
|
||||
dimension(widthOrHeight: 'width'|'height', num: string|number, skipListenersopt?: boolean): void;
|
||||
dimensions(width: string|number, height: string|number): void;
|
||||
dispose(): void;
|
||||
el(): Element;
|
||||
enableTouchActivity(): void;
|
||||
focus(): void;
|
||||
getAttribute(attribute: string): string|null;
|
||||
getChild(name: string): Component|undefined;
|
||||
getChildById(id: string): Component|undefined;
|
||||
hasClass(classToCheck: string): boolean;
|
||||
height(): number|string;
|
||||
height(num: number|string, skipListeners?: boolean): void;
|
||||
hide(): void;
|
||||
id(): string;
|
||||
initChildren(): void;
|
||||
localize(key: string, tokens?: string[], defaultValue?: string): string;
|
||||
name(): string;
|
||||
options(obj: any): any;
|
||||
player(): Player;
|
||||
ready(callback: (this: this) => void): this;
|
||||
removeAttribute(attribute: string): void;
|
||||
removeChild(component: Component): void;
|
||||
removeClass(classToRemove: string): void;
|
||||
requestAnimationFrame(fn: () => void): number;
|
||||
setAttribute(attribute: string, value: string): void;
|
||||
setInterval(fn: () => void, interval: number): number;
|
||||
setTimeout(fn: () => void, timeout: number): number;
|
||||
show(): void;
|
||||
toggleClass(classToToggle: string, predicate?: string): void;
|
||||
triggerReady(): void;
|
||||
width(): string | number;
|
||||
width(num: number, skipListeners?: number): void;
|
||||
}
|
||||
|
||||
class Player extends Component {
|
||||
autoplay(value?: boolean): string;
|
||||
addRemoteTextTrack(options: {}): HTMLTrackElement;
|
||||
buffered(): TimeRanges;
|
||||
bufferedPercent(): number;
|
||||
volume(percentAsDecimal: number): TimeRanges;
|
||||
volume(): number;
|
||||
width(): number;
|
||||
width(pixels: number): Player;
|
||||
height(): number;
|
||||
height(pixels: number): Player;
|
||||
size(width: number, height: number): Player;
|
||||
requestFullScreen(): Player;
|
||||
cancelFullScreen(): Player;
|
||||
requestFullscreen(): Player;
|
||||
exitFullscreen(): Player;
|
||||
ready(callback: (this: Player) => void): Player;
|
||||
on(eventName: string, callback: (eventObject: Event) => void): void;
|
||||
off(eventName?: string, callback?: (eventObject: Event) => void): void;
|
||||
dispose(): void;
|
||||
addRemoteTextTrack(options: {}): HTMLTrackElement;
|
||||
removeRemoteTextTrack(track: HTMLTrackElement): void;
|
||||
poster(val?: string): string | Player;
|
||||
playbackRate(rate?: number): number;
|
||||
controls(bool?: boolean): boolean;
|
||||
muted(muted?: boolean): boolean;
|
||||
preload(value?: boolean): string;
|
||||
autoplay(value?: boolean): string;
|
||||
currentTime(): number;
|
||||
currentTime(seconds: number): Player;
|
||||
duration(): number;
|
||||
exitFullscreen(): Player;
|
||||
height(): number;
|
||||
height(num: number): void;
|
||||
languageSwitch(options: any): void;
|
||||
loop(value?: boolean): string;
|
||||
muted(muted?: boolean): boolean;
|
||||
off(eventName?: string, callback?: (eventObject: Event) => void): void;
|
||||
on(eventName: string, callback: (eventObject: Event) => void): void;
|
||||
pause(): Player;
|
||||
paused(): boolean;
|
||||
play(): Player;
|
||||
playbackRate(rate?: number): number;
|
||||
poster(val?: string): string | Player;
|
||||
preload(value?: boolean): string;
|
||||
removeRemoteTextTrack(track: HTMLTrackElement): void;
|
||||
requestFullScreen(): Player;
|
||||
size(width: number, height: number): Player;
|
||||
src(newSource: string | Source | Source[]): Player;
|
||||
volume(): number;
|
||||
volume(percentAsDecimal: number): TimeRanges;
|
||||
width(): number;
|
||||
width(num: number): void;
|
||||
}
|
||||
|
||||
namespace dom {
|
||||
function appendContent(element: Element, content: any): Element;
|
||||
}
|
||||
}
|
||||
|
||||
21
types/webpack/index.d.ts
vendored
21
types/webpack/index.d.ts
vendored
@ -648,6 +648,27 @@ declare namespace webpack {
|
||||
portableRecords?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
namespace debug {
|
||||
interface ProfilingPluginOptions {
|
||||
/** A relative path to a custom output file (json) */
|
||||
outputPath?: string;
|
||||
}
|
||||
/**
|
||||
* Generate Chrome profile file which includes timings of plugins execution. Outputs `events.json` file by
|
||||
* default. It is possible to provide custom file path using `outputPath` option.
|
||||
*
|
||||
* In order to view the profile file:
|
||||
* * Run webpack with ProfilingPlugin.
|
||||
* * Go to Chrome, open the Profile Tab.
|
||||
* * Drag and drop generated file (events.json by default) into the profiler.
|
||||
*
|
||||
* It will then display timeline stats and calls per plugin!
|
||||
*/
|
||||
class ProfilingPlugin extends Plugin {
|
||||
constructor(options?: ProfilingPluginOptions);
|
||||
}
|
||||
}
|
||||
namespace compilation {
|
||||
class Asset {
|
||||
}
|
||||
|
||||
@ -732,3 +732,10 @@ configuration = {
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
let profiling = new webpack.debug.ProfilingPlugin();
|
||||
profiling = new webpack.debug.ProfilingPlugin({ outputPath: './path.json' });
|
||||
|
||||
configuration = {
|
||||
plugins: [profiling]
|
||||
};
|
||||
|
||||
20
types/xrm/index.d.ts
vendored
20
types/xrm/index.d.ts
vendored
@ -1121,13 +1121,13 @@ declare namespace Xrm {
|
||||
* @deprecated Use {@link Xrm.WebApi.retrieveRecord} instead.
|
||||
* @see {@link https://docs.microsoft.com/en-us/dynamics365/get-started/whats-new/customer-engagement/important-changes-coming#some-client-apis-are-deprecated External Link: Deprecated Client APIs}
|
||||
*/
|
||||
retrieveRecord(entityType: string, id: string, options: string): Async.PromiseLike<Async.OfflineOperationSuccessCallbackObject>;
|
||||
retrieveRecord(entityType: string, id: string, options?: string): Async.PromiseLike<Async.OfflineOperationSuccessCallbackObject>;
|
||||
|
||||
/**
|
||||
* Retrieves a collection of entity records in mobile clients while working in the offline mode.
|
||||
*
|
||||
* @param entityType The logical name of the entity.
|
||||
* @param options (Optional) The logical name of the enti
|
||||
* @param options (Optional) The logical name of the entity
|
||||
* @param maxPageSize (Optional) A positive number to indicates the number of entity records to be returned per page.
|
||||
* * If you do not specify this parameter, the default value is passed as 5000.
|
||||
* * If the number of records being retrieved is more than maxPageSize, an @odata.nextLink property
|
||||
@ -1144,7 +1144,7 @@ declare namespace Xrm {
|
||||
* @deprecated Use {@link Xrm.WebApi.retrieveMultipleRecords} instead.
|
||||
* @see {@link https://docs.microsoft.com/en-us/dynamics365/get-started/whats-new/customer-engagement/important-changes-coming#some-client-apis-are-deprecated External Link: Deprecated Client APIs}
|
||||
*/
|
||||
retrieveMultipleRecords(entityType: string, options: string, maxPageSize: number): Async.PromiseLike<Array<{ [key: string]: any }>>;
|
||||
retrieveMultipleRecords(entityType: string, options?: string, maxPageSize?: number): Async.PromiseLike<Array<{ [key: string]: any }>>;
|
||||
|
||||
/**
|
||||
* Updates an entity record in mobile clients while working in the offline mode.
|
||||
@ -2100,7 +2100,7 @@ declare namespace Xrm {
|
||||
* * optionset
|
||||
* * string
|
||||
*/
|
||||
getAttributeType(): string;
|
||||
getAttributeType(): AttributeType;
|
||||
|
||||
/**
|
||||
* Gets the attribute format.
|
||||
@ -3541,9 +3541,9 @@ declare namespace Xrm {
|
||||
|
||||
/**
|
||||
* Saves the record with the given save mode.
|
||||
* @param saveMode (Optional) the save mode to save, as either "saveandclose" or "saveandnew".
|
||||
* @param saveMode (Optional) the save mode to save, as either "saveandclose" or "saveandnew". If no parameter is included in the method, the record will simply be saved.
|
||||
*/
|
||||
save(saveMode: EntitySaveMode): void;
|
||||
save(saveMode?: EntitySaveMode): void;
|
||||
|
||||
/**
|
||||
* The collection of attributes for the record.
|
||||
@ -3692,14 +3692,14 @@ declare namespace Xrm {
|
||||
* Returns all process instances for the entity record that the calling user has access to.
|
||||
* @param callbackFunction (Optional) a function to call when the operation is complete.
|
||||
*/
|
||||
getProcessInstances(callbackFunction: GetProcessInstancesDelegate): void;
|
||||
getProcessInstances(callbackFunction?: GetProcessInstancesDelegate): void;
|
||||
|
||||
/**
|
||||
* Sets a process instance as the active instance
|
||||
* @param processInstanceId The Id of the process instance to make the active instance.
|
||||
* @param callbackFunction (Optional) a function to call when the operation is complete.
|
||||
*/
|
||||
setActiveProcessInstance(processInstanceId: string, callbackFunction: SetProcessInstanceDelegate): void;
|
||||
setActiveProcessInstance(processInstanceId: string, callbackFunction?: SetProcessInstanceDelegate): void;
|
||||
|
||||
/**
|
||||
* Returns a Stage object representing the active stage.
|
||||
@ -3837,7 +3837,7 @@ declare namespace Xrm {
|
||||
* @param status The new status for the process
|
||||
* @param callbackFunction (Optional) a function to call when the operation is complete.
|
||||
*/
|
||||
setStatus(status: ProcessStatus, callbackFunction: ProcessSetStatusDelegate): void;
|
||||
setStatus(status: ProcessStatus, callbackFunction?: ProcessSetStatusDelegate): void;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -4786,7 +4786,7 @@ declare namespace Xrm {
|
||||
* @returns On success, returns a promise containing a JSON object with the retrieved attributes and their values.
|
||||
* @see {@link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-webapi/retrieverecord External Link: retrieveRecord (Client API reference)}
|
||||
*/
|
||||
retrieveRecord(entityLogicalName: string, id: string, options: string): Async.PromiseLike<any>;
|
||||
retrieveRecord(entityLogicalName: string, id: string, options?: string): Async.PromiseLike<any>;
|
||||
|
||||
/**
|
||||
* Retrieves a collection of entity records.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user