mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Merge branch 'master' into react-native-snap-carousel-patch-1
This commit is contained in:
commit
36feacaa19
6
.github/CODEOWNERS
vendored
6
.github/CODEOWNERS
vendored
@ -3576,8 +3576,8 @@
|
||||
/types/react-native-vector-icons/ @iRoachie @timwangdev
|
||||
/types/react-native-version-number/ @VincentLanglet
|
||||
/types/react-native-video/ @huhuanming
|
||||
/types/react-navigation/v1/ @huhuanming @mhcgrq @fangpenlin @petejkim @iRoachie @phanalpha @charlesfamu @timwangdev @bang88 @svbutko @levito @robertohuertasm @YourGamesBeOver @ArmandoAssuncao @cliedeman @Slessi
|
||||
/types/react-navigation/ @huhuanming @mhcgrq @fangpenlin @petejkim @iRoachie @phanalpha @charlesfamu @timwangdev @bang88 @svbutko @levito @robertohuertasm @YourGamesBeOver @ArmandoAssuncao @cliedeman @Slessi @magrinj @TizioFittizio @stigi
|
||||
/types/react-navigation/v1/ @huhuanming @mhcgrq @fangpenlin @petejkim @iRoachie @phanalpha @charlesfamu @timwangdev @bang88 @svbutko @levito @YourGamesBeOver @ArmandoAssuncao @cliedeman @Slessi
|
||||
/types/react-navigation/ @huhuanming @mhcgrq @fangpenlin @petejkim @iRoachie @phanalpha @charlesfamu @timwangdev @bang88 @svbutko @levito @YourGamesBeOver @ArmandoAssuncao @cliedeman @Slessi @magrinj @TizioFittizio @stigi
|
||||
/types/react-notification-system/ @GiedriusGrabauskas @DeividasBakanas @LKay @sztobar
|
||||
/types/react-notification-system-redux/ @LKay
|
||||
/types/react-notify-toast/ @klaascuvelier
|
||||
@ -4557,7 +4557,7 @@
|
||||
/types/webvr-api/ @efokschaner
|
||||
/types/week/ @sindrenm
|
||||
/types/weighted/ @ccitro
|
||||
/types/weixin-app/ @taoqf @AlexStacker
|
||||
/types/weixin-app/ @taoqf @AlexStacker @Jimexist
|
||||
/types/wellknown/ @yairtawil
|
||||
/types/wepy/ @Jimexist
|
||||
/types/wepy-redux/ @Jimexist
|
||||
|
||||
@ -156,12 +156,6 @@
|
||||
"sourceRepoURL": "https://github.com/brianloveswords/base64url",
|
||||
"asOfVersion": "2.0.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "better-scroll",
|
||||
"typingsPackageName": "better-scroll",
|
||||
"sourceRepoURL": "https://github.com/ustbhuangyi/better-scroll",
|
||||
"asOfVersion": "1.5.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "BigInteger.js",
|
||||
"typingsPackageName": "big-integer",
|
||||
|
||||
8
types/algoliasearch/index.d.ts
vendored
8
types/algoliasearch/index.d.ts
vendored
@ -1776,6 +1776,14 @@ declare namespace algoliasearch {
|
||||
facets?: {
|
||||
[facetName: string]: { [facetValue: string]: number };
|
||||
};
|
||||
facets_stats?: {
|
||||
[facetName: string]: {
|
||||
avg: number,
|
||||
max: number,
|
||||
min: number,
|
||||
sum: number,
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
interface MultiResponse {
|
||||
|
||||
9
types/algoliasearch/lite/index.d.ts
vendored
9
types/algoliasearch/lite/index.d.ts
vendored
@ -4,6 +4,7 @@
|
||||
// Haroen Viaene <https://github.com/haroenv>
|
||||
// Aurélien Hervé <https://github.com/aherve>
|
||||
// Samuel Vaillant <https://github.com/samouss>
|
||||
// Claas Brüggemann <https://github.com/ClaasBrueggemann>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
@ -570,6 +571,14 @@ declare namespace algoliasearch {
|
||||
facets?: {
|
||||
[facetName: string]: { [facetValue: string]: number };
|
||||
};
|
||||
facets_stats?: {
|
||||
[facetName: string]: {
|
||||
avg: number,
|
||||
max: number,
|
||||
min: number,
|
||||
sum: number,
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
interface MultiResponse {
|
||||
|
||||
34
types/angular-q-extras/angular-q-extras-tests.ts
Normal file
34
types/angular-q-extras/angular-q-extras-tests.ts
Normal file
@ -0,0 +1,34 @@
|
||||
interface MyService {
|
||||
getFirstname(): ng.IPromise<string>;
|
||||
getLastname(): ng.IPromise<string>;
|
||||
}
|
||||
|
||||
function TestCtrl($q: ng.IQService, MyService: MyService) {
|
||||
function arrayCallback(result: [ng.PromiseValue<string>, ng.PromiseValue<string>]) {
|
||||
const firstnameOk: boolean = $q.isFulfilledState(result[0]);
|
||||
const lastnameOk: boolean = $q.isFulfilledState(result[1]);
|
||||
}
|
||||
|
||||
function objectCallback(result: {firstname: ng.PromiseValue<string>, lastname: ng.PromiseValue<string>}) {
|
||||
const firstnameOk: boolean = $q.isFulfilledState(result.firstname);
|
||||
const lastnameOk: boolean = $q.isFulfilledState(result.lastname);
|
||||
}
|
||||
|
||||
$q
|
||||
.allSettled([
|
||||
MyService.getFirstname(),
|
||||
MyService.getLastname()
|
||||
])
|
||||
.then(arrayCallback);
|
||||
|
||||
$q
|
||||
.allSettled({
|
||||
firstname: MyService.getFirstname(),
|
||||
lastname: MyService.getLastname()
|
||||
})
|
||||
.then(objectCallback);
|
||||
}
|
||||
|
||||
TestCtrl.$inject = ['$q', 'MyService'];
|
||||
|
||||
angular.module('test').controller('TestCtrl', TestCtrl);
|
||||
42
types/angular-q-extras/index.d.ts
vendored
Normal file
42
types/angular-q-extras/index.d.ts
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
// Type definitions for angular-q-extras 1.1
|
||||
// Project: https://github.com/niqdev/angular-q-extras
|
||||
// Definitions by: Damien Sorel <https://github.com/mistic100>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
declare var _: string;
|
||||
export = _;
|
||||
|
||||
import * as angular from 'angular';
|
||||
|
||||
declare module 'angular' {
|
||||
type PromiseState = 'fulfilled' | 'rejected';
|
||||
|
||||
interface PromiseValue<T> {
|
||||
state: PromiseState;
|
||||
value?: T;
|
||||
reason?: any;
|
||||
}
|
||||
|
||||
// tslint:disable-next-line interface-name
|
||||
interface IQService {
|
||||
// tslint:disable:max-line-length
|
||||
allSettled<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: [T1 | IPromise<T1>, T2 | IPromise<T2>, T3 | IPromise<T3>, T4 | IPromise<T4>, T5 | IPromise<T5>, T6 | IPromise<T6>, T7 | IPromise<T7>, T8 | IPromise<T8>, T9 | IPromise<T9>, T10 | IPromise<T10>]): IPromise<[PromiseValue<T1>, PromiseValue<T2>, PromiseValue<T3>, PromiseValue<T4>, PromiseValue<T5>, PromiseValue<T6>, PromiseValue<T7>, PromiseValue<T8>, PromiseValue<T9>, PromiseValue<T10>]>;
|
||||
allSettled<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | IPromise<T1>, T2 | IPromise<T2>, T3 | IPromise<T3>, T4 | IPromise<T4>, T5 | IPromise<T5>, T6 | IPromise<T6>, T7 | IPromise<T7>, T8 | IPromise<T8>, T9 | IPromise<T9>]): IPromise<[PromiseValue<T1>, PromiseValue<T2>, PromiseValue<T3>, PromiseValue<T4>, PromiseValue<T5>, PromiseValue<T6>, PromiseValue<T7>, PromiseValue<T8>, PromiseValue<T9>]>;
|
||||
allSettled<T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | IPromise<T1>, T2 | IPromise<T2>, T3 | IPromise<T3>, T4 | IPromise<T4>, T5 | IPromise<T5>, T6 | IPromise<T6>, T7 | IPromise<T7>, T8 | IPromise<T8>]): IPromise<[PromiseValue<T1>, PromiseValue<T2>, PromiseValue<T3>, PromiseValue<T4>, PromiseValue<T5>, PromiseValue<T6>, PromiseValue<T7>, PromiseValue<T8>]>;
|
||||
allSettled<T1, T2, T3, T4, T5, T6, T7>(values: [T1 | IPromise<T1>, T2 | IPromise<T2>, T3 | IPromise<T3>, T4 | IPromise<T4>, T5 | IPromise<T5>, T6 | IPromise<T6>, T7 | IPromise<T7>]): IPromise<[PromiseValue<T1>, PromiseValue<T2>, PromiseValue<T3>, PromiseValue<T4>, PromiseValue<T5>, PromiseValue<T6>, PromiseValue<T7>]>;
|
||||
allSettled<T1, T2, T3, T4, T5, T6>(values: [T1 | IPromise<T1>, T2 | IPromise<T2>, T3 | IPromise<T3>, T4 | IPromise<T4>, T5 | IPromise<T5>, T6 | IPromise<T6>]): IPromise<[PromiseValue<T1>, PromiseValue<T2>, PromiseValue<T3>, PromiseValue<T4>, PromiseValue<T5>, PromiseValue<T6>]>;
|
||||
allSettled<T1, T2, T3, T4, T5>(values: [T1 | IPromise<T1>, T2 | IPromise<T2>, T3 | IPromise<T3>, T4 | IPromise<T4>, T5 | IPromise<T5>]): IPromise<[PromiseValue<T1>, PromiseValue<T2>, PromiseValue<T3>, PromiseValue<T4>, PromiseValue<T5>]>;
|
||||
allSettled<T1, T2, T3, T4>(values: [T1 | IPromise<T1>, T2 | IPromise<T2>, T3 | IPromise<T3>, T4 | IPromise<T4>]): IPromise<[PromiseValue<T1>, PromiseValue<T2>, PromiseValue<T3>, PromiseValue<T4>]>;
|
||||
allSettled<T1, T2, T3>(values: [T1 | IPromise<T1>, T2 | IPromise<T2>, T3 | IPromise<T3>]): IPromise<[PromiseValue<T1>, PromiseValue<T2>, PromiseValue<T3>]>;
|
||||
allSettled<T1, T2>(values: [T1 | IPromise<T1>, T2 | IPromise<T2>]): IPromise<[PromiseValue<T1>, PromiseValue<T2>]>;
|
||||
// tslint:enable:max-line-length
|
||||
|
||||
allSettled<TAll>(promises: Array<TAll | IPromise<TAll>>): IPromise<Array<PromiseValue<TAll>>>;
|
||||
|
||||
allSettled<T>(promises: { [K in keyof T]: (T[K] | IPromise<T[K]>); }): IPromise<{ [K in keyof T]: PromiseValue<T[K]>; }>;
|
||||
|
||||
isFulfilledState(promise: PromiseValue<any>): boolean;
|
||||
isRejectedState(promise: PromiseValue<any>): boolean;
|
||||
}
|
||||
}
|
||||
23
types/angular-q-extras/tsconfig.json
Normal file
23
types/angular-q-extras/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"angular-q-extras-tests.ts"
|
||||
],
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
}
|
||||
}
|
||||
3
types/angular-q-extras/tslint.json
Normal file
3
types/angular-q-extras/tslint.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
@ -17,17 +17,24 @@ const config: Microsoft.ApplicationInsights.IConfig = {
|
||||
autoTrackPageVisitTime: true,
|
||||
disableExceptionTracking: false,
|
||||
disableAjaxTracking: false,
|
||||
disableFetchTracking: true,
|
||||
overridePageViewDuration: false,
|
||||
maxAjaxCallsPerView: -1,
|
||||
disableDataLossAnalysis: true,
|
||||
disableCorrelationHeaders: true,
|
||||
correlationHeaderExcludedDomains: [],
|
||||
disableFlushOnBeforeUnload: false,
|
||||
enableSessionStorageBuffer: false,
|
||||
cookieDomain: "",
|
||||
isCookieUseDisabled: true,
|
||||
isRetryDisabled: true,
|
||||
isPerfAnalyzerEnabled: true,
|
||||
isStorageUseDisabled: true
|
||||
url: "url",
|
||||
isStorageUseDisabled: true,
|
||||
isBeaconApiDisabled: false,
|
||||
sdkExtension: "sdkExtension",
|
||||
isBrowserLinkTrackingEnabled: false,
|
||||
appId: "appId",
|
||||
enableCorsCorrelation: false
|
||||
};
|
||||
|
||||
appInsights = {
|
||||
@ -175,3 +182,8 @@ const traceObj = new Microsoft.ApplicationInsights.Telemetry.Trace("message", nu
|
||||
const traceData = new Microsoft.ApplicationInsights.Telemetry.Common.Data<Microsoft.ApplicationInsights.Telemetry.Trace>(Microsoft.ApplicationInsights.Telemetry.Trace.dataType, traceObj);
|
||||
const traceEnvelope = new Microsoft.ApplicationInsights.Telemetry.Common.Envelope(traceData, Microsoft.ApplicationInsights.Telemetry.Trace.envelopeType);
|
||||
context.track(traceEnvelope);
|
||||
|
||||
// UtilHelpers
|
||||
let Util: typeof Microsoft.ApplicationInsights.UtilHelpers;
|
||||
|
||||
Util.newId();
|
||||
|
||||
16
types/applicationinsights-js/index.d.ts
vendored
16
types/applicationinsights-js/index.d.ts
vendored
@ -1,6 +1,7 @@
|
||||
// Type definitions for ApplicationInsights-JS 1.0
|
||||
// Project: https://github.com/Microsoft/ApplicationInsights-JS
|
||||
// Definitions by: Kamil Szostak <https://github.com/kamilszostak>
|
||||
// Mark Wolff <https://github.com/markwolff>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare module AI {
|
||||
@ -560,19 +561,24 @@ declare module Microsoft.ApplicationInsights {
|
||||
samplingPercentage?: number;
|
||||
autoTrackPageVisitTime?: boolean;
|
||||
disableAjaxTracking?: boolean;
|
||||
disableFetchTracking?: boolean;
|
||||
overridePageViewDuration?: boolean;
|
||||
maxAjaxCallsPerView?: number;
|
||||
disableDataLossAnalysis?: boolean;
|
||||
disableCorrelationHeaders?: boolean;
|
||||
correlationHeaderExcludedDomains?: string[];
|
||||
disableFlushOnBeforeUnload?: boolean;
|
||||
enableSessionStorageBuffer?: boolean;
|
||||
isCookieUseDisabled?: boolean;
|
||||
cookieDomain?: string;
|
||||
isRetryDisabled?: boolean;
|
||||
isPerfAnalyzerEnabled?: boolean;
|
||||
url?: string;
|
||||
isStorageUseDisabled?: boolean;
|
||||
isBeaconApiDisabled?: boolean;
|
||||
sdkExtension?: string;
|
||||
isBrowserLinkTrackingEnabled?: boolean;
|
||||
appId?: string;
|
||||
enableCorsCorrelation?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -793,10 +799,18 @@ declare module Microsoft.ApplicationInsights {
|
||||
*/
|
||||
_onerror(message: string, url: string, lineNumber: number, columnNumber: number, error: Error): any;
|
||||
}
|
||||
|
||||
class UtilHelpers {
|
||||
/**
|
||||
* Generate a random ID string
|
||||
*/
|
||||
static newId(): string;
|
||||
}
|
||||
}
|
||||
|
||||
declare module 'applicationinsights-js' {
|
||||
const AppInsights: Microsoft.ApplicationInsights.IAppInsights;
|
||||
const Util: typeof Microsoft.ApplicationInsights.UtilHelpers;
|
||||
}
|
||||
|
||||
declare var appInsights: Microsoft.ApplicationInsights.IAppInsights;
|
||||
|
||||
68
types/better-scroll/better-scroll-tests.ts
Normal file
68
types/better-scroll/better-scroll-tests.ts
Normal file
@ -0,0 +1,68 @@
|
||||
import BScroll from 'better-scroll';
|
||||
|
||||
const BScroll1 = new BScroll('#wrapper');
|
||||
const BScroll2 = new BScroll('#wrapper', { scrollX: false, scrollY: false });
|
||||
const BScroll3 = new BScroll('#wrapper', {
|
||||
snap: true,
|
||||
wheel: false,
|
||||
scrollbar: false,
|
||||
pullDownRefresh: false,
|
||||
});
|
||||
const BScroll4 = new BScroll('#wrapper', {
|
||||
wheel: {
|
||||
selectedIndex: 0,
|
||||
},
|
||||
});
|
||||
const BScroll6 = new BScroll('#wrapper', {
|
||||
snap: {
|
||||
loop: false,
|
||||
el: document.querySelector('div-test') as Element,
|
||||
threshold: 0.1,
|
||||
stepX: 100,
|
||||
stepY: 100,
|
||||
listenFlick: true,
|
||||
},
|
||||
});
|
||||
const BScroll7 = new BScroll('#wrapper', {
|
||||
scrollbar: {
|
||||
fade: true,
|
||||
},
|
||||
});
|
||||
|
||||
const BScroll8 = new BScroll('#wrapper', {
|
||||
pullDownRefresh: {
|
||||
threshold: 50,
|
||||
stop: 20,
|
||||
},
|
||||
});
|
||||
|
||||
BScroll1.refresh();
|
||||
BScroll1.scrollTo(0, 100);
|
||||
BScroll1.scrollTo(0, 100, 200);
|
||||
|
||||
BScroll1.scrollToElement('selectedElement');
|
||||
BScroll1.scrollToElement('selectedElement', 250);
|
||||
|
||||
BScroll1.scrollToElement(document.getElementById('selectedElement') as HTMLElement);
|
||||
BScroll1.scrollToElement(document.getElementById('selectedElement') as HTMLElement, 250);
|
||||
|
||||
BScroll2.on('scrollStart', () => { console.log('scroll started'); });
|
||||
|
||||
const BScroll9 = new BScroll(document.getElementById('wrapper') as HTMLElement);
|
||||
const BScroll10 = new BScroll(document.getElementById('wrapper') as HTMLElement, { freeScroll: true });
|
||||
const BScroll11 = new BScroll(document.getElementById('wrapper') as HTMLElement, {
|
||||
preventDefaultException: {
|
||||
tagName: /^(INPUT|TEXTAREA|BUTTON|SELECT)$/,
|
||||
},
|
||||
});
|
||||
const BScroll12 = new BScroll(document.getElementById('wrapper') as HTMLElement, {
|
||||
preventDefaultException: {
|
||||
className: /(^|\s)test(\s|$)/,
|
||||
},
|
||||
});
|
||||
|
||||
const BScroll13 = new BScroll(document.getElementById('wrapper') as HTMLElement, {
|
||||
swipeBounceTime: 1000,
|
||||
});
|
||||
|
||||
const BScroll14 = new BScroll('#wrapper', { disableMouse: true, disableTouch: false });
|
||||
238
types/better-scroll/index.d.ts
vendored
Normal file
238
types/better-scroll/index.d.ts
vendored
Normal file
@ -0,0 +1,238 @@
|
||||
// Type definitions for better-scroll 1.12
|
||||
// Project: https://github.com/ustbhuangyi/better-scroll
|
||||
// Definitions by: cloudstone <https://github.com/stoneChen>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
// TypeScript Version: 2.2
|
||||
export interface WheelOption {
|
||||
selectedIndex: number;
|
||||
rotate: number;
|
||||
adjustTime: number;
|
||||
wheelWrapperClass: string;
|
||||
wheelItemClass: string;
|
||||
}
|
||||
|
||||
export interface PageOption {
|
||||
x: number;
|
||||
y: number;
|
||||
pageX: number;
|
||||
pageY: number;
|
||||
}
|
||||
|
||||
export interface SlideOption {
|
||||
loop: boolean;
|
||||
el: Element;
|
||||
threshold: number;
|
||||
stepX: number;
|
||||
stepY: number;
|
||||
speed: number;
|
||||
listenFlick: boolean;
|
||||
}
|
||||
|
||||
export interface ScrollBarOption {
|
||||
fade: boolean;
|
||||
}
|
||||
|
||||
export interface PullDownOption {
|
||||
threshold: number;
|
||||
stop: number;
|
||||
}
|
||||
|
||||
export interface PullUpOption {
|
||||
threshold: number;
|
||||
}
|
||||
|
||||
export interface BounceObjectOption {
|
||||
top?: boolean;
|
||||
bottom?: boolean;
|
||||
left?: boolean;
|
||||
right?: boolean;
|
||||
}
|
||||
|
||||
export interface EaseOption {
|
||||
swipe?: {
|
||||
style: string;
|
||||
fn: (t: number) => number;
|
||||
};
|
||||
swipeBounce?: {
|
||||
style: string;
|
||||
fn: (t: number) => number;
|
||||
};
|
||||
bounce?: {
|
||||
style: string;
|
||||
fn: (t: number) => number;
|
||||
};
|
||||
}
|
||||
|
||||
export interface BsOption {
|
||||
startX: number;
|
||||
startY: number;
|
||||
scrollX: boolean;
|
||||
scrollY: boolean;
|
||||
freeScroll: boolean;
|
||||
directionLockThreshold: number;
|
||||
eventPassthrough: string | boolean;
|
||||
click: boolean;
|
||||
tap: boolean;
|
||||
bounce: boolean | BounceObjectOption;
|
||||
bounceTime: number;
|
||||
momentum: boolean;
|
||||
momentumLimitTime: number;
|
||||
momentumLimitDistance: number;
|
||||
swipeTime: number;
|
||||
swipeBounceTime: number;
|
||||
deceleration: number;
|
||||
flickLimitTime: number;
|
||||
flickLimitDistance: number;
|
||||
resizePolling: number;
|
||||
probeType: number;
|
||||
preventDefault: boolean;
|
||||
preventDefaultException: object;
|
||||
HWCompositing: boolean;
|
||||
useTransition: boolean;
|
||||
useTransform: boolean;
|
||||
bindToWrapper: boolean;
|
||||
disableMouse: boolean;
|
||||
disableTouch: boolean;
|
||||
observeDOM: boolean;
|
||||
autoBlur: boolean;
|
||||
stopPropagation: boolean;
|
||||
/**
|
||||
* for picker
|
||||
* wheel: {
|
||||
* selectedIndex: 0,
|
||||
* rotate: 25,
|
||||
* adjustTime: 400
|
||||
* }
|
||||
*/
|
||||
wheel: Partial<WheelOption> | boolean;
|
||||
/**
|
||||
* for slide
|
||||
* snap: {
|
||||
* loop: boolean,
|
||||
* el: domEl,
|
||||
* threshold: 0.1,
|
||||
* stepX: 100,
|
||||
* stepY: 100,
|
||||
* listenFlick: true
|
||||
* }
|
||||
*/
|
||||
snap: Partial<SlideOption> | boolean;
|
||||
/**
|
||||
* for scrollbar
|
||||
* scrollbar: {
|
||||
* fade: true
|
||||
* }
|
||||
*/
|
||||
scrollbar: Partial<ScrollBarOption> | boolean;
|
||||
/**
|
||||
* for pull down and refresh
|
||||
* pullDownRefresh: {
|
||||
* threshold: 50,
|
||||
* stop: 20
|
||||
* }
|
||||
*/
|
||||
pullDownRefresh: Partial<PullDownOption> | boolean;
|
||||
/**
|
||||
* for pull up and load
|
||||
* pullUpLoad: {
|
||||
* threshold: 50
|
||||
* }
|
||||
*/
|
||||
pullUpLoad: Partial<PullUpOption> | boolean;
|
||||
}
|
||||
|
||||
export interface Position {
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
|
||||
export default class BScroll {
|
||||
constructor(element: Element | string, options?: Partial<BsOption>);
|
||||
|
||||
x: number;
|
||||
y: number;
|
||||
maxScrollX: number;
|
||||
maxScrollY: number;
|
||||
movingDirectionX: number;
|
||||
movingDirectionY: number;
|
||||
directionX: number;
|
||||
directionY: number;
|
||||
enabled: boolean;
|
||||
isInTransition: boolean;
|
||||
isAnimating: boolean;
|
||||
options: BsOption;
|
||||
|
||||
refresh(): void;
|
||||
|
||||
enable(): void;
|
||||
|
||||
disable(): void;
|
||||
|
||||
scrollBy(x: number, y: number, time?: number, easing?: object): void;
|
||||
|
||||
scrollTo(x: number, y: number, time?: number, easing?: object): void;
|
||||
|
||||
scrollToElement(el: HTMLElement | string, time?: number, offsetX?: number | boolean, offsetY?: number | boolean, easing?: object): void;
|
||||
|
||||
stop(): void;
|
||||
|
||||
destroy(): void;
|
||||
|
||||
goToPage(x: number, y: number, time?: number, easing?: object): void;
|
||||
|
||||
next(time?: number, easing?: object): void;
|
||||
|
||||
prev(time?: number, easing?: object): void;
|
||||
|
||||
getCurrentPage(): PageOption;
|
||||
|
||||
wheelTo(index: number): void;
|
||||
|
||||
getSelectedIndex(): number;
|
||||
|
||||
finishPullDown(): void;
|
||||
|
||||
finishPullUp(): void;
|
||||
|
||||
on(
|
||||
type:
|
||||
'beforeScrollStart' |
|
||||
'scrollStart' |
|
||||
'scrollCancel' |
|
||||
'beforeScrollStart' |
|
||||
'flick' |
|
||||
'refresh' |
|
||||
'destroy' |
|
||||
'pullingDown' |
|
||||
'pullingUp',
|
||||
fn: () => any
|
||||
): void;
|
||||
|
||||
on(
|
||||
type:
|
||||
'scroll' |
|
||||
'scrollEnd' |
|
||||
'touchEnd',
|
||||
fn: (pos: Position) => any
|
||||
): void;
|
||||
|
||||
off(
|
||||
type:
|
||||
'beforeScrollStart' |
|
||||
'scrollStart' |
|
||||
'scroll' |
|
||||
'scrollCancel' |
|
||||
'beforeScrollStart' |
|
||||
'scrollEnd' |
|
||||
'touchEnd' |
|
||||
'flick' |
|
||||
'refresh' |
|
||||
'destroy' |
|
||||
'pullingDown' |
|
||||
'pullingUp',
|
||||
fn: (...args: any[]) => void
|
||||
): void;
|
||||
|
||||
trigger(type: string): void;
|
||||
}
|
||||
24
types/better-scroll/tsconfig.json
Normal file
24
types/better-scroll/tsconfig.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"better-scroll-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/better-scroll/tslint.json
Normal file
1
types/better-scroll/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
1
types/bull/index.d.ts
vendored
1
types/bull/index.d.ts
vendored
@ -9,6 +9,7 @@
|
||||
// David Koblas <https://github.com/koblas>
|
||||
// Bond Akinmade <https://github.com/bondz>
|
||||
// Wuha Team <https://github.com/wuha-team>
|
||||
// Alec Brunelle <https://github.com/aleccool213>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
|
||||
32
types/bull/v2/index.d.ts
vendored
32
types/bull/v2/index.d.ts
vendored
@ -54,6 +54,24 @@ declare module "bull" {
|
||||
* since pubsub does not give any guarantees.
|
||||
*/
|
||||
finished(): Promise<void>;
|
||||
|
||||
/**
|
||||
* Moves a job to the `completed` queue. Pulls a job from 'waiting' to
|
||||
* 'active' and returns a tuple containing the next jobs data and id. If no
|
||||
* job is in the `waiting` queue, returns null.
|
||||
* @param returnValue The jobs success message.
|
||||
* @param ignoreLock True when wanting to ignore the redis lock on this job.
|
||||
* @returns Contains the next jobs data and id or null if job left in 'waiting' queue.
|
||||
*/
|
||||
moveToCompleted(returnValue: string, ignoreLock: boolean): Promise<string[] | null>;
|
||||
|
||||
/**
|
||||
* Moves a job to the failed queue.
|
||||
* @param errorInfo The jobs error message.
|
||||
* @param ignoreLock True when wanting to ignore the redis lock on this job.
|
||||
* @returns void
|
||||
*/
|
||||
moveToFailed(errorInfo: ErrorMessage, ignoreLock: boolean): Promise<void>;
|
||||
}
|
||||
|
||||
export interface Backoff {
|
||||
@ -204,7 +222,7 @@ declare module "bull" {
|
||||
* Returns a promise that will return the job instance associated with the jobId parameter.
|
||||
* If the specified job cannot be located, the promise callback parameter will be set to null.
|
||||
*/
|
||||
getJob(jobId: string): Promise<Job>;
|
||||
getJob(jobId: string): Promise<Job | null>;
|
||||
|
||||
/**
|
||||
* Tells the queue remove all jobs created outside of a grace period in milliseconds.
|
||||
@ -217,6 +235,18 @@ declare module "bull" {
|
||||
* 'ready', 'error', 'activ', 'progress', 'completed', 'failed', 'paused', 'resumed', 'cleaned'
|
||||
*/
|
||||
on(eventName: string, callback: EventCallback): void;
|
||||
|
||||
/**
|
||||
* Moves the next job from 'waiting' to 'active'.
|
||||
* Sets the processedOn timestamp to the current datetime.
|
||||
* @param jobId If specified, will move a specific job from 'waiting' to 'active',
|
||||
* @returns Returns the job moved from waiting to active queue.
|
||||
*/
|
||||
getNextJob:(jobId?: string) => Promise<Job | null>;
|
||||
}
|
||||
|
||||
interface ErrorMessage {
|
||||
message: string;
|
||||
}
|
||||
|
||||
interface EventCallback {
|
||||
|
||||
1
types/cheerio/index.d.ts
vendored
1
types/cheerio/index.d.ts
vendored
@ -214,6 +214,7 @@ interface CheerioOptionsInterface {
|
||||
recognizeCDATA?: boolean;
|
||||
recognizeSelfClosing?: boolean;
|
||||
normalizeWhitespace?: boolean;
|
||||
ignoreWhitespace?: boolean;
|
||||
}
|
||||
|
||||
interface CheerioSelector {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import * as ddTrace from 'dd-trace';
|
||||
import * as tracer from 'dd-trace';
|
||||
import SpanContext = require('dd-trace/src/opentracing/span_context');
|
||||
|
||||
const tracer = ddTrace.init({
|
||||
tracer.init({
|
||||
service: 'MyLovelyService',
|
||||
hostname: 'localhost',
|
||||
port: 8126,
|
||||
@ -14,7 +14,7 @@ const tracer = ddTrace.init({
|
||||
tracer
|
||||
.trace('web.request', {
|
||||
service: 'my_service',
|
||||
childOf: new SpanContext({ traceId: 1337, spanId: 42 }),
|
||||
childOf: new SpanContext({ traceId: 1337, spanId: 42 }), // Childof must be an instance of this type. See: https://github.com/DataDog/dd-trace-js/blob/master/src/opentracing/tracer.js#L99
|
||||
tags: {
|
||||
env: 'dev'
|
||||
}
|
||||
@ -23,3 +23,13 @@ tracer
|
||||
span.setTag('my_tag', 'my_value');
|
||||
span.finish();
|
||||
});
|
||||
|
||||
const parentScope = tracer.scopeManager().active();
|
||||
const span = tracer.startSpan('memcached', {
|
||||
childOf: parentScope && parentScope.span(),
|
||||
tags: {
|
||||
'service.name': 'my-memcached',
|
||||
'resource.name': 'get',
|
||||
'span.type': 'memcached',
|
||||
},
|
||||
});
|
||||
|
||||
48
types/dd-trace/index.d.ts
vendored
48
types/dd-trace/index.d.ts
vendored
@ -1,11 +1,11 @@
|
||||
// Type definitions for dd-trace-js 0.2
|
||||
// Type definitions for dd-trace-js 0.5
|
||||
// Project: https://github.com/DataDog/dd-trace-js
|
||||
// Definitions by: Colin Bradley <https://github.com/ColinBradley>
|
||||
// Eloy Durán <https://github.com/alloy>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import Tracer = require('./src/opentracing/tracer');
|
||||
import Span = require('./src/opentracing/span');
|
||||
import SpanContext = require('./src/opentracing/span_context');
|
||||
import { Tracer, Span, SpanContext } from "opentracing";
|
||||
import DatadogSpanContext = require('./src/opentracing/span_context');
|
||||
|
||||
declare var trace: TraceProxy;
|
||||
export = trace;
|
||||
@ -42,6 +42,11 @@ declare class TraceProxy extends Tracer {
|
||||
* @returns The current span or null if outside a trace context.
|
||||
*/
|
||||
currentSpan(): Span | null;
|
||||
|
||||
/**
|
||||
* Get the scope manager to manager context propagation for the tracer.
|
||||
*/
|
||||
scopeManager(): ScopeManager;
|
||||
}
|
||||
|
||||
interface TracerOptions {
|
||||
@ -139,11 +144,44 @@ interface TraceOptions {
|
||||
/**
|
||||
* The parent span or span context for the new span. Generally this is not needed as it will be
|
||||
* fetched from the current context.
|
||||
* If creating your own, this must be an instance of DatadogSpanContext from ./src/opentracing/span_context
|
||||
* See: https://github.com/DataDog/dd-trace-js/blob/master/src/opentracing/tracer.js#L99
|
||||
*/
|
||||
childOf?: Span | SpanContext;
|
||||
childOf?: Span | SpanContext | DatadogSpanContext;
|
||||
|
||||
/**
|
||||
* Global tags that should be assigned to every span.
|
||||
*/
|
||||
tags?: { [key: string]: any } | string;
|
||||
}
|
||||
|
||||
declare class ScopeManager {
|
||||
/**
|
||||
* Get the current active scope or null if there is none.
|
||||
*
|
||||
* @todo The dd-trace source returns null, but opentracing's childOf span
|
||||
* option is typed as taking undefined or a scope, so using undefined
|
||||
* here instead.
|
||||
*/
|
||||
active(): Scope | undefined;
|
||||
|
||||
/**
|
||||
* Activate a new scope wrapping the provided span.
|
||||
*
|
||||
* @param span The span for which to activate the new scope.
|
||||
* @param finishSpanOnClose Whether to automatically finish the span when the scope is closed.
|
||||
*/
|
||||
activate(span: Span, finishSpanOnClose?: boolean): Scope;
|
||||
}
|
||||
|
||||
declare class Scope {
|
||||
/**
|
||||
* Get the span wrapped by this scope.
|
||||
*/
|
||||
span(): Span;
|
||||
|
||||
/**
|
||||
* Close the scope, and finish the span if the scope was created with `finishSpanOnClose` set to true.
|
||||
*/
|
||||
close(): void;
|
||||
}
|
||||
|
||||
121
types/dd-trace/src/opentracing/span.d.ts
vendored
121
types/dd-trace/src/opentracing/span.d.ts
vendored
@ -1,121 +0,0 @@
|
||||
import Tracer = require('./tracer');
|
||||
import SpanContext = require('./span_context');
|
||||
import { Span } from 'opentracing';
|
||||
|
||||
declare class DatadogSpan extends Span {
|
||||
/**
|
||||
* Returns the SpanContext object associated with this Span.
|
||||
*/
|
||||
context(): SpanContext;
|
||||
|
||||
/**
|
||||
* Returns the Tracer object used to create this Span.
|
||||
*/
|
||||
tracer(): Tracer;
|
||||
|
||||
/**
|
||||
* Sets the string name for the logical operation this span represents.
|
||||
*/
|
||||
setOperationName(name: string): this;
|
||||
|
||||
/**
|
||||
* Sets a key:value pair on this Span that also propagates to future
|
||||
* children of the associated Span.
|
||||
*
|
||||
* setBaggageItem() enables powerful functionality given a full-stack
|
||||
* opentracing integration (e.g., arbitrary application data from a web
|
||||
* client can make it, transparently, all the way into the depths of a
|
||||
* storage system), and with it some powerful costs: use this feature with
|
||||
* care.
|
||||
*
|
||||
* IMPORTANT NOTE #1: setBaggageItem() will only propagate baggage items to
|
||||
* *future* causal descendants of the associated Span.
|
||||
*
|
||||
* IMPORTANT NOTE #2: Use this thoughtfully and with care. Every key and
|
||||
* value is copied into every local *and remote* child of the associated
|
||||
* Span, and that can add up to a lot of network and cpu overhead.
|
||||
*/
|
||||
setBaggageItem(key: string, value: string): this;
|
||||
|
||||
/**
|
||||
* Returns the value for a baggage item given its key.
|
||||
*
|
||||
* @param key
|
||||
* The key for the given trace attribute.
|
||||
* @return String value for the given key, or undefined if the key does not
|
||||
* correspond to a set trace attribute.
|
||||
*/
|
||||
getBaggageItem(key: string): string | undefined;
|
||||
|
||||
/**
|
||||
* Adds a single tag to the span. See `addTags()` for details.
|
||||
*/
|
||||
setTag(key: string, value: any): this;
|
||||
|
||||
/**
|
||||
* Adds the given key value pairs to the set of span tags.
|
||||
*
|
||||
* Multiple calls to addTags() results in the tags being the superset of
|
||||
* all calls.
|
||||
*
|
||||
* The behavior of setting the same key multiple times on the same span
|
||||
* is undefined.
|
||||
*
|
||||
* The supported type of the values is implementation-dependent.
|
||||
* Implementations are expected to safely handle all types of values but
|
||||
* may choose to ignore unrecognized / unhandle-able values (e.g. objects
|
||||
* with cyclic references, function objects).
|
||||
*/
|
||||
addTags(keyValueMap: {
|
||||
[key: string]: any;
|
||||
}): this;
|
||||
|
||||
/**
|
||||
* Add a log record to this Span, optionally at a user-provided timestamp.
|
||||
*
|
||||
* For example:
|
||||
*
|
||||
* span.log({
|
||||
* size: rpc.size(), // numeric value
|
||||
* URI: rpc.URI(), // string value
|
||||
* payload: rpc.payload(), // Object value
|
||||
* "keys can be arbitrary strings": rpc.foo(),
|
||||
* });
|
||||
*
|
||||
* span.log({
|
||||
* "error.description": someError.description(),
|
||||
* }, someError.timestampMillis());
|
||||
*
|
||||
* @param keyValuePairs
|
||||
* An object mapping string keys to arbitrary value types. All
|
||||
* Tracer implementations should support bool, string, and numeric
|
||||
* value types, and some may also support Object values.
|
||||
* @param timestamp
|
||||
* An optional parameter specifying the timestamp in milliseconds
|
||||
* since the Unix epoch. Fractional values are allowed so that
|
||||
* timestamps with sub-millisecond accuracy can be represented. If
|
||||
* not specified, the implementation is expected to use its notion
|
||||
* of the current time of the call.
|
||||
*/
|
||||
|
||||
log(keyValuePairs: {
|
||||
[key: string]: any;
|
||||
}, timestamp?: number): this;
|
||||
|
||||
/**
|
||||
* Sets the end timestamp and finalizes Span state.
|
||||
*
|
||||
* With the exception of calls to Span.context() (which are always allowed),
|
||||
* finish() must be the last call made to any span instance, and to do
|
||||
* otherwise leads to undefined behavior.
|
||||
*
|
||||
* @param finishTime
|
||||
* Optional finish time in milliseconds as a Unix timestamp. Decimal
|
||||
* values are supported for timestamps with sub-millisecond accuracy.
|
||||
* If not specified, the current time (as defined by the
|
||||
* implementation) will be used.
|
||||
*/
|
||||
finish(finishTime?: number): void;
|
||||
}
|
||||
|
||||
export = DatadogSpan;
|
||||
32
types/dd-trace/src/opentracing/span_context.d.ts
vendored
32
types/dd-trace/src/opentracing/span_context.d.ts
vendored
@ -1,40 +1,28 @@
|
||||
import { SpanContext } from 'opentracing';
|
||||
|
||||
/**
|
||||
* SpanContext represents Span state that must propagate to descendant Spans
|
||||
* and across process boundaries.
|
||||
*
|
||||
* SpanContext is logically divided into two pieces: the user-level "Baggage"
|
||||
* (see setBaggageItem and getBaggageItem) that propagates across Span
|
||||
* boundaries and any Tracer-implementation-specific fields that are needed to
|
||||
* identify or otherwise contextualize the associated Span instance (e.g., a
|
||||
* <trace_id, span_id, sampled> tuple).
|
||||
*/
|
||||
declare class DatadogSpanContext extends SpanContext {
|
||||
/**
|
||||
* Use to create references to parent spans.
|
||||
* Used to create references to parent spans.
|
||||
* See: https://github.com/DataDog/dd-trace-js/blob/master/src/opentracing/tracer.js#L99
|
||||
*/
|
||||
constructor(props: SpanContextLike);
|
||||
}
|
||||
|
||||
public traceId: number;
|
||||
interface SpanContextLike {
|
||||
traceId: number;
|
||||
|
||||
public spanId: number;
|
||||
spanId: number;
|
||||
|
||||
public parentId?: number | null;
|
||||
parentId?: number | null;
|
||||
|
||||
public sampled?: boolean;
|
||||
sampled?: boolean;
|
||||
|
||||
public baggageItems?: { [key: string]: string };
|
||||
baggageItems?: { [key: string]: string };
|
||||
|
||||
public trace?: {
|
||||
trace?: {
|
||||
started: number[],
|
||||
finished: number[]
|
||||
}
|
||||
}
|
||||
|
||||
interface SpanContextLike {
|
||||
traceId: number;
|
||||
spanId: number;
|
||||
}
|
||||
|
||||
export = DatadogSpanContext;
|
||||
|
||||
11
types/dd-trace/src/opentracing/tracer.d.ts
vendored
11
types/dd-trace/src/opentracing/tracer.d.ts
vendored
@ -1,11 +0,0 @@
|
||||
import { Tracer } from 'opentracing';
|
||||
|
||||
/**
|
||||
* Tracer is the entry-point between the instrumentation API and the tracing
|
||||
* implementation.
|
||||
*/
|
||||
declare class DatadogTracer extends Tracer {
|
||||
|
||||
}
|
||||
|
||||
export = DatadogTracer;
|
||||
6
types/dialogflow/index.d.ts
vendored
6
types/dialogflow/index.d.ts
vendored
@ -550,7 +550,7 @@ export interface DetectIntentResponse {
|
||||
|
||||
export interface QueryResult {
|
||||
queryText: string;
|
||||
laugnageCode: string;
|
||||
languageCode: string;
|
||||
speechRecognitionConfidence: number;
|
||||
action: string;
|
||||
parameters: any;
|
||||
@ -760,8 +760,8 @@ export enum MatchMode {
|
||||
}
|
||||
|
||||
export interface Credentials {
|
||||
clientEmail?: string;
|
||||
privateKey?: string;
|
||||
client_email: string;
|
||||
private_key: string;
|
||||
}
|
||||
|
||||
export interface ClientOptions {
|
||||
|
||||
2
types/echarts/index.d.ts
vendored
2
types/echarts/index.d.ts
vendored
@ -500,7 +500,7 @@ declare namespace echarts {
|
||||
/**
|
||||
* Chart height.
|
||||
*/
|
||||
heiight?: number | string,
|
||||
height?: number | string,
|
||||
|
||||
/**
|
||||
* Specify whether or not to prevent triggering events.
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
import {
|
||||
describeComponent, describeModel, describeModule,
|
||||
setResolver, setupAcceptanceTest, setupComponentTest,
|
||||
setupModelTest, setupTest
|
||||
setupModelTest, setupTest, setupRenderingTest,
|
||||
setupApplicationTest
|
||||
} from 'ember-mocha';
|
||||
import { describe, it, beforeEach, afterEach, before, after } from 'mocha';
|
||||
import chai = require('chai');
|
||||
@ -96,8 +97,6 @@ describeModule('component:x-foo', 'TestModule callbacks', function() {
|
||||
});
|
||||
|
||||
describe('setupTest', function() {
|
||||
setupTest();
|
||||
|
||||
setupTest('service:ajax');
|
||||
|
||||
setupTest('service:ajax', {
|
||||
@ -193,3 +192,62 @@ it('can calculate the result', function(assert) {
|
||||
it.skip('disabled test');
|
||||
|
||||
it.skip('disabled test', function() { });
|
||||
|
||||
// New testing APIs of ember-mocha 0.14
|
||||
|
||||
describe('setupTest', function() {
|
||||
setupTest();
|
||||
|
||||
setupTest({ resolver: Ember.DefaultResolver.create() });
|
||||
|
||||
const hooks = setupTest();
|
||||
hooks.beforeEach(function() {
|
||||
this.owner.lookup('service:foo');
|
||||
});
|
||||
hooks.afterEach(function() {
|
||||
this.owner.factoryFor('service:foo');
|
||||
});
|
||||
|
||||
setupRenderingTest();
|
||||
|
||||
setupRenderingTest({ resolver: Ember.DefaultResolver.create() });
|
||||
|
||||
const hooks2 = setupRenderingTest();
|
||||
hooks2.beforeEach(function() {
|
||||
this.owner.lookup('service:foo');
|
||||
});
|
||||
|
||||
hooks2.afterEach(function() {
|
||||
this.owner.factoryFor('service:foo');
|
||||
});
|
||||
|
||||
setupApplicationTest();
|
||||
|
||||
setupApplicationTest({ resolver: Ember.DefaultResolver.create() });
|
||||
|
||||
const hooks3 = setupApplicationTest();
|
||||
hooks3.beforeEach(function() {
|
||||
this.owner.lookup('service:foo');
|
||||
});
|
||||
|
||||
hooks3.afterEach(function() {
|
||||
this.owner.factoryFor('service:foo');
|
||||
});
|
||||
|
||||
it('test', function() {
|
||||
});
|
||||
});
|
||||
|
||||
describe('rendering test', function() {
|
||||
setupRenderingTest();
|
||||
|
||||
it('renders', async function() {
|
||||
// setup the outer context
|
||||
this.set('value', 'cat');
|
||||
|
||||
// render the component
|
||||
await this.render(hbs`{{ x-foo value=value}}`);
|
||||
|
||||
chai.expect(this.element.querySelector('div>.value').textContent.trim()).to.equal('cat', 'The component shows the correct value');
|
||||
});
|
||||
});
|
||||
|
||||
19
types/ember-mocha/index.d.ts
vendored
19
types/ember-mocha/index.d.ts
vendored
@ -1,6 +1,7 @@
|
||||
// Type definitions for ember-mocha 0.12
|
||||
// Type definitions for ember-mocha 0.14
|
||||
// Project: https://github.com/emberjs/ember-mocha#readme
|
||||
// Definitions by: Derek Wickern <https://github.com/dwickern>
|
||||
// Simon Ihmig <https://github.com/simonihmig>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.4
|
||||
|
||||
@ -36,6 +37,17 @@ declare module 'ember-mocha' {
|
||||
(callbacks: ModuleCallbacks): void;
|
||||
}
|
||||
|
||||
interface TestHooks {
|
||||
beforeEach: mochaBeforeEach;
|
||||
afterEach: mochaAfterEach;
|
||||
}
|
||||
|
||||
interface SetupOptions {
|
||||
resolver: Ember.Resolver;
|
||||
}
|
||||
|
||||
type NewSetupTest = (options?: SetupOptions) => TestHooks;
|
||||
|
||||
/** @deprecated Use setupTest instead */
|
||||
export const describeModule: ContextDefinition;
|
||||
|
||||
@ -45,11 +57,14 @@ declare module 'ember-mocha' {
|
||||
/** @deprecated Use setupModelTest instead */
|
||||
export const describeModel: ContextDefinition;
|
||||
|
||||
export const setupTest: SetupTest;
|
||||
export const setupTest: NewSetupTest & SetupTest;
|
||||
export const setupAcceptanceTest: SetupTest;
|
||||
export const setupComponentTest: SetupTest;
|
||||
export const setupModelTest: SetupTest;
|
||||
|
||||
export const setupRenderingTest: NewSetupTest;
|
||||
export const setupApplicationTest: NewSetupTest;
|
||||
|
||||
export const it: typeof mochaIt;
|
||||
|
||||
/**
|
||||
|
||||
2
types/evaporate/index.d.ts
vendored
2
types/evaporate/index.d.ts
vendored
@ -52,7 +52,7 @@ declare namespace Evaporate {
|
||||
customAuthMethod?: null | ((
|
||||
signParams: string,
|
||||
signHeaders: string,
|
||||
stringToSign: () => string | undefined,
|
||||
stringToSign: string,
|
||||
signatureDateTime: string,
|
||||
canonicalRequest: string
|
||||
) => Promise<string>);
|
||||
|
||||
18
types/express-wechat-access/express-wechat-access-tests.ts
Normal file
18
types/express-wechat-access/express-wechat-access-tests.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import express = require('express');
|
||||
import * as weAccessMiddleware from 'express-wechat-access';
|
||||
|
||||
const app: express.Application = express();
|
||||
|
||||
const options: weAccessMiddleware.WeAccessMidOption = {
|
||||
appId: 'xxxxx',
|
||||
appSecret: 'xxxxx'
|
||||
};
|
||||
|
||||
app.use(
|
||||
weAccessMiddleware(
|
||||
options,
|
||||
e => {
|
||||
console.error(e);
|
||||
}
|
||||
)
|
||||
);
|
||||
38
types/express-wechat-access/index.d.ts
vendored
Normal file
38
types/express-wechat-access/index.d.ts
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
// Type definitions for express-wechat-access 1.1
|
||||
// Project: https://github.com/simmons8616/express-wechat-access
|
||||
// Definitions by: Simmons Zhang <https://github.com/simmons8616>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
import { Response, NextFunction } from 'express';
|
||||
import * as http from 'http';
|
||||
import { EventEmitter } from 'events';
|
||||
|
||||
type WeMiddleware = (req: any, res: Response | http.ServerResponse, next: NextFunction) => any;
|
||||
|
||||
declare function weAccessMiddleware(
|
||||
options: {
|
||||
accessTokenUrl?: string;
|
||||
ticketUrl?: string;
|
||||
appId: string;
|
||||
appSecret: string;
|
||||
https?: boolean;
|
||||
},
|
||||
errorHandler?: (e: any) => any
|
||||
): WeMiddleware;
|
||||
|
||||
declare namespace weAccessMiddleware {
|
||||
interface WeAccessMidOption {
|
||||
accessTokenUrl?: string;
|
||||
ticketUrl?: string;
|
||||
appId: string;
|
||||
appSecret: string;
|
||||
https?: boolean;
|
||||
}
|
||||
|
||||
interface WeAccessMiddleware extends WeMiddleware, EventEmitter, Function {}
|
||||
}
|
||||
|
||||
export = weAccessMiddleware;
|
||||
23
types/express-wechat-access/tsconfig.json
Normal file
23
types/express-wechat-access/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"express-wechat-access-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/express-wechat-access/tslint.json
Normal file
1
types/express-wechat-access/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
2
types/fibjs/declare/DgramSocket.d.ts
vendored
2
types/fibjs/declare/DgramSocket.d.ts
vendored
@ -45,7 +45,7 @@ declare class Class_DgramSocket extends Class_EventEmitter {
|
||||
*
|
||||
* @async
|
||||
*/
|
||||
bind(opts: Object): void;
|
||||
bind(opts: object): void;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
16
types/fibjs/declare/Digest.d.ts
vendored
16
types/fibjs/declare/Digest.d.ts
vendored
@ -52,23 +52,13 @@ declare class Class_Digest extends Class__object {
|
||||
/**
|
||||
*
|
||||
* @brief 计算并返回摘要
|
||||
* @param data 二进制数据块,此数据块将在计算前更新进摘要
|
||||
* @return 返回摘要的二进制数据
|
||||
* @param codec 指定编码格式,允许值为:"buffer", "hex", "base64", "utf8", 或者系统支持的字符集
|
||||
* @return 返回指定编码的摘要表示
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
digest(data: Class_Buffer): Class_Buffer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief 计算并返回摘要
|
||||
* @return 返回摘要的二进制数据
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
digest(): Class_Buffer;
|
||||
digest(codec?: string/** = "buffer"*/): any;
|
||||
|
||||
} /** endof class */
|
||||
|
||||
|
||||
34
types/fibjs/declare/EventEmitter.d.ts
vendored
34
types/fibjs/declare/EventEmitter.d.ts
vendored
@ -56,7 +56,7 @@ declare class Class_EventEmitter extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
on(ev: string, func: Function): Object;
|
||||
on(ev: string, func: Function): object;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -67,7 +67,7 @@ declare class Class_EventEmitter extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
on(map: Object): Object;
|
||||
on(map: object): object;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -79,7 +79,7 @@ declare class Class_EventEmitter extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
addListener(ev: string, func: Function): Object;
|
||||
addListener(ev: string, func: Function): object;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -90,7 +90,7 @@ declare class Class_EventEmitter extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
addListener(map: Object): Object;
|
||||
addListener(map: object): object;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -102,7 +102,7 @@ declare class Class_EventEmitter extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
prependListener(ev: string, func: Function): Object;
|
||||
prependListener(ev: string, func: Function): object;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -113,7 +113,7 @@ declare class Class_EventEmitter extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
prependListener(map: Object): Object;
|
||||
prependListener(map: object): object;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -125,7 +125,7 @@ declare class Class_EventEmitter extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
once(ev: string, func: Function): Object;
|
||||
once(ev: string, func: Function): object;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -136,7 +136,7 @@ declare class Class_EventEmitter extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
once(map: Object): Object;
|
||||
once(map: object): object;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -148,7 +148,7 @@ declare class Class_EventEmitter extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
prependOnceListener(ev: string, func: Function): Object;
|
||||
prependOnceListener(ev: string, func: Function): object;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -159,7 +159,7 @@ declare class Class_EventEmitter extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
prependOnceListener(map: Object): Object;
|
||||
prependOnceListener(map: object): object;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -171,7 +171,7 @@ declare class Class_EventEmitter extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
off(ev: string, func: Function): Object;
|
||||
off(ev: string, func: Function): object;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -182,7 +182,7 @@ declare class Class_EventEmitter extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
off(ev: string): Object;
|
||||
off(ev: string): object;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -193,7 +193,7 @@ declare class Class_EventEmitter extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
off(map: Object): Object;
|
||||
off(map: object): object;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -205,7 +205,7 @@ declare class Class_EventEmitter extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
removeListener(ev: string, func: Function): Object;
|
||||
removeListener(ev: string, func: Function): object;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -216,7 +216,7 @@ declare class Class_EventEmitter extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
removeListener(ev: string): Object;
|
||||
removeListener(ev: string): object;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -227,7 +227,7 @@ declare class Class_EventEmitter extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
removeListener(map: Object): Object;
|
||||
removeListener(map: object): object;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -238,7 +238,7 @@ declare class Class_EventEmitter extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
removeAllListeners(evs?: any[]/** = v8::Array::New(isolate)*/): Object;
|
||||
removeAllListeners(evs?: any[]/** = v8::Array::New(isolate)*/): object;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
2
types/fibjs/declare/EventInfo.d.ts
vendored
2
types/fibjs/declare/EventInfo.d.ts
vendored
@ -70,7 +70,7 @@ declare class Class_EventInfo extends Class__object {
|
||||
* @type Object
|
||||
*/
|
||||
|
||||
target: Object
|
||||
target: object
|
||||
|
||||
|
||||
|
||||
|
||||
2
types/fibjs/declare/Handler.d.ts
vendored
2
types/fibjs/declare/Handler.d.ts
vendored
@ -44,7 +44,7 @@ declare class Class_Handler extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
constructor(map: Object);
|
||||
constructor(map: object);
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
2
types/fibjs/declare/HandlerEx.d.ts
vendored
2
types/fibjs/declare/HandlerEx.d.ts
vendored
@ -81,7 +81,7 @@ declare class Class_HandlerEx extends Class_Handler {
|
||||
*
|
||||
*
|
||||
*/
|
||||
onerror(hdlrs: Object): void;
|
||||
onerror(hdlrs: object): void;
|
||||
|
||||
} /** endof class */
|
||||
|
||||
|
||||
2
types/fibjs/declare/HeapSnapshot.d.ts
vendored
2
types/fibjs/declare/HeapSnapshot.d.ts
vendored
@ -71,7 +71,7 @@ declare class Class_HeapSnapshot extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
diff(before: Class_HeapSnapshot): Object;
|
||||
diff(before: Class_HeapSnapshot): object;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
36
types/fibjs/declare/HttpClient.d.ts
vendored
36
types/fibjs/declare/HttpClient.d.ts
vendored
@ -96,6 +96,30 @@ declare class Class_HttpClient extends Class__object {
|
||||
|
||||
userAgent: string
|
||||
|
||||
/**
|
||||
* class prop
|
||||
*
|
||||
*
|
||||
* @brief 查询和设置 keep-alive 最大缓存连接数,缺省 128
|
||||
*
|
||||
*
|
||||
* @type Integer
|
||||
*/
|
||||
|
||||
poolSize: number
|
||||
|
||||
/**
|
||||
* class prop
|
||||
*
|
||||
*
|
||||
* @brief 查询和设置 keep-alive 缓存连接超时时间,缺省 10000 ms
|
||||
*
|
||||
*
|
||||
* @type Integer
|
||||
*/
|
||||
|
||||
poolTimeout: number
|
||||
|
||||
|
||||
|
||||
/**
|
||||
@ -139,7 +163,7 @@ declare class Class_HttpClient extends Class__object {
|
||||
*
|
||||
* @async
|
||||
*/
|
||||
request(method: string, url: string, opts?: Object/** = v8::Object::New(isolate)*/): Class_HttpResponse;
|
||||
request(method: string, url: string, opts?: object/** = v8::Object::New(isolate)*/): Class_HttpResponse;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -161,7 +185,7 @@ declare class Class_HttpClient extends Class__object {
|
||||
*
|
||||
* @async
|
||||
*/
|
||||
get(url: string, opts?: Object/** = v8::Object::New(isolate)*/): Class_HttpResponse;
|
||||
get(url: string, opts?: object/** = v8::Object::New(isolate)*/): Class_HttpResponse;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -183,7 +207,7 @@ declare class Class_HttpClient extends Class__object {
|
||||
*
|
||||
* @async
|
||||
*/
|
||||
post(url: string, opts?: Object/** = v8::Object::New(isolate)*/): Class_HttpResponse;
|
||||
post(url: string, opts?: object/** = v8::Object::New(isolate)*/): Class_HttpResponse;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -205,7 +229,7 @@ declare class Class_HttpClient extends Class__object {
|
||||
*
|
||||
* @async
|
||||
*/
|
||||
del(url: string, opts?: Object/** = v8::Object::New(isolate)*/): Class_HttpResponse;
|
||||
del(url: string, opts?: object/** = v8::Object::New(isolate)*/): Class_HttpResponse;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -227,7 +251,7 @@ declare class Class_HttpClient extends Class__object {
|
||||
*
|
||||
* @async
|
||||
*/
|
||||
put(url: string, opts?: Object/** = v8::Object::New(isolate)*/): Class_HttpResponse;
|
||||
put(url: string, opts?: object/** = v8::Object::New(isolate)*/): Class_HttpResponse;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -249,7 +273,7 @@ declare class Class_HttpClient extends Class__object {
|
||||
*
|
||||
* @async
|
||||
*/
|
||||
patch(url: string, opts?: Object/** = v8::Object::New(isolate)*/): Class_HttpResponse;
|
||||
patch(url: string, opts?: object/** = v8::Object::New(isolate)*/): Class_HttpResponse;
|
||||
|
||||
} /** endof class */
|
||||
|
||||
|
||||
4
types/fibjs/declare/HttpCollection.d.ts
vendored
4
types/fibjs/declare/HttpCollection.d.ts
vendored
@ -75,7 +75,7 @@ declare class Class_HttpCollection extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
add(map: Object): void;
|
||||
add(map: object): void;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -96,7 +96,7 @@ declare class Class_HttpCollection extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
set(map: Object): void;
|
||||
set(map: object): void;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
4
types/fibjs/declare/HttpCookie.d.ts
vendored
4
types/fibjs/declare/HttpCookie.d.ts
vendored
@ -118,7 +118,7 @@ declare class Class_HttpCookie extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
constructor(opts?: Object/** = v8::Object::New(isolate)*/);
|
||||
constructor(opts?: object/** = v8::Object::New(isolate)*/);
|
||||
|
||||
/**
|
||||
*
|
||||
@ -130,7 +130,7 @@ declare class Class_HttpCookie extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
constructor(name: string, value: string, opts?: Object/** = v8::Object::New(isolate)*/);
|
||||
constructor(name: string, value: string, opts?: object/** = v8::Object::New(isolate)*/);
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
4
types/fibjs/declare/HttpMessage.d.ts
vendored
4
types/fibjs/declare/HttpMessage.d.ts
vendored
@ -151,7 +151,7 @@ declare class Class_HttpMessage extends Class_Message {
|
||||
*
|
||||
*
|
||||
*/
|
||||
addHeader(map: Object): void;
|
||||
addHeader(map: object): void;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -172,7 +172,7 @@ declare class Class_HttpMessage extends Class_Message {
|
||||
*
|
||||
*
|
||||
*/
|
||||
setHeader(map: Object): void;
|
||||
setHeader(map: object): void;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
4
types/fibjs/declare/HttpResponse.d.ts
vendored
4
types/fibjs/declare/HttpResponse.d.ts
vendored
@ -80,7 +80,7 @@ declare class Class_HttpResponse extends Class_HttpMessage {
|
||||
*
|
||||
*
|
||||
*/
|
||||
writeHead(statusCode: number, statusMessage: string, headers?: Object/** = v8::Object::New(isolate)*/): void;
|
||||
writeHead(statusCode: number, statusMessage: string, headers?: object/** = v8::Object::New(isolate)*/): void;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -91,7 +91,7 @@ declare class Class_HttpResponse extends Class_HttpMessage {
|
||||
*
|
||||
*
|
||||
*/
|
||||
writeHead(statusCode: number, headers?: Object/** = v8::Object::New(isolate)*/): void;
|
||||
writeHead(statusCode: number, headers?: object/** = v8::Object::New(isolate)*/): void;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
2
types/fibjs/declare/HttpServer.d.ts
vendored
2
types/fibjs/declare/HttpServer.d.ts
vendored
@ -143,7 +143,7 @@ declare class Class_HttpServer extends Class_TcpServer {
|
||||
*
|
||||
*
|
||||
*/
|
||||
onerror(hdlrs: Object): void;
|
||||
onerror(hdlrs: object): void;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
2
types/fibjs/declare/LevelDB.d.ts
vendored
2
types/fibjs/declare/LevelDB.d.ts
vendored
@ -78,7 +78,7 @@ declare class Class_LevelDB extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
mset(map: Object): void;
|
||||
mset(map: object): void;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
2
types/fibjs/declare/LruCache.d.ts
vendored
2
types/fibjs/declare/LruCache.d.ts
vendored
@ -134,7 +134,7 @@ declare class Class_LruCache extends Class_EventEmitter {
|
||||
*
|
||||
*
|
||||
*/
|
||||
set(map: Object): void;
|
||||
set(map: object): void;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
28
types/fibjs/declare/MongoCollection.d.ts
vendored
28
types/fibjs/declare/MongoCollection.d.ts
vendored
@ -36,7 +36,7 @@ declare class Class_MongoCollection extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
find(query?: Object/** = v8::Object::New(isolate)*/, projection?: Object/** = v8::Object::New(isolate)*/): Class_MongoCursor;
|
||||
find(query?: object/** = v8::Object::New(isolate)*/, projection?: object/** = v8::Object::New(isolate)*/): Class_MongoCursor;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -48,7 +48,7 @@ declare class Class_MongoCollection extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
findOne(query?: Object/** = v8::Object::New(isolate)*/, projection?: Object/** = v8::Object::New(isolate)*/): Object;
|
||||
findOne(query?: object/** = v8::Object::New(isolate)*/, projection?: object/** = v8::Object::New(isolate)*/): object;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -59,7 +59,7 @@ declare class Class_MongoCollection extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
findAndModify(query: Object): Object;
|
||||
findAndModify(query: object): object;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -79,7 +79,7 @@ declare class Class_MongoCollection extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
insert(document: Object): void;
|
||||
insert(document: object): void;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -89,7 +89,7 @@ declare class Class_MongoCollection extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
save(document: Object): void;
|
||||
save(document: object): void;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -102,7 +102,7 @@ declare class Class_MongoCollection extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
update(query: Object, document: Object, upsert?: boolean/** = false*/, multi?: boolean/** = false*/): void;
|
||||
update(query: object, document: object, upsert?: boolean/** = false*/, multi?: boolean/** = false*/): void;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -114,7 +114,7 @@ declare class Class_MongoCollection extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
update(query: Object, document: Object, options: Object): void;
|
||||
update(query: object, document: object, options: object): void;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -124,7 +124,7 @@ declare class Class_MongoCollection extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
remove(query: Object): void;
|
||||
remove(query: object): void;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -135,7 +135,7 @@ declare class Class_MongoCollection extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
runCommand(cmd: Object): Object;
|
||||
runCommand(cmd: object): object;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -147,7 +147,7 @@ declare class Class_MongoCollection extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
runCommand(cmd: string, arg?: Object/** = v8::Object::New(isolate)*/): Object;
|
||||
runCommand(cmd: string, arg?: object/** = v8::Object::New(isolate)*/): object;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -166,7 +166,7 @@ declare class Class_MongoCollection extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
ensureIndex(keys: Object, options?: Object/** = v8::Object::New(isolate)*/): void;
|
||||
ensureIndex(keys: object, options?: object/** = v8::Object::New(isolate)*/): void;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -176,7 +176,7 @@ declare class Class_MongoCollection extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
reIndex(): Object;
|
||||
reIndex(): object;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -187,7 +187,7 @@ declare class Class_MongoCollection extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
dropIndex(name: string): Object;
|
||||
dropIndex(name: string): object;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -197,7 +197,7 @@ declare class Class_MongoCollection extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
dropIndexes(): Object;
|
||||
dropIndexes(): object;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
6
types/fibjs/declare/MongoCursor.d.ts
vendored
6
types/fibjs/declare/MongoCursor.d.ts
vendored
@ -57,7 +57,7 @@ declare class Class_MongoCursor extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
sort(opts: Object): Class_MongoCursor;
|
||||
sort(opts: object): Class_MongoCursor;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -77,7 +77,7 @@ declare class Class_MongoCursor extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
next(): Object;
|
||||
next(): object;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -140,7 +140,7 @@ declare class Class_MongoCursor extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
hint(opts: Object): Class_MongoCursor;
|
||||
hint(opts: object): Class_MongoCursor;
|
||||
|
||||
} /** endof class */
|
||||
|
||||
|
||||
4
types/fibjs/declare/MongoDB.d.ts
vendored
4
types/fibjs/declare/MongoDB.d.ts
vendored
@ -46,7 +46,7 @@ declare class Class_MongoDB extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
runCommand(cmd: Object): Object;
|
||||
runCommand(cmd: object): object;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -58,7 +58,7 @@ declare class Class_MongoDB extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
runCommand(cmd: string, arg: any): Object;
|
||||
runCommand(cmd: string, arg: any): object;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
6
types/fibjs/declare/PKey.d.ts
vendored
6
types/fibjs/declare/PKey.d.ts
vendored
@ -144,7 +144,7 @@ declare class Class_PKey extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
constructor(jsonKey: Object);
|
||||
constructor(jsonKey: object);
|
||||
|
||||
/**
|
||||
*
|
||||
@ -258,7 +258,7 @@ declare class Class_PKey extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
importKey(jsonKey: Object): void;
|
||||
importKey(jsonKey: object): void;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -299,7 +299,7 @@ declare class Class_PKey extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
exportJson(): Object;
|
||||
exportJson(): object;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
12
types/fibjs/declare/Redis.d.ts
vendored
12
types/fibjs/declare/Redis.d.ts
vendored
@ -90,7 +90,7 @@ declare class Class_Redis extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
mset(kvs: Object): void;
|
||||
mset(kvs: object): void;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -108,7 +108,7 @@ declare class Class_Redis extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
msetNX(kvs: Object): void;
|
||||
msetNX(kvs: object): void;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -383,7 +383,7 @@ declare class Class_Redis extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
sub(map: Object): void;
|
||||
sub(map: object): void;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -424,7 +424,7 @@ declare class Class_Redis extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
unsub(map: Object): void;
|
||||
unsub(map: object): void;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -445,7 +445,7 @@ declare class Class_Redis extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
psub(map: Object): void;
|
||||
psub(map: object): void;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -486,7 +486,7 @@ declare class Class_Redis extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
unpsub(map: Object): void;
|
||||
unpsub(map: object): void;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
2
types/fibjs/declare/RedisHash.d.ts
vendored
2
types/fibjs/declare/RedisHash.d.ts
vendored
@ -53,7 +53,7 @@ declare class Class_RedisHash extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
mset(kvs: Object): void;
|
||||
mset(kvs: object): void;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
2
types/fibjs/declare/RedisSortedSet.d.ts
vendored
2
types/fibjs/declare/RedisSortedSet.d.ts
vendored
@ -34,7 +34,7 @@ declare class Class_RedisSortedSet extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
add(sms: Object): number;
|
||||
add(sms: object): number;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
20
types/fibjs/declare/Routing.d.ts
vendored
20
types/fibjs/declare/Routing.d.ts
vendored
@ -34,7 +34,7 @@ declare class Class_Routing extends Class_Handler {
|
||||
*
|
||||
*
|
||||
*/
|
||||
constructor(map?: Object/** = v8::Object::New(isolate)*/);
|
||||
constructor(map?: object/** = v8::Object::New(isolate)*/);
|
||||
|
||||
/**
|
||||
*
|
||||
@ -45,7 +45,7 @@ declare class Class_Routing extends Class_Handler {
|
||||
*
|
||||
*
|
||||
*/
|
||||
constructor(method: string, map: Object);
|
||||
constructor(method: string, map: object);
|
||||
|
||||
/**
|
||||
*
|
||||
@ -67,7 +67,7 @@ declare class Class_Routing extends Class_Handler {
|
||||
*
|
||||
*
|
||||
*/
|
||||
append(map: Object): Class_Routing;
|
||||
append(map: object): Class_Routing;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -103,7 +103,7 @@ declare class Class_Routing extends Class_Handler {
|
||||
*
|
||||
*
|
||||
*/
|
||||
all(map: Object): Class_Routing;
|
||||
all(map: object): Class_Routing;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -126,7 +126,7 @@ declare class Class_Routing extends Class_Handler {
|
||||
*
|
||||
*
|
||||
*/
|
||||
get(map: Object): Class_Routing;
|
||||
get(map: object): Class_Routing;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -149,7 +149,7 @@ declare class Class_Routing extends Class_Handler {
|
||||
*
|
||||
*
|
||||
*/
|
||||
post(map: Object): Class_Routing;
|
||||
post(map: object): Class_Routing;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -172,7 +172,7 @@ declare class Class_Routing extends Class_Handler {
|
||||
*
|
||||
*
|
||||
*/
|
||||
del(map: Object): Class_Routing;
|
||||
del(map: object): Class_Routing;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -195,7 +195,7 @@ declare class Class_Routing extends Class_Handler {
|
||||
*
|
||||
*
|
||||
*/
|
||||
put(map: Object): Class_Routing;
|
||||
put(map: object): Class_Routing;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -218,7 +218,7 @@ declare class Class_Routing extends Class_Handler {
|
||||
*
|
||||
*
|
||||
*/
|
||||
patch(map: Object): Class_Routing;
|
||||
patch(map: object): Class_Routing;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -241,7 +241,7 @@ declare class Class_Routing extends Class_Handler {
|
||||
*
|
||||
*
|
||||
*/
|
||||
find(map: Object): Class_Routing;
|
||||
find(map: object): Class_Routing;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
90
types/fibjs/declare/SandBox.d.ts
vendored
90
types/fibjs/declare/SandBox.d.ts
vendored
@ -34,7 +34,20 @@ declare class Class_SandBox extends Class__object {
|
||||
* @type Object
|
||||
*/
|
||||
|
||||
global: Object
|
||||
global: object
|
||||
|
||||
/**
|
||||
* class prop
|
||||
*
|
||||
*
|
||||
* @brief 查询沙箱中现存的所有模块的字典对象
|
||||
*
|
||||
*
|
||||
* @readonly
|
||||
* @type Object
|
||||
*/
|
||||
|
||||
modules: object
|
||||
|
||||
|
||||
|
||||
@ -46,7 +59,7 @@ declare class Class_SandBox extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
constructor(mods: Object);
|
||||
constructor(mods: object);
|
||||
|
||||
/**
|
||||
*
|
||||
@ -57,7 +70,7 @@ declare class Class_SandBox extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
constructor(mods: Object, require: Function);
|
||||
constructor(mods: object, require: Function);
|
||||
|
||||
/**
|
||||
*
|
||||
@ -68,7 +81,7 @@ declare class Class_SandBox extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
constructor(mods: Object, global: Object);
|
||||
constructor(mods: object, global: object);
|
||||
|
||||
/**
|
||||
*
|
||||
@ -80,7 +93,7 @@ declare class Class_SandBox extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
constructor(mods: Object, require: Function, global: Object);
|
||||
constructor(mods: object, require: Function, global: object);
|
||||
|
||||
/**
|
||||
*
|
||||
@ -101,7 +114,7 @@ declare class Class_SandBox extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
add(mods: Object): void;
|
||||
add(mods: object): void;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -125,6 +138,17 @@ declare class Class_SandBox extends Class__object {
|
||||
*/
|
||||
remove(id: string): void;
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief 从沙箱中检测基础模块是否存在
|
||||
* @param id 指定要检测的模块名称,此路径与当前运行脚本无关,必须为绝对路径或者模块名
|
||||
* @return 是否存在
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
has(id: string): boolean;
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief 复制当前沙箱,新沙箱包含当前沙箱的模块,以及相同的名称和 require 函数
|
||||
@ -135,6 +159,22 @@ declare class Class_SandBox extends Class__object {
|
||||
*/
|
||||
clone(): Class_SandBox;
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief 冻结当前沙箱,冻结后的沙箱,对 global 所做的修改将被忽略
|
||||
*
|
||||
*
|
||||
*/
|
||||
freeze(): void;
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief 重新加载沙箱内的模块,此操作只会重新初始化模块,复位模块内的变量,不更新模块代码
|
||||
*
|
||||
*
|
||||
*/
|
||||
refresh(): void;
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief 运行一个脚本
|
||||
@ -170,6 +210,44 @@ declare class Class_SandBox extends Class__object {
|
||||
*/
|
||||
require(id: string, base: string): any;
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief 对指定的 extname 添加 compiler, extname 不可为系统内置扩展名 (包括 {'.js', '.json', '.jsc', '.wasm'}), compiler 需返回有效的 javascript 脚本.
|
||||
*
|
||||
* ```JavaScript
|
||||
* var vm = require('vm');
|
||||
* var sbox = new vm.SandBox({
|
||||
* });
|
||||
*
|
||||
* // 编译 typescript 脚本为 js 并加载
|
||||
* sbox.setModuleCompiler('.ts', tsCompiler);
|
||||
* var mod_ts = sbox.require('./a.ts');
|
||||
*
|
||||
* // 编译 coffee 脚本为 js 并加载
|
||||
* sbox.setModuleCompiler('.coffee', cafeCompiler);
|
||||
* var mod_coffee = sbox.require('./a.coffee');
|
||||
*
|
||||
* // 编译 jsx 脚本为 js 并加载
|
||||
* sbox.setModuleCompiler('.jsx', reactCompiler);
|
||||
* var mod_react = sbox.require('./a.jsx');
|
||||
*
|
||||
* // 编译 yml 脚本为自定义的内容(如 API 集合) 并加载
|
||||
* sbox.setModuleCompiler('.yml', yaml2Rest)
|
||||
* sbox.setModuleCompiler('.yaml', yaml2Rest)
|
||||
*
|
||||
* // 编译 markdown 为自定义的内容(如 html 字符串或 XmlDocument 对象) 并加载
|
||||
* sbox.setModuleCompiler('.md', mdCompiler)
|
||||
* sbox.setModuleCompiler('.markdown', mdCompiler)
|
||||
* ```
|
||||
*
|
||||
* @param extname 指定的 extname, 必须以 '.' 开头, 且为非系统内置扩展名
|
||||
* @param compiler 编译回调函数, 所有带 extname 的文件仅会 require 一次. 该回调函数格式为 `compiler(buf, requireInfo)`, buf 为读取到的文件 Buffer, requireInfo 结构为 `{filename: string}`.
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
setModuleCompiler(extname: string, compiler: Function): void;
|
||||
|
||||
} /** endof class */
|
||||
|
||||
/** endof `module Or Internal Object` */
|
||||
|
||||
2
types/fibjs/declare/Service.d.ts
vendored
2
types/fibjs/declare/Service.d.ts
vendored
@ -84,7 +84,7 @@ declare class Class_Service extends Class_EventEmitter {
|
||||
*
|
||||
*
|
||||
*/
|
||||
constructor(name: string, worker: Function, event?: Object/** = v8::Object::New(isolate)*/);
|
||||
constructor(name: string, worker: Function, event?: object/** = v8::Object::New(isolate)*/);
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
4
types/fibjs/declare/UrlObject.d.ts
vendored
4
types/fibjs/declare/UrlObject.d.ts
vendored
@ -216,7 +216,7 @@ declare class Class_UrlObject extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
constructor(args: Object);
|
||||
constructor(args: object);
|
||||
|
||||
/**
|
||||
*
|
||||
@ -250,7 +250,7 @@ declare class Class_UrlObject extends Class__object {
|
||||
*
|
||||
*
|
||||
*/
|
||||
format(args: Object): void;
|
||||
format(args: object): void;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
2
types/fibjs/declare/Worker.d.ts
vendored
2
types/fibjs/declare/Worker.d.ts
vendored
@ -47,7 +47,7 @@ declare class Class_Worker extends Class_EventEmitter {
|
||||
*
|
||||
*
|
||||
*/
|
||||
constructor(path: string, opts?: Object/** = v8::Object::New(isolate)*/);
|
||||
constructor(path: string, opts?: object/** = v8::Object::New(isolate)*/);
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
2
types/fibjs/declare/X509Req.d.ts
vendored
2
types/fibjs/declare/X509Req.d.ts
vendored
@ -146,7 +146,7 @@ declare class Class_X509Req extends Class__object {
|
||||
*
|
||||
* @async
|
||||
*/
|
||||
sign(issuer: string, key: Class_PKey, opts?: Object/** = v8::Object::New(isolate)*/): Class_X509Cert;
|
||||
sign(issuer: string, key: Class_PKey, opts?: object/** = v8::Object::New(isolate)*/): Class_X509Cert;
|
||||
|
||||
} /** endof class */
|
||||
|
||||
|
||||
4
types/fibjs/declare/bson.d.ts
vendored
4
types/fibjs/declare/bson.d.ts
vendored
@ -217,7 +217,7 @@ declare module "bson" {
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function encode(data: Object): Class_Buffer;
|
||||
export function encode(data: object): Class_Buffer;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -228,7 +228,7 @@ declare module "bson" {
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function decode(data: Class_Buffer): Object;
|
||||
export function decode(data: Class_Buffer): object;
|
||||
|
||||
} /** end of `module bson` */
|
||||
export = bson
|
||||
|
||||
2
types/fibjs/declare/console.d.ts
vendored
2
types/fibjs/declare/console.d.ts
vendored
@ -391,7 +391,7 @@ declare module "console" {
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function add(cfg: Object): void;
|
||||
export function add(cfg: object): void;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
4
types/fibjs/declare/dgram.d.ts
vendored
4
types/fibjs/declare/dgram.d.ts
vendored
@ -238,7 +238,7 @@ declare module "dgram" {
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function createSocket(opts: Object): Class_DgramSocket;
|
||||
export function createSocket(opts: object): Class_DgramSocket;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -260,7 +260,7 @@ declare module "dgram" {
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function createSocket(opts: Object, callback: Function): Class_DgramSocket;
|
||||
export function createSocket(opts: object, callback: Function): Class_DgramSocket;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
21
types/fibjs/declare/fs.d.ts
vendored
21
types/fibjs/declare/fs.d.ts
vendored
@ -647,6 +647,27 @@ declare module "fs" {
|
||||
*/
|
||||
export function appendFile(fname: string, data: Class_Buffer): void;
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief 设置 zip 虚拟文件映射
|
||||
* @param fname 指定映射路径
|
||||
* @param data 指定映射的 zip 文件数据
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function setZipFS(fname: string, data: Class_Buffer): void;
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief 清除 zip 虚拟文件映射
|
||||
* @param fname 指定映射路径,缺省清除全部缓存
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function clearZipFS(fname?: string/** = ""*/): void;
|
||||
|
||||
} /** end of `module fs` */
|
||||
export = fs
|
||||
}
|
||||
|
||||
2
types/fibjs/declare/global.d.ts
vendored
2
types/fibjs/declare/global.d.ts
vendored
@ -379,7 +379,7 @@ declare module "global" {
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function setTimeout(callback: Function, timeout: number, ...args: any[]): Class_Timer;
|
||||
export function setTimeout(callback: Function, timeout?: number/** = 1*/, ...args: any[]): Class_Timer;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
2
types/fibjs/declare/gui.d.ts
vendored
2
types/fibjs/declare/gui.d.ts
vendored
@ -293,7 +293,7 @@ declare module "gui" {
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function open(url: string, opt?: Object/** = v8::Object::New(isolate)*/): Class_WebView;
|
||||
export function open(url: string, opt?: object/** = v8::Object::New(isolate)*/): Class_WebView;
|
||||
|
||||
} /** end of `module gui` */
|
||||
export = gui
|
||||
|
||||
40
types/fibjs/declare/http.d.ts
vendored
40
types/fibjs/declare/http.d.ts
vendored
@ -196,7 +196,7 @@
|
||||
|
||||
/** module Or Internal Object */
|
||||
/**
|
||||
* @brief 超文本传输协议模块,用以支持 http 协议处理
|
||||
* @brief 超文本传输协议模块,用以支持 http 协议处理,模块别名:https
|
||||
* @detail
|
||||
*/
|
||||
declare module "http" {
|
||||
@ -205,6 +205,14 @@ declare module "http" {
|
||||
module http {
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief 返回标准的 HTTP 响应状态码的集合,以及各自的简短描述。
|
||||
*
|
||||
*
|
||||
*/
|
||||
export const STATUS_CODES: any[];
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief 返回http客户端的 HttpCookie 对象列表
|
||||
@ -253,6 +261,22 @@ declare module "http" {
|
||||
*/
|
||||
export const userAgent: string;
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief 查询和设置 keep-alive 最大缓存连接数,缺省 128
|
||||
*
|
||||
*
|
||||
*/
|
||||
export const poolSize: number;
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief 查询和设置 keep-alive 缓存连接超时时间,缺省 10000 ms
|
||||
*
|
||||
*
|
||||
*/
|
||||
export const poolTimeout: number;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
@ -333,7 +357,7 @@ declare module "http" {
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function fileHandler(root: string, mimes?: Object/** = v8::Object::New(isolate)*/, autoIndex?: boolean/** = false*/): Class_Handler;
|
||||
export function fileHandler(root: string, mimes?: object/** = v8::Object::New(isolate)*/, autoIndex?: boolean/** = false*/): Class_Handler;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -368,7 +392,7 @@ declare module "http" {
|
||||
*
|
||||
* @async
|
||||
*/
|
||||
export function request(method: string, url: string, opts?: Object/** = v8::Object::New(isolate)*/): Class_HttpResponse;
|
||||
export function request(method: string, url: string, opts?: object/** = v8::Object::New(isolate)*/): Class_HttpResponse;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -390,7 +414,7 @@ declare module "http" {
|
||||
*
|
||||
* @async
|
||||
*/
|
||||
export function get(url: string, opts?: Object/** = v8::Object::New(isolate)*/): Class_HttpResponse;
|
||||
export function get(url: string, opts?: object/** = v8::Object::New(isolate)*/): Class_HttpResponse;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -412,7 +436,7 @@ declare module "http" {
|
||||
*
|
||||
* @async
|
||||
*/
|
||||
export function post(url: string, opts?: Object/** = v8::Object::New(isolate)*/): Class_HttpResponse;
|
||||
export function post(url: string, opts?: object/** = v8::Object::New(isolate)*/): Class_HttpResponse;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -434,7 +458,7 @@ declare module "http" {
|
||||
*
|
||||
* @async
|
||||
*/
|
||||
export function del(url: string, opts?: Object/** = v8::Object::New(isolate)*/): Class_HttpResponse;
|
||||
export function del(url: string, opts?: object/** = v8::Object::New(isolate)*/): Class_HttpResponse;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -456,7 +480,7 @@ declare module "http" {
|
||||
*
|
||||
* @async
|
||||
*/
|
||||
export function put(url: string, opts?: Object/** = v8::Object::New(isolate)*/): Class_HttpResponse;
|
||||
export function put(url: string, opts?: object/** = v8::Object::New(isolate)*/): Class_HttpResponse;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -478,7 +502,7 @@ declare module "http" {
|
||||
*
|
||||
* @async
|
||||
*/
|
||||
export function patch(url: string, opts?: Object/** = v8::Object::New(isolate)*/): Class_HttpResponse;
|
||||
export function patch(url: string, opts?: object/** = v8::Object::New(isolate)*/): Class_HttpResponse;
|
||||
|
||||
} /** end of `module http` */
|
||||
export = http
|
||||
|
||||
68
types/fibjs/declare/index.d.ts
vendored
68
types/fibjs/declare/index.d.ts
vendored
@ -14,54 +14,54 @@
|
||||
|
||||
|
||||
|
||||
/// <reference path="assert.d.ts" />
|
||||
/// <reference path="console.d.ts" />
|
||||
/// <reference path="coroutine.d.ts" />
|
||||
/// <reference path="global.d.ts" />
|
||||
/// <reference path="gui.d.ts" />
|
||||
/// <reference path="os.d.ts" />
|
||||
/// <reference path="process.d.ts" />
|
||||
/// <reference path="registry.d.ts" />
|
||||
/// <reference path="timers.d.ts" />
|
||||
/// <reference path="tty.d.ts" />
|
||||
/// <reference path="fs.d.ts" />
|
||||
/// <reference path="io.d.ts" />
|
||||
/// <reference path="path.d.ts" />
|
||||
/// <reference path="path_posix.d.ts" />
|
||||
/// <reference path="path_win32.d.ts" />
|
||||
/// <reference path="dgram.d.ts" />
|
||||
/// <reference path="dns.d.ts" />
|
||||
/// <reference path="http.d.ts" />
|
||||
/// <reference path="mq.d.ts" />
|
||||
/// <reference path="net.d.ts" />
|
||||
/// <reference path="punycode.d.ts" />
|
||||
/// <reference path="querystring.d.ts" />
|
||||
/// <reference path="ssl.d.ts" />
|
||||
/// <reference path="url.d.ts" />
|
||||
/// <reference path="ws.d.ts" />
|
||||
/// <reference path="zmq.d.ts" />
|
||||
/// <reference path="base32.d.ts" />
|
||||
/// <reference path="base64.d.ts" />
|
||||
/// <reference path="base64vlq.d.ts" />
|
||||
/// <reference path="bson.d.ts" />
|
||||
/// <reference path="console.d.ts" />
|
||||
/// <reference path="constants.d.ts" />
|
||||
/// <reference path="coroutine.d.ts" />
|
||||
/// <reference path="crypto.d.ts" />
|
||||
/// <reference path="db.d.ts" />
|
||||
/// <reference path="dgram.d.ts" />
|
||||
/// <reference path="dns.d.ts" />
|
||||
/// <reference path="encoding.d.ts" />
|
||||
/// <reference path="fs.d.ts" />
|
||||
/// <reference path="gd.d.ts" />
|
||||
/// <reference path="global.d.ts" />
|
||||
/// <reference path="gui.d.ts" />
|
||||
/// <reference path="hash.d.ts" />
|
||||
/// <reference path="hex.d.ts" />
|
||||
/// <reference path="http.d.ts" />
|
||||
/// <reference path="iconv.d.ts" />
|
||||
/// <reference path="io.d.ts" />
|
||||
/// <reference path="json.d.ts" />
|
||||
/// <reference path="mq.d.ts" />
|
||||
/// <reference path="net.d.ts" />
|
||||
/// <reference path="os.d.ts" />
|
||||
/// <reference path="path.d.ts" />
|
||||
/// <reference path="path_posix.d.ts" />
|
||||
/// <reference path="path_win32.d.ts" />
|
||||
/// <reference path="process.d.ts" />
|
||||
/// <reference path="profiler.d.ts" />
|
||||
/// <reference path="punycode.d.ts" />
|
||||
/// <reference path="querystring.d.ts" />
|
||||
/// <reference path="registry.d.ts" />
|
||||
/// <reference path="ssl.d.ts" />
|
||||
/// <reference path="string_decoder.d.ts" />
|
||||
/// <reference path="crypto.d.ts" />
|
||||
/// <reference path="hash.d.ts" />
|
||||
/// <reference path="zip.d.ts" />
|
||||
/// <reference path="zlib.d.ts" />
|
||||
/// <reference path="assert.d.ts" />
|
||||
/// <reference path="profiler.d.ts" />
|
||||
/// <reference path="test.d.ts" />
|
||||
/// <reference path="timers.d.ts" />
|
||||
/// <reference path="tty.d.ts" />
|
||||
/// <reference path="url.d.ts" />
|
||||
/// <reference path="db.d.ts" />
|
||||
/// <reference path="gd.d.ts" />
|
||||
/// <reference path="util.d.ts" />
|
||||
/// <reference path="uuid.d.ts" />
|
||||
/// <reference path="vm.d.ts" />
|
||||
/// <reference path="ws.d.ts" />
|
||||
/// <reference path="xml.d.ts" />
|
||||
/// <reference path="zip.d.ts" />
|
||||
/// <reference path="zlib.d.ts" />
|
||||
/// <reference path="zmq.d.ts" />
|
||||
/// <reference path="constants.d.ts" />
|
||||
|
||||
import _Global from 'global';
|
||||
import _Process from 'process';
|
||||
|
||||
2
types/fibjs/declare/net.d.ts
vendored
2
types/fibjs/declare/net.d.ts
vendored
@ -284,7 +284,7 @@ declare module "net" {
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function info(): Object;
|
||||
export function info(): object;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
6
types/fibjs/declare/os.d.ts
vendored
6
types/fibjs/declare/os.d.ts
vendored
@ -380,7 +380,7 @@ declare module "os" {
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function userInfo(options?: Object/** = v8::Object::New(isolate)*/): Object;
|
||||
export function userInfo(options?: object/** = v8::Object::New(isolate)*/): object;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -390,7 +390,7 @@ declare module "os" {
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function networkInterfaces(): Object;
|
||||
export function networkInterfaces(): object;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -470,7 +470,7 @@ declare module "os" {
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function memoryUsage(): Object;
|
||||
export function memoryUsage(): object;
|
||||
|
||||
} /** end of `module os` */
|
||||
export = os
|
||||
|
||||
13
types/fibjs/declare/path.d.ts
vendored
13
types/fibjs/declare/path.d.ts
vendored
@ -341,6 +341,19 @@ declare module "path" {
|
||||
*/
|
||||
export function resolve(...ps: any[]): string;
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief 求 _from 到 to 的相对路径
|
||||
*
|
||||
* @param _from 源路径
|
||||
* @param to 目标路径
|
||||
* @return 返回得到的相对路径
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function relative(_from: string, to: string): string;
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief 转换成 namespace-prefixed 路径。只在 windows 有效,其他系统直接返回。
|
||||
|
||||
13
types/fibjs/declare/path_posix.d.ts
vendored
13
types/fibjs/declare/path_posix.d.ts
vendored
@ -341,6 +341,19 @@ declare module "path_posix" {
|
||||
*/
|
||||
export function resolve(...ps: any[]): string;
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief 求 _from 到 to 的相对路径
|
||||
*
|
||||
* @param _from 源路径
|
||||
* @param to 目标路径
|
||||
* @return 返回得到的相对路径
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function relative(_from: string, to: string): string;
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief 转换成 namespace-prefixed 路径。只在 windows 有效,其他系统直接返回。
|
||||
|
||||
13
types/fibjs/declare/path_win32.d.ts
vendored
13
types/fibjs/declare/path_win32.d.ts
vendored
@ -341,6 +341,19 @@ declare module "path_win32" {
|
||||
*/
|
||||
export function resolve(...ps: any[]): string;
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief 求 _from 到 to 的相对路径
|
||||
*
|
||||
* @param _from 源路径
|
||||
* @param to 目标路径
|
||||
* @return 返回得到的相对路径
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function relative(_from: string, to: string): string;
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief 转换成 namespace-prefixed 路径。只在 windows 有效,其他系统直接返回。
|
||||
|
||||
14
types/fibjs/declare/process.d.ts
vendored
14
types/fibjs/declare/process.d.ts
vendored
@ -416,7 +416,7 @@ declare module "process" {
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function memoryUsage(): Object;
|
||||
export function memoryUsage(): object;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -448,7 +448,7 @@ declare module "process" {
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function open(command: string, args: any[], opts?: Object/** = v8::Object::New(isolate)*/): Class_SubProcess;
|
||||
export function open(command: string, args: any[], opts?: object/** = v8::Object::New(isolate)*/): Class_SubProcess;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -468,7 +468,7 @@ declare module "process" {
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function open(command: string, opts?: Object/** = v8::Object::New(isolate)*/): Class_SubProcess;
|
||||
export function open(command: string, opts?: object/** = v8::Object::New(isolate)*/): Class_SubProcess;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -489,7 +489,7 @@ declare module "process" {
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function start(command: string, args: any[], opts?: Object/** = v8::Object::New(isolate)*/): Class_SubProcess;
|
||||
export function start(command: string, args: any[], opts?: object/** = v8::Object::New(isolate)*/): Class_SubProcess;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -509,7 +509,7 @@ declare module "process" {
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function start(command: string, opts?: Object/** = v8::Object::New(isolate)*/): Class_SubProcess;
|
||||
export function start(command: string, opts?: object/** = v8::Object::New(isolate)*/): Class_SubProcess;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -530,7 +530,7 @@ declare module "process" {
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function run(command: string, args: any[], opts?: Object/** = v8::Object::New(isolate)*/): number;
|
||||
export function run(command: string, args: any[], opts?: object/** = v8::Object::New(isolate)*/): number;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -550,7 +550,7 @@ declare module "process" {
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function run(command: string, opts?: Object/** = v8::Object::New(isolate)*/): number;
|
||||
export function run(command: string, opts?: object/** = v8::Object::New(isolate)*/): number;
|
||||
|
||||
} /** end of `module process` */
|
||||
export = process
|
||||
|
||||
2
types/fibjs/declare/profiler.d.ts
vendored
2
types/fibjs/declare/profiler.d.ts
vendored
@ -416,7 +416,7 @@ declare module "profiler" {
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function diff(test: Function): Object;
|
||||
export function diff(test: Function): object;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
4
types/fibjs/declare/querystring.d.ts
vendored
4
types/fibjs/declare/querystring.d.ts
vendored
@ -242,7 +242,7 @@ declare module "querystring" {
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function parse(str: string, sep?: string/** = "&"*/, eq?: string/** = "="*/, opt?: Object/** = v8::Object::New(isolate)*/): Class_HttpCollection;
|
||||
export function parse(str: string, sep?: string/** = "&"*/, eq?: string/** = "="*/, opt?: object/** = v8::Object::New(isolate)*/): Class_HttpCollection;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -256,7 +256,7 @@ declare module "querystring" {
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function stringify(obj: Object, sep?: string/** = "&"*/, eq?: string/** = "="*/, opt?: Object/** = v8::Object::New(isolate)*/): string;
|
||||
export function stringify(obj: object, sep?: string/** = "&"*/, eq?: string/** = "="*/, opt?: object/** = v8::Object::New(isolate)*/): string;
|
||||
|
||||
} /** end of `module querystring` */
|
||||
export = querystring
|
||||
|
||||
2
types/fibjs/declare/ssl.d.ts
vendored
2
types/fibjs/declare/ssl.d.ts
vendored
@ -196,7 +196,7 @@
|
||||
|
||||
/** module Or Internal Object */
|
||||
/**
|
||||
* @brief ssl/tls 模块
|
||||
* @brief ssl/tls 模块,模块别名:tls
|
||||
* @detail
|
||||
*/
|
||||
declare module "ssl" {
|
||||
|
||||
15
types/fibjs/declare/timers.d.ts
vendored
15
types/fibjs/declare/timers.d.ts
vendored
@ -219,7 +219,7 @@ declare module "timers" {
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function setTimeout(callback: Function, timeout: number, ...args: any[]): Class_Timer;
|
||||
export function setTimeout(callback: Function, timeout?: number/** = 1*/, ...args: any[]): Class_Timer;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -313,6 +313,19 @@ declare module "timers" {
|
||||
*/
|
||||
export function clearImmediate(t: any): void;
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief 调用给定的函数,并在超时时间到期时中断函数运行
|
||||
* @param func 指定要运行的函数
|
||||
* @param timeout 指定超时时间
|
||||
* @param args 额外的参数,传入到指定的 callback 内,可选。
|
||||
* @return 返回 func 的运行结果
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function call(func: Function, timeout: number, ...args: any[]): any;
|
||||
|
||||
} /** end of `module timers` */
|
||||
export = timers
|
||||
}
|
||||
|
||||
2
types/fibjs/declare/url.d.ts
vendored
2
types/fibjs/declare/url.d.ts
vendored
@ -217,7 +217,7 @@ declare module "url" {
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function format(args: Object): string;
|
||||
export function format(args: object): string;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
40
types/fibjs/declare/util.d.ts
vendored
40
types/fibjs/declare/util.d.ts
vendored
@ -274,7 +274,7 @@ declare module "util" {
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function inspect(obj: Object, options?: Object/** = v8::Object::New(isolate)*/): string;
|
||||
export function inspect(obj: object, options?: object/** = v8::Object::New(isolate)*/): string;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -637,6 +637,17 @@ declare module "util" {
|
||||
*/
|
||||
export function clone(v: any): any;
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief 深度冻结一个对象,被冻结后的对象及其包含的对象都将不允许修改
|
||||
*
|
||||
* @param v 指定要冻结的对象
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function deepFreeze(v: any): void;
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief 将一个或者多个对象的键值扩展到指定对象
|
||||
@ -674,7 +685,7 @@ declare module "util" {
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function pick(v: any, ...objs: any[]): Object;
|
||||
export function pick(v: any, ...objs: any[]): object;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -687,7 +698,7 @@ declare module "util" {
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function omit(v: any, ...keys: any[]): Object;
|
||||
export function omit(v: any, ...keys: any[]): object;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -937,22 +948,25 @@ declare module "util" {
|
||||
*
|
||||
* ```JavaScript
|
||||
* {
|
||||
* "fibjs": "0.1.0",
|
||||
* "svn": 1753,
|
||||
* "build": "Dec 10 2013 21:44:17",
|
||||
* "fibjs": "0.25.0",
|
||||
* "clang": "9.1",
|
||||
* "date": "Jun 12 2018 07:22:40",
|
||||
* "vender": {
|
||||
* "ev": "4.11",
|
||||
* "exif": "0.6.21",
|
||||
* "gd": "2.1.0-alpha",
|
||||
* "ev": "4.24",
|
||||
* "expat": "2.2.5",
|
||||
* "gd": "2.2.4",
|
||||
* "jpeg": "8.3",
|
||||
* "log4cpp": "1.0",
|
||||
* "leveldb": "1.17",
|
||||
* "mongo": "0.7",
|
||||
* "pcre": "8.21",
|
||||
* "png": "1.5.4",
|
||||
* "sqlite": "3.8.1",
|
||||
* "mbedtls": "2.6.1",
|
||||
* "snappy": "1.1.2",
|
||||
* "sqlite": "3.23.0",
|
||||
* "tiff": "3.9.5",
|
||||
* "uuid": "1.6.2",
|
||||
* "v8": "3.23.17 (candidate)",
|
||||
* "v8": "6.7.288.20",
|
||||
* "v8-snapshot": true,
|
||||
* "zlib": "1.2.7",
|
||||
* "zmq": "3.1"
|
||||
* }
|
||||
@ -963,7 +977,7 @@ declare module "util" {
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function buildInfo(): Object;
|
||||
export function buildInfo(): object;
|
||||
|
||||
} /** end of `module util` */
|
||||
export = util
|
||||
|
||||
36
types/fibjs/declare/zlib.d.ts
vendored
36
types/fibjs/declare/zlib.d.ts
vendored
@ -264,11 +264,12 @@ declare module "zlib" {
|
||||
*
|
||||
* @brief 创建一个 gunzip 流对象
|
||||
* @param to 用于存储处理结果的流
|
||||
* @param maxSize 指定解压缩尺寸限制,缺省为 -1,不限制
|
||||
* @return 返回封装过的流对象
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function createGunzip(to: Class_Stream): Class_Stream;
|
||||
export function createGunzip(to: Class_Stream, maxSize?: number/** = -1*/): Class_Stream;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -284,21 +285,23 @@ declare module "zlib" {
|
||||
*
|
||||
* @brief 创建一个 inflate 流对象
|
||||
* @param to 用于存储处理结果的流
|
||||
* @param maxSize 指定解压缩尺寸限制,缺省为 -1,不限制
|
||||
* @return 返回封装过的流对象
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function createInflate(to: Class_Stream): Class_Stream;
|
||||
export function createInflate(to: Class_Stream, maxSize?: number/** = -1*/): Class_Stream;
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief 创建一个 inflateRaw 流对象
|
||||
* @param to 用于存储处理结果的流
|
||||
* @param maxSize 指定解压缩尺寸限制,缺省为 -1,不限制
|
||||
* @return 返回封装过的流对象
|
||||
*
|
||||
*
|
||||
*/
|
||||
export function createInflateRaw(to: Class_Stream): Class_Stream;
|
||||
export function createInflateRaw(to: Class_Stream, maxSize?: number/** = -1*/): Class_Stream;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -340,34 +343,37 @@ declare module "zlib" {
|
||||
*
|
||||
* @brief 解压缩 deflate 算法压缩的数据(zlib格式)
|
||||
* @param data 给定压缩后的数据
|
||||
* @param maxSize 指定解压缩尺寸限制,缺省为 -1,不限制
|
||||
* @return 返回解压缩后的二进制数据
|
||||
*
|
||||
*
|
||||
* @async
|
||||
*/
|
||||
export function inflate(data: Class_Buffer): Class_Buffer;
|
||||
export function inflate(data: Class_Buffer, maxSize?: number/** = -1*/): Class_Buffer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief 解压缩 deflate 算法压缩的数据到流对象中(zlib格式)
|
||||
* @param data 给定要解压缩的数据
|
||||
* @param stm 指定存储解压缩数据的流
|
||||
* @param maxSize 指定解压缩尺寸限制,缺省为 -1,不限制
|
||||
*
|
||||
*
|
||||
* @async
|
||||
*/
|
||||
export function inflateTo(data: Class_Buffer, stm: Class_Stream): void;
|
||||
export function inflateTo(data: Class_Buffer, stm: Class_Stream, maxSize?: number/** = -1*/): void;
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief 解压缩源流中 deflate 算法压缩的数据到流对象中(zlib格式)
|
||||
* @param src 给定要解压缩的数据所在的流
|
||||
* @param stm 指定存储解压缩数据的流
|
||||
* @param maxSize 指定解压缩尺寸限制,缺省为 -1,不限制
|
||||
*
|
||||
*
|
||||
* @async
|
||||
*/
|
||||
export function inflateTo(src: Class_Stream, stm: Class_Stream): void;
|
||||
export function inflateTo(src: Class_Stream, stm: Class_Stream, maxSize?: number/** = -1*/): void;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -406,34 +412,37 @@ declare module "zlib" {
|
||||
*
|
||||
* @brief 解压缩 gzip 算法压缩的数据
|
||||
* @param data 给定压缩后的数据
|
||||
* @param maxSize 指定解压缩尺寸限制,缺省为 -1,不限制
|
||||
* @return 返回解压缩后的二进制数据
|
||||
*
|
||||
*
|
||||
* @async
|
||||
*/
|
||||
export function gunzip(data: Class_Buffer): Class_Buffer;
|
||||
export function gunzip(data: Class_Buffer, maxSize?: number/** = -1*/): Class_Buffer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief 解压缩 gzip 算法压缩的数据到流对象中
|
||||
* @param data 给定要解压缩的数据
|
||||
* @param stm 指定存储解压缩数据的流
|
||||
* @param maxSize 指定解压缩尺寸限制,缺省为 -1,不限制
|
||||
*
|
||||
*
|
||||
* @async
|
||||
*/
|
||||
export function gunzipTo(data: Class_Buffer, stm: Class_Stream): void;
|
||||
export function gunzipTo(data: Class_Buffer, stm: Class_Stream, maxSize?: number/** = -1*/): void;
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief 解压缩源流中 gzip 算法压缩的数据到流对象中
|
||||
* @param src 给定要解压缩的数据所在的流
|
||||
* @param stm 指定存储解压缩数据的流
|
||||
* @param maxSize 指定解压缩尺寸限制,缺省为 -1,不限制
|
||||
*
|
||||
*
|
||||
* @async
|
||||
*/
|
||||
export function gunzipTo(src: Class_Stream, stm: Class_Stream): void;
|
||||
export function gunzipTo(src: Class_Stream, stm: Class_Stream, maxSize?: number/** = -1*/): void;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -475,34 +484,37 @@ declare module "zlib" {
|
||||
*
|
||||
* @brief 解压缩 deflate 算法压缩的数据(inflateRaw)
|
||||
* @param data 给定压缩后的数据
|
||||
* @param maxSize 指定解压缩尺寸限制,缺省为 -1,不限制
|
||||
* @return 返回解压缩后的二进制数据
|
||||
*
|
||||
*
|
||||
* @async
|
||||
*/
|
||||
export function inflateRaw(data: Class_Buffer): Class_Buffer;
|
||||
export function inflateRaw(data: Class_Buffer, maxSize?: number/** = -1*/): Class_Buffer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief 解压缩 deflate 算法压缩的数据到流对象中(inflateRaw)
|
||||
* @param data 给定要解压缩的数据
|
||||
* @param stm 指定存储解压缩数据的流
|
||||
* @param maxSize 指定解压缩尺寸限制,缺省为 -1,不限制
|
||||
*
|
||||
*
|
||||
* @async
|
||||
*/
|
||||
export function inflateRawTo(data: Class_Buffer, stm: Class_Stream): void;
|
||||
export function inflateRawTo(data: Class_Buffer, stm: Class_Stream, maxSize?: number/** = -1*/): void;
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief 解压缩源流中 deflate 算法压缩的数据到流对象中(inflateRaw)
|
||||
* @param src 给定要解压缩的数据所在的流
|
||||
* @param stm 指定存储解压缩数据的流
|
||||
* @param maxSize 指定解压缩尺寸限制,缺省为 -1,不限制
|
||||
*
|
||||
*
|
||||
* @async
|
||||
*/
|
||||
export function inflateRawTo(src: Class_Stream, stm: Class_Stream): void;
|
||||
export function inflateRawTo(src: Class_Stream, stm: Class_Stream, maxSize?: number/** = -1*/): void;
|
||||
|
||||
} /** end of `module zlib` */
|
||||
export = zlib
|
||||
|
||||
2
types/fibjs/index.d.ts
vendored
2
types/fibjs/index.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
// Type definitions for fibjs 0.25
|
||||
// Type definitions for fibjs 0.26
|
||||
// Project: https://github.com/fibjs/fibjs
|
||||
// Definitions by: richardo2016 <https://github.com/richardo2016>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
12
types/fscreen/index.d.ts
vendored
12
types/fscreen/index.d.ts
vendored
@ -1,9 +1,13 @@
|
||||
// Type definitions for fscreen 1.0
|
||||
// Project: https://github.com/rafrex/fscreen#readme
|
||||
// Definitions by: Joscha Feth <https://github.com/joscha>
|
||||
// Terry Mun <https://github.com/terrymun>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
type Handler = () => void;
|
||||
type Handler = (e?: Event) => void;
|
||||
type RequestFullScreenFunction = (element: Element) => void;
|
||||
type EventName = 'fullscreenEnabled' | 'fullscreenElement' | 'requestFullscreen' | 'exitFullscreen' | 'fullscreenchange' | 'fullscreenerror';
|
||||
|
||||
declare class Fscreen {
|
||||
readonly fullscreenElement: Element | undefined;
|
||||
@ -12,10 +16,10 @@ declare class Fscreen {
|
||||
onfullscreenchange: Handler;
|
||||
onfullscreenerror: Handler;
|
||||
|
||||
addEventListener(type: string, handler: Handler, useCapture?: boolean): void;
|
||||
removeEventListener(type: string, handler: Handler): void;
|
||||
addEventListener(type: EventName, handler: Handler, options?: boolean | AddEventListenerOptions): void;
|
||||
removeEventListener(type: EventName, handler: Handler, options?: boolean | AddEventListenerOptions): void;
|
||||
requestFullscreen(element: Element): void;
|
||||
requestFullscreenFunction(element: Element): void;
|
||||
requestFullscreenFunction(element: Element): RequestFullScreenFunction;
|
||||
}
|
||||
|
||||
declare const fscreen: Fscreen;
|
||||
|
||||
11
types/gc-stats/gc-stats-tests.ts
Normal file
11
types/gc-stats/gc-stats-tests.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import GCStats = require("gc-stats");
|
||||
import { GCStatistics } from "gc-stats";
|
||||
|
||||
const gcStats = GCStats();
|
||||
|
||||
gcStats.on("stats", (stats: GCStatistics) => {
|
||||
const { gctype: gcType, startTime, endTime, before, after, diff } = stats;
|
||||
const beforeMallocedMemory = before.mallocedMemory;
|
||||
const afterMallocedMemory = after.mallocedMemory;
|
||||
const diffMallocedMemory = diff.mallocedMemory;
|
||||
});
|
||||
34
types/gc-stats/index.d.ts
vendored
Normal file
34
types/gc-stats/index.d.ts
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
// Type definitions for gc-stats 1.2
|
||||
// Project: https://github.com/dainis/node-gcstats#readme
|
||||
// Definitions by: Vitor Fernandes <https://github.com/vfernandestoptal>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import { EventEmitter } from "events";
|
||||
|
||||
declare namespace GCStats {
|
||||
interface MemoryStatistics {
|
||||
totalHeapSize: number;
|
||||
totalHeapExecutableSize: number;
|
||||
usedHeapSize: number;
|
||||
heapSizeLimit: number;
|
||||
totalPhysicalSize: number;
|
||||
totalAvailableSize: number;
|
||||
mallocedMemory: number;
|
||||
peakMallocedMemory: number;
|
||||
}
|
||||
|
||||
interface GCStatistics {
|
||||
startTime: number;
|
||||
endTime: number;
|
||||
pause: number;
|
||||
pauseMS: number;
|
||||
gctype: 1 | 2 | 4 | 8 | 15;
|
||||
before: MemoryStatistics;
|
||||
after: MemoryStatistics;
|
||||
diff: MemoryStatistics;
|
||||
}
|
||||
}
|
||||
|
||||
declare function GCStats(): EventEmitter;
|
||||
|
||||
export = GCStats;
|
||||
23
types/gc-stats/tsconfig.json
Normal file
23
types/gc-stats/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",
|
||||
"gc-stats-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/gc-stats/tslint.json
Normal file
1
types/gc-stats/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
@ -418,7 +418,8 @@ let service = new google.maps.places.PlacesService(new HTMLDivElement());
|
||||
|
||||
service.getDetails({
|
||||
placeId: '-a1',
|
||||
fields: ['name']
|
||||
fields: ['name'],
|
||||
sessionToken: new google.maps.places.AutocompleteSessionToken()
|
||||
}, (result, status) => {
|
||||
if (status === google.maps.places.PlacesServiceStatus.NOT_FOUND) {
|
||||
return;
|
||||
|
||||
21
types/googlemaps/index.d.ts
vendored
21
types/googlemaps/index.d.ts
vendored
@ -1,14 +1,15 @@
|
||||
// Type definitions for Google Maps JavaScript API 3.30
|
||||
// Project: https://developers.google.com/maps/
|
||||
// Definitions by: Folia A/S <http://www.folia.dk>,
|
||||
// Chris Wrench <https://github.com/cgwrench>,
|
||||
// Kiarash Ghiaseddin <https://github.com/Silver-Connection/DefinitelyTyped>,
|
||||
// Grant Hutchins <https://github.com/nertzy>,
|
||||
// Denis Atyasov <https://github.com/xaolas>,
|
||||
// Michael McMullin <https://github.com/mrmcnerd>,
|
||||
// Martin Costello <https://github.com/martincostello>,
|
||||
// Definitions by: Folia A/S <http://www.folia.dk>,
|
||||
// Chris Wrench <https://github.com/cgwrench>,
|
||||
// Kiarash Ghiaseddin <https://github.com/Silver-Connection/DefinitelyTyped>,
|
||||
// Grant Hutchins <https://github.com/nertzy>,
|
||||
// Denis Atyasov <https://github.com/xaolas>,
|
||||
// Michael McMullin <https://github.com/mrmcnerd>,
|
||||
// Martin Costello <https://github.com/martincostello>,
|
||||
// Sven Kreiss <https://github.com/svenkreiss>
|
||||
// Umar Bolatov <https://github.com/bolatovumar>
|
||||
// Michael Gauthier <https://github.com/gauthierm>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/*
|
||||
@ -2542,6 +2543,10 @@ declare namespace google.maps {
|
||||
getQueryPredictions(request: QueryAutocompletionRequest, callback: (result: QueryAutocompletePrediction[], status: PlacesServiceStatus) => void): void;
|
||||
}
|
||||
|
||||
export class AutocompleteSessionToken {
|
||||
constructor();
|
||||
}
|
||||
|
||||
export interface AutocompletionRequest {
|
||||
bounds?: LatLngBounds|LatLngBoundsLiteral;
|
||||
componentRestrictions?: ComponentRestrictions;
|
||||
@ -2549,6 +2554,7 @@ declare namespace google.maps {
|
||||
location?: LatLng;
|
||||
offset?: number;
|
||||
radius?: number;
|
||||
sessionToken?: AutocompleteSessionToken;
|
||||
types?: string[];
|
||||
}
|
||||
|
||||
@ -2566,6 +2572,7 @@ declare namespace google.maps {
|
||||
export interface PlaceDetailsRequest {
|
||||
placeId: string;
|
||||
fields?: string[];
|
||||
sessionToken?: AutocompleteSessionToken;
|
||||
}
|
||||
|
||||
export interface PlaceGeometry {
|
||||
|
||||
@ -1,5 +1,14 @@
|
||||
import * as GulpJsonmin from 'gulp-jsonmin';
|
||||
import gulp = require('gulp');
|
||||
import gulpJsonmin = require('gulp-jsonmin');
|
||||
|
||||
GulpJsonmin();
|
||||
GulpJsonmin({});
|
||||
GulpJsonmin({ verbose: true });
|
||||
gulp.task('build', () => {
|
||||
return gulp.src('*.json')
|
||||
.pipe(gulpJsonmin())
|
||||
.pipe(gulp.dest('dist'));
|
||||
});
|
||||
|
||||
gulp.task('build', () => {
|
||||
return gulp.src('*.json')
|
||||
.pipe(gulpJsonmin({ verbose: true }))
|
||||
.pipe(gulp.dest('dist'));
|
||||
});
|
||||
|
||||
6
types/gulp-jsonmin/index.d.ts
vendored
6
types/gulp-jsonmin/index.d.ts
vendored
@ -7,12 +7,12 @@
|
||||
|
||||
import { Transform } from 'stream';
|
||||
|
||||
declare function jsonmin(options?: jsonmin.Options): Transform;
|
||||
declare function gulpJsonmin(options?: gulpJsonmin.Options): Transform;
|
||||
|
||||
declare namespace jsonmin {
|
||||
declare namespace gulpJsonmin {
|
||||
interface Options {
|
||||
verbose?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
export = jsonmin;
|
||||
export = gulpJsonmin;
|
||||
|
||||
10
types/gulp-pug-i18n/gulp-pug-i18n-tests.ts
Normal file
10
types/gulp-pug-i18n/gulp-pug-i18n-tests.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import gulp = require('gulp');
|
||||
import gulpPugI18n = require('gulp-pug-i18n');
|
||||
|
||||
gulp.task('build', () => {
|
||||
return gulp.src('*.pug')
|
||||
.pipe(gulpPugI18n({
|
||||
i18n: { locales: 'locales/*.json' }
|
||||
}))
|
||||
.pipe(gulp.dest('dist'));
|
||||
});
|
||||
25
types/gulp-pug-i18n/index.d.ts
vendored
Normal file
25
types/gulp-pug-i18n/index.d.ts
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
// Type definitions for gulp-pug-i18n 1.0
|
||||
// Project: https://github.com/dogancelik/gulp-pug-i18n
|
||||
// Definitions by: Romain Faust <https://github.com/romain-faust>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
import { Options as PugOptions } from 'pug';
|
||||
import { Transform } from 'stream';
|
||||
|
||||
declare function gulpPugI18n(options: gulpPugI18n.Options): Transform;
|
||||
|
||||
declare namespace gulpPugI18n {
|
||||
interface Options extends PugOptions {
|
||||
data?: any;
|
||||
i18n: {
|
||||
default?: string;
|
||||
filename?: string;
|
||||
locales: string | ReadonlyArray<string>;
|
||||
namespace?: string | null;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export = gulpPugI18n;
|
||||
23
types/gulp-pug-i18n/tsconfig.json
Normal file
23
types/gulp-pug-i18n/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",
|
||||
"gulp-pug-i18n-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/gulp-pug-i18n/tslint.json
Normal file
1
types/gulp-pug-i18n/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
9
types/hash-sum/hash-sum-tests.ts
Normal file
9
types/hash-sum/hash-sum-tests.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import sum = require("hash-sum");
|
||||
|
||||
sum(undefined);
|
||||
sum(null);
|
||||
sum({});
|
||||
sum({ hello: "world" });
|
||||
sum(100);
|
||||
sum("");
|
||||
sum(true);
|
||||
8
types/hash-sum/index.d.ts
vendored
Normal file
8
types/hash-sum/index.d.ts
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
// Type definitions for hash-sum 1.0
|
||||
// Project: https://github.com/bevacqua/hash-sum
|
||||
// Definitions by: Daniel Rosenwasser <https://github.com/DanielRosenwasser>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export = hash_sum;
|
||||
|
||||
declare function hash_sum(value: any): string;
|
||||
23
types/hash-sum/tsconfig.json
Normal file
23
types/hash-sum/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",
|
||||
"hash-sum-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/hash-sum/tslint.json
Normal file
1
types/hash-sum/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
@ -206,3 +206,12 @@ function xssFilterTest() {
|
||||
app.use(helmet.xssFilter({ setOnOldIE: false }));
|
||||
app.use(helmet.xssFilter({ setOnOldIE: true }));
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Test for {@see helmet#permittedCrossDomainPolicies} function.
|
||||
*/
|
||||
function permittedCrossDomainPoliciesTest() {
|
||||
app.use(helmet.permittedCrossDomainPolicies());
|
||||
app.use(helmet.permittedCrossDomainPolicies({}));
|
||||
app.use(helmet.permittedCrossDomainPolicies({ permittedPolicies: 'none' }));
|
||||
}
|
||||
|
||||
80
types/helmet/index.d.ts
vendored
80
types/helmet/index.d.ts
vendored
@ -11,18 +11,23 @@ export = helmet;
|
||||
|
||||
declare namespace helmet {
|
||||
export interface IHelmetConfiguration {
|
||||
contentSecurityPolicy?: boolean | IHelmetContentSecurityPolicyConfiguration,
|
||||
dnsPrefetchControl?: boolean | IHelmetDnsPrefetchControlConfiguration,
|
||||
frameguard?: boolean | IHelmetFrameguardConfiguration,
|
||||
hidePoweredBy?: boolean | IHelmetHidePoweredByConfiguration,
|
||||
hpkp?: boolean | IHelmetHpkpConfiguration,
|
||||
hsts?: boolean | IHelmetHstsConfiguration,
|
||||
ieNoOpen?: boolean,
|
||||
noCache?: boolean,
|
||||
noSniff?: boolean,
|
||||
referrerPolicy?: boolean | IHelmetReferrerPolicyConfiguration,
|
||||
xssFilter?: boolean | IHelmetXssFilterConfiguration,
|
||||
expectCt?: boolean | IHelmetExpectCtConfiguration,
|
||||
contentSecurityPolicy?: boolean | IHelmetContentSecurityPolicyConfiguration;
|
||||
dnsPrefetchControl?: boolean | IHelmetDnsPrefetchControlConfiguration;
|
||||
frameguard?: boolean | IHelmetFrameguardConfiguration;
|
||||
hidePoweredBy?: boolean | IHelmetHidePoweredByConfiguration;
|
||||
hpkp?: boolean | IHelmetHpkpConfiguration;
|
||||
hsts?: boolean | IHelmetHstsConfiguration;
|
||||
ieNoOpen?: boolean;
|
||||
noCache?: boolean;
|
||||
noSniff?: boolean;
|
||||
referrerPolicy?: boolean | IHelmetReferrerPolicyConfiguration;
|
||||
xssFilter?: boolean | IHelmetXssFilterConfiguration;
|
||||
expectCt?: boolean | IHelmetExpectCtConfiguration;
|
||||
permittedCrossDomainPolicies?: boolean | IHelmetPermittedCrossDomainPoliciesConfiguration;
|
||||
}
|
||||
|
||||
export interface IHelmetPermittedCrossDomainPoliciesConfiguration {
|
||||
permittedPolicies?: string;
|
||||
}
|
||||
|
||||
export interface IHelmetContentSecurityPolicyDirectiveFunction {
|
||||
@ -31,22 +36,22 @@ declare namespace helmet {
|
||||
export type HelmetCspDirectiveValue = string | IHelmetContentSecurityPolicyDirectiveFunction;
|
||||
|
||||
export interface IHelmetContentSecurityPolicyDirectives {
|
||||
baseUri?: HelmetCspDirectiveValue[],
|
||||
childSrc?: HelmetCspDirectiveValue[],
|
||||
connectSrc?: HelmetCspDirectiveValue[],
|
||||
defaultSrc?: HelmetCspDirectiveValue[],
|
||||
fontSrc?: HelmetCspDirectiveValue[],
|
||||
formAction?: HelmetCspDirectiveValue[],
|
||||
frameAncestors?: HelmetCspDirectiveValue[],
|
||||
frameSrc?: HelmetCspDirectiveValue[],
|
||||
imgSrc?: HelmetCspDirectiveValue[],
|
||||
mediaSrc?: HelmetCspDirectiveValue[],
|
||||
objectSrc?: HelmetCspDirectiveValue[],
|
||||
pluginTypes?: HelmetCspDirectiveValue[],
|
||||
reportUri?: string,
|
||||
sandbox?: HelmetCspDirectiveValue[],
|
||||
scriptSrc?: HelmetCspDirectiveValue[],
|
||||
styleSrc?: HelmetCspDirectiveValue[]
|
||||
baseUri?: HelmetCspDirectiveValue[];
|
||||
childSrc?: HelmetCspDirectiveValue[];
|
||||
connectSrc?: HelmetCspDirectiveValue[];
|
||||
defaultSrc?: HelmetCspDirectiveValue[];
|
||||
fontSrc?: HelmetCspDirectiveValue[];
|
||||
formAction?: HelmetCspDirectiveValue[];
|
||||
frameAncestors?: HelmetCspDirectiveValue[];
|
||||
frameSrc?: HelmetCspDirectiveValue[];
|
||||
imgSrc?: HelmetCspDirectiveValue[];
|
||||
mediaSrc?: HelmetCspDirectiveValue[];
|
||||
objectSrc?: HelmetCspDirectiveValue[];
|
||||
pluginTypes?: HelmetCspDirectiveValue[];
|
||||
reportUri?: string;
|
||||
sandbox?: HelmetCspDirectiveValue[];
|
||||
scriptSrc?: HelmetCspDirectiveValue[];
|
||||
styleSrc?: HelmetCspDirectiveValue[];
|
||||
}
|
||||
|
||||
export interface IHelmetContentSecurityPolicyConfiguration {
|
||||
@ -54,7 +59,7 @@ declare namespace helmet {
|
||||
setAllHeaders?: boolean;
|
||||
disableAndroid?: boolean;
|
||||
browserSniff?: boolean;
|
||||
directives?: IHelmetContentSecurityPolicyDirectives
|
||||
directives?: IHelmetContentSecurityPolicyDirectives;
|
||||
}
|
||||
|
||||
export interface IHelmetDnsPrefetchControlConfiguration {
|
||||
@ -62,12 +67,12 @@ declare namespace helmet {
|
||||
}
|
||||
|
||||
export interface IHelmetFrameguardConfiguration {
|
||||
action?: string,
|
||||
domain?: string
|
||||
action?: string;
|
||||
domain?: string;
|
||||
}
|
||||
|
||||
export interface IHelmetHidePoweredByConfiguration {
|
||||
setTo?: string
|
||||
setTo?: string;
|
||||
}
|
||||
|
||||
export interface IHelmetSetIfFunction {
|
||||
@ -80,14 +85,14 @@ declare namespace helmet {
|
||||
includeSubdomains?: boolean;
|
||||
reportUri?: string;
|
||||
reportOnly?: boolean;
|
||||
setIf?: IHelmetSetIfFunction
|
||||
setIf?: IHelmetSetIfFunction;
|
||||
}
|
||||
|
||||
export interface IHelmetHstsConfiguration {
|
||||
maxAge?: number;
|
||||
includeSubdomains?: boolean;
|
||||
preload?: boolean;
|
||||
setIf?: IHelmetSetIfFunction,
|
||||
setIf?: IHelmetSetIfFunction;
|
||||
force?: boolean;
|
||||
}
|
||||
|
||||
@ -195,5 +200,12 @@ declare namespace helmet {
|
||||
* @returns {e.RequestHandler}
|
||||
*/
|
||||
expectCt(options?: IHelmetExpectCtConfiguration): express.RequestHandler;
|
||||
|
||||
/**
|
||||
* @summary Adds the "X-Permitted-Cross-Domain-Policies" header.
|
||||
* @param {helmet.IHelmetPermittedCrossDomainPoliciesConfiguration} options
|
||||
* @returns {express.RequestHandler}
|
||||
*/
|
||||
permittedCrossDomainPolicies(options?: IHelmetPermittedCrossDomainPoliciesConfiguration): express.RequestHandler;
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user