Merge branch 'master' into horizontal_info

This commit is contained in:
Jason Killian
2018-10-29 10:31:21 -04:00
374 changed files with 2837 additions and 1703 deletions
+12
View File
@@ -930,6 +930,12 @@
"sourceRepoURL": "https://github.com/blakeembrey/lower-case-first",
"asOfVersion": "1.0.1"
},
{
"libraryName": "mali",
"typingsPackageName": "mali",
"sourceRepoURL": "https://github.com/malijs/mali",
"asOfVersion": "0.9.2"
},
{
"libraryName": "maquette",
"typingsPackageName": "maquette",
@@ -1200,6 +1206,12 @@
"sourceRepoURL": "https://github.com/react-ga/react-ga",
"asOfVersion": "2.3.0"
},
{
"libraryName": "react-i18next",
"typingsPackageName": "react-i18next",
"sourceRepoURL": "https://github.com/i18next/react-i18next",
"asOfVersion": "8.1.0"
},
{
"libraryName": "react-monaco-editor",
"typingsPackageName": "react-monaco-editor",
@@ -177,3 +177,31 @@ client.copyIndex('from', 'to', ()=> {})
// with scope
client.copyIndex('from', 'to', ['settings']).then(()=>{})
client.copyIndex('from', 'to', ['synonyms', 'rules'], ()=> {})
// Browsing
const browser = index.browseAll();
index.browseAll('query');
index.browseAll('', {
filters: 'dog',
});
let hits: Object[] = [];
browser.on('result', function onResult(content) {
hits = hits.concat(content.hits);
});
browser.on('end', function onEnd() {
const _message = `We got ${hits.length} hits`
});
browser.on('error', function onError(err) {
throw err;
});
browser.stop()
index.browse("", {
advancedSyntax: false,
attributesToRetrieve: ['dogs']
})
+27 -4
View File
@@ -1,11 +1,13 @@
// Type definitions for algoliasearch-client-js 3.27.0
// Type definitions for algoliasearch-client-js 3.30.0
// Project: https://github.com/algolia/algoliasearch-client-js
// Definitions by: Baptiste Coquelle <https://github.com/cbaptiste>
// Haroen Viaene <https://github.com/haroenv>
// Aurélien Hervé <https://github.com/aherve>
// Samuel Vaillant <https://github.com/samouss>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
// TypeScript Version: 2.8
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>
declare namespace algoliasearch {
/**
@@ -611,6 +613,11 @@ declare namespace algoliasearch {
options: SearchForFacetValues.Parameters,
cb: (err: Error, res: SearchForFacetValues.Response) => void
): void;
/**
* Browse an index
* https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse
*/
browse(query: string, parameters: BrowseParameters, cb: (err: Error, res: BrowseResponse) => void): void;
/**
* Browse an index
* https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse
@@ -620,7 +627,7 @@ declare namespace algoliasearch {
* Browse an index
* https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse
*/
browse(query: string): Promise<BrowseResponse>;
browse(query: string, parameters?: BrowseParameters): Promise<BrowseResponse>;
/**
* Browse an index from a cursor
* https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse
@@ -638,7 +645,7 @@ declare namespace algoliasearch {
* Browse an entire index
* https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse
*/
browseAll(): Promise<Response>;
browseAll(query?: string, parameters?: BrowseParameters): Browser;
/**
* Clear an index content
* https://github.com/algolia/algoliasearch-client-js#clear-index---clearindex
@@ -966,6 +973,22 @@ declare namespace algoliasearch {
query: string;
processingTimeMS: number;
}
type BrowseParameters = Omit<
QueryParameters,
| "typoTolerance"
| "distinct"
| "facets"
| "getRankingInfo"
| "attributesToHighlight"
| "attributesToSnippet"
>
interface Browser {
on(type: "error", cb: (err: Error) => void): void
on(type: "end", cb: () => void): void
on(type: "stop", cb: () => void): void
on(type: "result", cb: (content: BrowseResponse) => void): void
stop(): void
}
/**
* Describes a synonym object
*/
+19 -4
View File
@@ -1,4 +1,4 @@
// Type definitions for algoliasearch-client-js 3.27.0
// Type definitions for algoliasearch-client-js 3.30.0
// Project: https://github.com/algolia/algoliasearch-client-js
// Definitions by: Baptiste Coquelle <https://github.com/cbaptiste>
// Haroen Viaene <https://github.com/haroenv>
@@ -6,7 +6,9 @@
// Samuel Vaillant <https://github.com/samouss>
// Claas Brüggemann <https://github.com/ClaasBrueggemann>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
// TypeScript Version: 2.8
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>
declare namespace algoliasearch {
/**
@@ -130,6 +132,11 @@ declare namespace algoliasearch {
options: SearchForFacetValues.Parameters,
cb: (err: Error, res: SearchForFacetValues.Response) => void
): void;
/**
* Browse an index
* https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse
*/
browse(query: string, parameters: BrowseParameters, cb: (err: Error, res: BrowseResponse) => void): void;
/**
* Browse an index
* https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse
@@ -139,7 +146,7 @@ declare namespace algoliasearch {
* Browse an index
* https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse
*/
browse(query: string): Promise<BrowseResponse>;
browse(query: string, parameters?: BrowseParameters): Promise<BrowseResponse>;
/**
* Browse an index from a cursor
* https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse
@@ -194,7 +201,15 @@ declare namespace algoliasearch {
query: string;
processingTimeMS: number;
}
type BrowseParameters = Omit<
QueryParameters,
| "typoTolerance"
| "distinct"
| "facets"
| "getRankingInfo"
| "attributesToHighlight"
| "attributesToSnippet"
>
interface QueryParameters {
/**
* Query string used to perform the search
+3 -3
View File
@@ -8,7 +8,7 @@
import * as Promise from 'bluebird';
import * as events from 'events';
import { Replies, Options, Message } from './properties';
import { Replies, Options, Message, GetMessage, ConsumeMessage } from './properties';
export * from './properties';
export interface Connection extends events.EventEmitter {
@@ -40,10 +40,10 @@ export interface Channel extends events.EventEmitter {
publish(exchange: string, routingKey: string, content: Buffer, options?: Options.Publish): boolean;
sendToQueue(queue: string, content: Buffer, options?: Options.Publish): boolean;
consume(queue: string, onMessage: (msg: Message | null) => any, options?: Options.Consume): Promise<Replies.Consume>;
consume(queue: string, onMessage: (msg: ConsumeMessage | null) => any, options?: Options.Consume): Promise<Replies.Consume>;
cancel(consumerTag: string): Promise<Replies.Empty>;
get(queue: string, options?: Options.Get): Promise<Message | false>;
get(queue: string, options?: Options.Get): Promise<GetMessage | false>;
ack(message: Message, allUpTo?: boolean): void;
ackAll(): void;
+22 -2
View File
@@ -145,12 +145,32 @@ export interface Message {
properties: MessageProperties;
}
export interface MessageFields {
export interface GetMessage extends Message {
fields: GetMessageFields;
}
export interface ConsumeMessage extends Message {
fields: ConsumeMessageFields;
}
export interface CommonMessageFields {
deliveryTag: number;
redelivered: boolean;
exchange: string;
routingKey: string;
messageCount: string;
}
export interface MessageFields extends CommonMessageFields {
messageCount?: number;
consumerTag?: string;
}
export interface GetMessageFields extends CommonMessageFields {
messageCount: number;
}
export interface ConsumeMessageFields extends CommonMessageFields {
deliveryTag: number;
}
export interface MessageProperties {
+1 -1
View File
@@ -1698,7 +1698,7 @@ declare module "@arangodb/crypto" {
key: string | null,
token: string,
noVerify?: boolean
): string | null;
): object | null;
function md5(message: string): string;
function sha1(message: string): string;
function sha224(message: string): string;
+11
View File
@@ -383,6 +383,8 @@ cognitoUserPoolEvent.triggerSource === "TokenGeneration_Authentication";
cognitoUserPoolEvent.triggerSource === "TokenGeneration_NewPasswordChallenge";
cognitoUserPoolEvent.triggerSource === "TokenGeneration_AuthenticateDevice";
cognitoUserPoolEvent.triggerSource === "TokenGeneration_RefreshTokens";
cognitoUserPoolEvent.triggerSource === "UserMigration_Authentication";
cognitoUserPoolEvent.triggerSource === "UserMigration_ForgotPassword";
str = cognitoUserPoolEvent.region;
str = cognitoUserPoolEvent.userPoolId;
strOrUndefined = cognitoUserPoolEvent.userName;
@@ -404,6 +406,7 @@ strOrUndefined = cognitoUserPoolEvent.request.session![0].challengeMetadata;
strOrUndefined = cognitoUserPoolEvent.request.challengeName;
str = cognitoUserPoolEvent.request.privateChallengeParameters!["answer"];
str = cognitoUserPoolEvent.request.challengeAnswer!;
strOrUndefined = cognitoUserPoolEvent.request.password;
boolOrUndefined = cognitoUserPoolEvent.response.answerCorrect;
strOrUndefined = cognitoUserPoolEvent.response.smsMessage;
strOrUndefined = cognitoUserPoolEvent.response.emailMessage;
@@ -415,6 +418,14 @@ str = cognitoUserPoolEvent.response.publicChallengeParameters!["captchaUrl"];
str = cognitoUserPoolEvent.response.privateChallengeParameters!["answer"];
strOrUndefined = cognitoUserPoolEvent.response.challengeMetadata;
boolOrUndefined = cognitoUserPoolEvent.response.answerCorrect;
str = cognitoUserPoolEvent.response.userAttributes!["username"];
cognitoUserPoolEvent.response.finalUserStatus === "CONFIRMED";
cognitoUserPoolEvent.response.finalUserStatus === "RESET_REQUIRED";
cognitoUserPoolEvent.response.messageAction === "SUPPRESS";
cognitoUserPoolEvent.response.desiredDeliveryMediums === ["EMAIL"];
cognitoUserPoolEvent.response.desiredDeliveryMediums === ["SMS"];
cognitoUserPoolEvent.response.desiredDeliveryMediums === ["SMS", "EMAIL"];
boolOrUndefined = cognitoUserPoolEvent.response.forceAliasCreation;
// CloudFormation Custom Resource
switch (cloudformationCustomResourceEvent.RequestType) {
+10 -1
View File
@@ -22,6 +22,7 @@
// Louis Larry <https://github.com/louislarry>
// Daniel Papukchiev <https://github.com/dpapukchiev>
// Oliver Hookins <https://github.com/ohookins>
// James Gregory <https://github.com/jagregory>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
@@ -234,7 +235,9 @@ export interface CognitoUserPoolTriggerEvent {
| "TokenGeneration_Authentication"
| "TokenGeneration_NewPasswordChallenge"
| "TokenGeneration_AuthenticateDevice"
| "TokenGeneration_RefreshTokens";
| "TokenGeneration_RefreshTokens"
| "UserMigration_Authentication"
| "UserMigration_ForgotPassword";
region: string;
userPoolId: string;
userName?: string;
@@ -256,6 +259,7 @@ export interface CognitoUserPoolTriggerEvent {
challengeName?: string;
privateChallengeParameters?: { [key: string]: string };
challengeAnswer?: string;
password?: string;
};
response: {
autoConfirmUser?: boolean;
@@ -269,6 +273,11 @@ export interface CognitoUserPoolTriggerEvent {
privateChallengeParameters?: { [key: string]: string };
challengeMetadata?: string;
answerCorrect?: boolean;
userAttributes?: { [key: string]: string };
finalUserStatus?: "CONFIRMED" | "RESET_REQUIRED";
messageAction?: "SUPPRESS";
desiredDeliveryMediums?: Array<"EMAIL" | "SMS">;
forceAliasCreation?: boolean;
};
}
export type CognitoUserPoolEvent = CognitoUserPoolTriggerEvent;
+41
View File
@@ -1,6 +1,7 @@
// Type definitions for better-scroll 1.12
// Project: https://github.com/ustbhuangyi/better-scroll
// Definitions by: cloudstone <https://github.com/stoneChen>
// jack <https://github.com/cnjack>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
@@ -42,6 +43,24 @@ export interface PullUpOption {
threshold: number;
}
export interface MouseWheelOption {
speed: number;
invert: boolean;
easeTime: number;
}
export interface ZoomOption {
start: number;
min: number;
max: number;
}
export interface InfinityOption {
fetch: (count: number) => void;
render: (item: any, div: Element) => Element;
createTombstone: () => Element;
}
export interface BounceObjectOption {
top?: boolean;
bottom?: boolean;
@@ -49,6 +68,10 @@ export interface BounceObjectOption {
right?: boolean;
}
export interface DoubleClick {
delay: number;
}
export interface EaseOption {
swipe?: {
style: string;
@@ -73,6 +96,7 @@ export interface BsOption {
directionLockThreshold: number;
eventPassthrough: string | boolean;
click: boolean;
dblclick: boolean | DoubleClick;
tap: boolean;
bounce: boolean | BounceObjectOption;
bounceTime: number;
@@ -140,6 +164,23 @@ export interface BsOption {
* }
*/
pullUpLoad: Partial<PullUpOption> | boolean;
// mouseWheel: {
// speed: 20,
// invert: false,
// easeTime: 300
// }
mouseWheel: Partial<MouseWheelOption> | boolean;
// zoom: {
// start: 1,
// min: 1,
// max: 4
// }
zoom: Partial<ZoomOption> | boolean;
// https://ustbhuangyi.github.io/better-scroll/doc/zh-hans/options-advanced.html
infinity: Partial<InfinityOption> | boolean;
}
export interface Position {
+1 -1
View File
@@ -45,7 +45,7 @@ interface ReductionContext {
declare class BN {
constructor(
number: number | string | number[] | Buffer | BN,
base?: number,
base?: number | 'hex',
endian?: Endianness
);
constructor(
+17
View File
@@ -0,0 +1,17 @@
import * as caniuse from "caniuse-api";
caniuse.features; // $ExpectType string[]
caniuse.getSupport(""); // $ExpectType BrowserSupport
caniuse.isSupported("", ""); // $ExpectType boolean
caniuse.isSupported("", [""]); // $ExpectType boolean
caniuse.find(""); // $ExpectType string[]
caniuse.getLatestStableBrowsers(); // $ExpectType string[]
caniuse.setBrowserScope(""); // $ExpectType void
caniuse.setBrowserScope([""]); // $ExpectType void
caniuse.getBrowserScope(); // $ExpectType string[]
+32
View File
@@ -0,0 +1,32 @@
// Type definitions for caniuse-api 3.0
// Project: https://github.com/nyalab/caniuse-api#readme
// Definitions by: Dave Cardwell <https://github.com/davecardwell>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export const features: string[];
export interface BrowserSupport {
[browser: string]: {
y?: number;
n?: number;
a?: number;
x?: number;
};
}
export function getSupport(feature: string): BrowserSupport;
export function isSupported(
feature: string,
browsers: string | ReadonlyArray<string>
): boolean;
export function find(query: string): string[];
export function getLatestStableBrowsers(): string[];
export function setBrowserScope(
browserscope: string | ReadonlyArray<string>
): void;
export function getBrowserScope(): string[];
+16
View File
@@ -0,0 +1,16 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": ["es6"],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": ["../"],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": ["index.d.ts", "caniuse-api-tests.ts"]
}
+18
View File
@@ -808,6 +808,24 @@ function frozen() {
expect(Object.freeze({})).to.be.frozen;
({}).should.be.not.frozen;
Object.freeze({}).should.be.frozen;
expect([1, 2, 3]).to.have.all.members([1, 2, 3]);
expect([1, 2, 3]).to.have.all.members(Object.freeze([1, 2, 3]));
expect({1: "", 2: "", 3: ""}).to.have.all.keys([1, 2, 3]);
expect({1: "", 2: "", 3: ""}).to.have.all.keys(Object.freeze([1, 2, 3]));
assert.notDeepInclude([1, 2, 3], 1);
assert.notDeepInclude(Object.freeze([1, 2, 3]), 1);
assert.include([1, 2, 3], 1);
assert.include(Object.freeze([1, 2, 3]), 1);
assert.notInclude([1, 2, 3], 1);
assert.notInclude(Object.freeze([1, 2, 3]), 1);
expect([1, 2, 3]).to.have.oneOf([1, 2, 3]);
expect([1, 2, 3]).to.have.oneOf(Object.freeze([1, 2, 3]));
}
class PoorlyConstructedError {
+6 -6
View File
@@ -118,7 +118,7 @@ declare namespace Chai {
extensible: Assertion;
sealed: Assertion;
frozen: Assertion;
oneOf(list: any[], message?: string): Assertion;
oneOf(list: ReadonlyArray<any>, message?: string): Assertion;
}
interface LanguageChains {
@@ -235,7 +235,7 @@ declare namespace Chai {
interface Keys {
(...keys: string[]): Assertion;
(keys: any[]|Object): Assertion;
(keys: ReadonlyArray<any>|Object): Assertion;
}
interface Throw {
@@ -252,7 +252,7 @@ declare namespace Chai {
}
interface Members {
(set: any[], message?: string): Assertion;
(set: ReadonlyArray<any>, message?: string): Assertion;
}
interface PropertyChange {
@@ -696,7 +696,7 @@ declare namespace Chai {
* @param needle Potential value contained in haystack.
* @param message Message to display on error.
*/
include<T>(haystack: T[], needle: T, message?: string): void;
include<T>(haystack: ReadonlyArray<T>, needle: T, message?: string): void;
/**
* Asserts that haystack does not include needle.
@@ -705,7 +705,7 @@ declare namespace Chai {
* @param needle Potential expected substring of haystack.
* @param message Message to display on error.
*/
notInclude(haystack: string | any[], needle: any, message?: string): void;
notInclude(haystack: string | ReadonlyArray<any>, needle: any, message?: string): void;
/**
* Asserts that haystack includes needle. Can be used to assert the inclusion of a value in an array or a subset of properties in an object. Deep equality is used.
@@ -732,7 +732,7 @@ declare namespace Chai {
* @param needle Potential expected substring of haystack.
* @param message Message to display on error.
*/
notDeepInclude(haystack: string | any[], needle: any, message?: string): void;
notDeepInclude(haystack: string | ReadonlyArray<any>, needle: any, message?: string): void;
/**
* Asserts that ‘haystack’ includes ‘needle’. Can be used to assert the inclusion of a subset of properties in an object.
+79 -40
View File
@@ -612,7 +612,10 @@ declare namespace chrome {
* @deprecated Deprecated since Chrome 36. Use innerBounds or outerBounds.
*/
maxHeight?: integer;
/** Type of window to create */
/**
* @deprecated Deprecated since Chrome 69. All app windows use the 'shell' window type.
* @description Type of window to create
**/
type?: 'shell';
/**
* If true, the window will have its own shelf icon.
@@ -919,7 +922,8 @@ declare namespace chrome {
level?: integer;
}
/**
* Device properties by which to filter the list of returned audio devices. If the filter is not set or set to {}, returned device list will contain all available audio devices.
* Device properties by which to filter the list of returned audio devices.
* If the filter is not set or set to {}, returned device list will contain all available audio devices.
*/
interface Filter {
/**
@@ -1083,8 +1087,9 @@ declare namespace chrome {
function getDevices(callback: (devices: Device[]) => void): void;
/**
* Get a list of Bluetooth devices known to the system, including paired and recently discovered devices.
* @param filter Since Chrome 67. Some criteria to filter the list of returned bluetooth devices. If the filter is not set or set to {}, returned device list will contain all bluetooth devices. Right now this is only supported in ChromeOS, for other platforms, a full list is returned.
* @since Chrome 67.
* @description Get a list of Bluetooth devices known to the system, including paired and recently discovered devices.
* @param filter Some criteria to filter the list of returned bluetooth devices. If the filter is not set or set to {}, returned device list will contain all bluetooth devices. Right now this is only supported in ChromeOS, for other platforms, a full list is returned.
* @param callback Called when the search is completed.
*/
function getDevices(filter: DeviceFilter, callback: (devices: Device[]) => void): void;
@@ -2082,12 +2087,12 @@ declare namespace chrome {
/**
* **Dev channel only.**
* Sets image data to clipboard
* @param imageData The encoded image data. *Since Chrome 70. Warning: this is the current Beta channel.*
* @param type The type of image being passed. *Since Chrome 70. Warning: this is the current Beta channel.*
* @param imageData The encoded image data. *Since Chrome 71. Warning: this is the current Dev channel.*
* @param type The type of image being passed. *Since Chrome 71. Warning: this is the current Dev channel.*
* @param [additionalItems] Additional data items for describing image data.
* The callback is called with chrome.runtime.lastError set to error code if there is an error.
* Requires clipboard and clipboardWrite permissions.
* *Since Chrome 70. Warning: this is the current Beta channel.*
* *Since Chrome 71. Warning: this is the current Dev channel.*
* @param [callback]
*/
function setImageData(imageData: ArrayBuffer, type: ImageType, additionalItems?: AdditionalItems, callback?: () => void): void;
@@ -3078,7 +3083,8 @@ declare namespace chrome {
'document_end' |
'document_idle';
/**
* The origin of injected CSS.
* @since Chrome 66.
* @description The origin of injected CSS.
**/
type CSSOrigin =
'author' |
@@ -5968,6 +5974,11 @@ declare namespace chrome {
SSID?: S;
/** The network signal strength. */
SignalStrength?: integer;
/**
* @since Chrome 70
* @description The tethering state associated with the connection.
*/
TetheringState?: string;
}
interface WiFiProperties<M extends ManagedObject = 'unmanaged',
OF extends _internal_.ObjectFunction = 'getter',
@@ -6379,8 +6390,8 @@ declare namespace chrome {
progress?: integer;
/**
* Whether to show UI indicating that the app will visibly respond to clicks on the body of a notification.
* @since Chrome 32.
* @deprecated Deprecated since Chrome 67. This UI hint is ignored as of Chrome 67
* @description Whether to show UI indicating that the app will visibly respond to clicks on the body of a notification.
*/
isClickable?: boolean;
@@ -6391,6 +6402,13 @@ declare namespace chrome {
* @since Chrome 50
*/
requireInteraction?: boolean;
/**
* @since Chrome 70.
* @description Indicates that no sounds or vibrations should be made when the notification is being shown.
* @default false
*/
silent?: boolean;
}
/** The notification closed, either by the system or by user action. */
@@ -6405,8 +6423,10 @@ declare namespace chrome {
*/
const onPermissionLevelChanged: chrome.events.Event<(level: string) => void>;
/**
* The user clicked on a link for the app's notification settings.
* @since Chrome 32.
* @deprecated Deprecated since Chrome 65. Custom notification settings button is no longer supported.
* @description The user clicked on a link for the app's notification settings.
* As of Chrome 47, only ChromeOS has UI that dispatches this event.
* As of Chrome 65, that UI has been removed from ChromeOS, too.
*/
const onShowSettings: chrome.events.Event<() => void>;
@@ -9319,7 +9339,10 @@ declare namespace chrome {
/** The display mode height in native pixels. */
heightInNativePixels: integer;
/** The display mode UI scale factor. */
/**
* @deprecated Deprecated since Chrome 70. Use `displayZoomFactor`
* @description The display mode UI scale factor.
**/
uiScale: integer;
/** The display mode device scale factor. */
@@ -9380,15 +9403,16 @@ declare namespace chrome {
* If set to true, changes the display mode to unified desktop.
* If set to false, unified desktop mode will be disabled.
* This is only valid for the primary display.
* If provided, mirroringSourceId must not be provided and other properties may not apply. This is has no effect if not provided.
* @see(See enableUnifiedDesktop for details).
* If provided, mirroringSourceId must not be provided and other properties may not apply.
* This is has no effect if not provided.
* @see(See `enableUnifiedDesktop` for details).
* @since Chrome 59
* */
isUnified?: boolean;
/**
* @requires(CrOS) Chrome OS only.
* @deprecated Deprecated since Chrome 68. Use *setMirrorMode*
* @deprecated Deprecated since Chrome 68. Use ´setMirrorMode´
* @see setMirrorMode
* @description
* If set and not empty, enables mirroring for this display.
@@ -9416,7 +9440,7 @@ declare namespace chrome {
* If set, updates the display's rotation.
* Legal values are [0, 90, 180, 270].
* The rotation is set clockwise, relative to the display's vertical position.
* It's applied after overscan paramter.
* It's applied after overscan parameter.
*/
rotation?: 0 | 90 | 180 | 270;
@@ -9912,10 +9936,10 @@ declare namespace chrome {
/** The language that this voice supports, in the form language-region. Examples: 'en', 'en-US', 'en-GB', 'zh-CN'. */
lang?: string;
/**
* This voice's gender.
* One of: 'male', or 'female'
* @deprecated Deprecated since Chrome 70. Gender is deprecated and will be ignored.
* @description This voice's gender.
*/
gender?: string;
gender?: 'male' | 'female';
/** The name of the voice. */
voiceName?: string;
/** The ID of the extension providing this voice. */
@@ -9959,10 +9983,10 @@ declare namespace chrome {
/** The extension ID of the speech engine to use, if known. */
extensionId?: string;
/**
* Gender of voice for synthesized speech.
* One of: 'male', or 'female'
* @deprecated Deprecated since Chrome 70. Gender is deprecated and will be ignored.
* @description Gender of voice for synthesized speech.
*/
gender?: string;
gender?: 'male' | 'female';
/** The TTS event types the voice must support. */
requiredEventTypes?: string[];
/** The TTS event types that you are interested in listening to. If missing, all event types may be sent. */
@@ -10983,7 +11007,7 @@ declare namespace chrome {
*/
class RequestMatcher {
protected readonly typeGuard: 'RequestMatcher';
constructor (parameters?: RequestMatcherFields);
constructor(parameters?: RequestMatcherFields);
public readonly instanceType: string;
}
@@ -11001,7 +11025,7 @@ declare namespace chrome {
/** Declarative event action that redirects a network request. */
class RedirectRequest {
protected readonly typeGuard: 'RedirectRequest';
constructor (parameters: RedirectRequestParams);
constructor(parameters: RedirectRequestParams);
public readonly instanceType: string;
}
@@ -11036,7 +11060,7 @@ declare namespace chrome {
*/
class RedirectByRegEx {
protected readonly typeGuard: 'RedirectByRegEx';
constructor (parameters: RedirectByRegExParams);
constructor(parameters: RedirectByRegExParams);
public readonly instanceType: string;
}
@@ -11055,7 +11079,7 @@ declare namespace chrome {
*/
class SetRequestHeader {
protected readonly typeGuard: 'SetRequestHeader';
constructor (parameters: SetRequestHeaderParams);
constructor(parameters: SetRequestHeaderParams);
public readonly instanceType: string;
}
@@ -11072,7 +11096,7 @@ declare namespace chrome {
*/
class RemoveRequestHeader {
protected readonly typeGuard: 'RemoveRequestHeader';
constructor (parameters: RemoveRequestHeaderParams);
constructor(parameters: RemoveRequestHeaderParams);
public readonly instanceType: string;
}
@@ -11091,7 +11115,7 @@ declare namespace chrome {
*/
class AddResponseHeader {
protected readonly typeGuard: 'AddResponseHeader';
constructor (parameters: AddResponseHeaderParams);
constructor(parameters: AddResponseHeaderParams);
public readonly instanceType: string;
}
@@ -11107,7 +11131,7 @@ declare namespace chrome {
*/
class RemoveResponseHeader {
protected readonly typeGuard: 'RemoveResponseHeader';
constructor (parameters: RemoveResponseHeaderParams);
constructor(parameters: RemoveResponseHeaderParams);
public readonly instanceType: string;
}
@@ -11133,7 +11157,7 @@ declare namespace chrome {
*/
class IgnoreRules {
protected readonly typeGuard: 'IgnoreRules';
constructor (parameters: IgnoreRulesParams);
constructor(parameters: IgnoreRulesParams);
public readonly instanceType: string;
}
@@ -11150,7 +11174,7 @@ declare namespace chrome {
*/
class SendMessageToExtension {
protected readonly typeGuard: 'SendMessageToExtension';
constructor (parameters: SendMessageParams);
constructor(parameters: SendMessageParams);
public readonly instanceType: string;
}
@@ -11248,7 +11272,7 @@ declare namespace chrome {
*/
class AddRequestCookie {
protected readonly typeGuard: 'AddRequestCookie';
constructor (parameters: AddCookie<RequestCookie>);
constructor(parameters: AddCookie<RequestCookie>);
public readonly instanceType: string;
}
@@ -11259,7 +11283,7 @@ declare namespace chrome {
*/
class AddResponseCookie {
protected readonly typeGuard: 'AddResponseCookie';
constructor (parameters: AddCookie<ResponseCookie>);
constructor(parameters: AddCookie<ResponseCookie>);
public readonly instanceType: string;
}
@@ -11292,7 +11316,7 @@ declare namespace chrome {
* @param modification Attributes that shall be overridden in cookies that machted the filter.
* Attributes that are set to an empty string are removed.
*/
constructor (parameters: EditCookieParams<RequestCookie, RequestCookie>);
constructor(parameters: EditCookieParams<RequestCookie, RequestCookie>);
public readonly instanceType: string;
}
@@ -11306,7 +11330,7 @@ declare namespace chrome {
* @param filter Filter for cookies that will be modified.All empty entries are ignored.
* @param modification
*/
constructor (parameter: EditCookieParams<FilterResponseCookie, ResponseCookie>);
constructor(parameter: EditCookieParams<FilterResponseCookie, ResponseCookie>);
public readonly instanceType: string;
}
@@ -11316,7 +11340,7 @@ declare namespace chrome {
*/
class RemoveRequestCookie {
protected readonly typeGuard: 'RemoveRequestCookie';
constructor (parameters: RemoveCookieParams<RequestCookie>);
constructor(parameters: RemoveCookieParams<RequestCookie>);
public readonly instanceType: string;
}
@@ -11340,7 +11364,7 @@ declare namespace chrome {
*/
class RemoveResponseCookie {
protected readonly typeGuard: 'RemoveResponseCookie';
constructor (parameters: RemoveCookieParams<FilterResponseCookie>);
constructor(parameters: RemoveCookieParams<FilterResponseCookie>);
public readonly instanceType: string;
}
@@ -11518,7 +11542,7 @@ declare namespace chrome {
*/
declare class HTMLAppViewElement extends HTMLElement {
/** Create a new AppView tag */
constructor ();
constructor();
/**
* Requests another app to be embedded.
* @param app The extension id of the app to be embedded.
@@ -11626,7 +11650,7 @@ declare class HTMLWebViewElement extends HTMLElement {
src: string;
/** Create a new element */
constructor ();
constructor();
/**
* Queries audio state.
@@ -11908,6 +11932,21 @@ declare class HTMLWebViewElement extends HTMLElement {
*/
loadDataWithBaseUrl(dataUrl: string, baseUrl: string, virtualUrl?: string): void;
/**
* @since Chrome 71
* @description Sets spatial navigation state of the webview.
* @param enabled Spatial navigation state value.
*/
setSpatialNavigationEnabled(enabled: boolean): void;
/**
* @since Chrome 71
* @description Queries whether spatial navigation is enabled for the webview.
* @param callback Callback that will provide the value of the spatial navigation state.
*/
isSpatialNavigationEnabled(callback: (enabled: boolean) => void): void;
/**
* Forcibly kills the guest web page's renderer process.
* This may affect multiple webview tags in the current app if they share the same process,
+14
View File
@@ -1114,6 +1114,7 @@ chrome.networking.onc.getNetworks({ 'networkType': 'All' }, (networkList) => {
if (networkObj.WiFi) {
// WiFi active :)
console.log('Wifi BSID: ' + networkObj.WiFi.BSSID);
const state = networkObj.WiFi.TetheringState;
}
chrome.networking.onc.setProperties(networkObj.GUID || '', {
WiFi: {
@@ -1124,6 +1125,19 @@ chrome.networking.onc.getNetworks({ 'networkType': 'All' }, (networkList) => {
chrome.networking.onc.getProperties(networkObj.GUID || '', (props) => {
const WiFiResult = props.WiFi;
});
chrome.networking.onc.getState(networkObj.GUID || '', (state) => {
const wifiState = state.WiFi || {};
return wifiState.TetheringState;
});
chrome.networking.onc.getManagedProperties(networkObj.GUID || '', (result) => {
const wifiResult = result.WiFi;
if (wifiResult !== undefined) {
const managed = wifiResult.HexSSID;
if (managed !== undefined) {
return managed.UserPolicy;
}
}
});
}
});
+2 -2
View File
@@ -4525,12 +4525,12 @@ declare namespace chrome.pageAction {
* Shows the page action. The page action is shown whenever the tab is selected.
* @param tabId The id of the tab for which you want to modify the page action.
*/
export function hide(tabId: number): void;
export function hide(tabId: number, callback?: () => void): void;
/**
* Shows the page action. The page action is shown whenever the tab is selected.
* @param tabId The id of the tab for which you want to modify the page action.
*/
export function show(tabId: number): void;
export function show(tabId: number, callback?: () => void): void;
/** Sets the title of the page action. This is displayed in a tooltip over the page action. */
export function setTitle(details: TitleDetails): void;
/** Sets the html document to be opened as a popup when the user clicks on the page action's icon. */
+3
View File
@@ -0,0 +1,3 @@
import domLoaded = require("dom-loaded");
domLoaded.then(() => console.log("DOM is loaded"));
+7
View File
@@ -0,0 +1,7 @@
// Type definitions for dom-loaded 1.0
// Project: https://github.com/sindresorhus/dom-loaded#readme
// Definitions by: Lukas Tetzlaf <https://github.com/ltetzlaff>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare const domLoaded: Promise<void>;
export = domLoaded;
@@ -15,19 +15,10 @@
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true,
"jsx": "react",
"experimentalDecorators": true
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"test/react-i18next-tests.tsx",
"src/context.d.ts",
"src/I18n.d.ts",
"src/I18nextProvider.d.ts",
"src/interpolate.d.ts",
"src/loadNamespaces.d.ts",
"src/trans.d.ts",
"src/translate.d.ts"
"dom-loaded-tests.ts"
]
}
}
@@ -41,7 +41,7 @@ googletag.openConsole();
googletag.setAdIframeTitle("title");
googletag.cmd.push(function() {
googletag.cmd.push(() => {
googletag.defineSlot("/1234567/sports", [160, 600]).
addService(googletag.pubads());
});
@@ -79,8 +79,8 @@ googletag.pubads().definePassback("/1234567/sports", [468, 60]).
display();
googletag.pubads().definePassback("/1234567/sports", [160, 600]).
updateTargetingFromMap({"color": "red",
"interests": ["sports", "music", "movies"]}).
updateTargetingFromMap({color: "red",
interests: ["sports", "music", "movies"]}).
display();
googletag.pubads().enableLazyLoad();
@@ -262,7 +262,7 @@ googletag.pubads().updateCorrelator();
// The listener will be called only when the pubads service renders a slot.
// To listen to companion ads, add a similar listener to
// googletag.companionAds().
googletag.pubads().addEventListener("slotRenderEnded", function(event: googletag.events.SlotRenderEndedEvent) {
googletag.pubads().addEventListener("slotRenderEnded", (event: googletag.events.SlotRenderEndedEvent) => {
console.log("Slot has been rendered:");
console.log(event);
});
@@ -273,7 +273,7 @@ googletag.pubads().addEventListener("slotRenderEnded", function(event: googletag
// however, programmatically filter a listener to respond only to a certain
// ad slot, using this pattern:
let targetSlot = slot1;
googletag.pubads().addEventListener("slotRenderEnded", function(event: googletag.events.SlotRenderEndedEvent) {
googletag.pubads().addEventListener("slotRenderEnded", (event: googletag.events.SlotRenderEndedEvent) => {
if (event.slot === targetSlot) {
// Slot specific logic.
}
@@ -283,7 +283,7 @@ googletag.pubads().addEventListener("slotRenderEnded", function(event: googletag
// The listener will be called when the impression is considered viewable.
// This event also operates at service level, but, as above, you can filter
// to respond only to a certain ad slot by using this pattern:
googletag.pubads().addEventListener("impressionViewable", function(event: googletag.events.ImpressionViewableEvent) {
googletag.pubads().addEventListener("impressionViewable", (event: googletag.events.ImpressionViewableEvent) => {
if (event.slot === targetSlot) {
// Slot specific logic.
}
@@ -317,7 +317,6 @@ slot.clearCategoryExclusions();
// Make an ad request. Any ad can be returned for the slot.
slot = googletag.defineSlot("/1234567/sports", [160, 600], "div-1").
setTargeting("allow_expandable", "true").
setTargeting("interests", ["sports", "music", "movies"]).
+31 -30
View File
@@ -1,29 +1,30 @@
// Type definitions for Google Publisher Tag v238
// Type definitions for Google Publisher Tag 238.0
// Project: https://developers.google.com/doubleclick-gpt/reference
// Definitions by: John Wright <https://github.com/johngeorgewright>
// Steven Joyce <https://github.com/steven-joyce>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
declare namespace googletag {
export type SingleSizeArray = number[];
type SingleSizeArray = number[];
export type NamedSize = string | string[];
type NamedSize = string | string[];
export type SingleSize = SingleSizeArray | NamedSize;
type SingleSize = SingleSizeArray | NamedSize;
export type MultiSize = SingleSize[];
type MultiSize = SingleSize[];
export type GeneralSize = SingleSize | MultiSize;
type GeneralSize = SingleSize | MultiSize;
export type SizeMapping = GeneralSize[];
type SizeMapping = GeneralSize[];
export type SizeMappingArray = SizeMapping[];
type SizeMappingArray = SizeMapping[];
export interface CommandArray {
push(f: Function): number;
interface CommandArray {
push(f: () => void): number;
}
export interface Service {
interface Service {
addEventListener(
eventType: string,
listener: (event: events.ImpressionViewableEvent | events.SlotOnloadEvent | events.SlotRenderEndedEvent | events.slotVisibilityChangedEvent) => void
@@ -31,29 +32,29 @@ declare namespace googletag {
getSlots(): Slot[];
}
export interface CompanionAdsService extends Service {
interface CompanionAdsService extends Service {
enableSyncLoading(): void;
setRefreshUnfilledSlots(value: boolean): void;
}
export interface ContentService extends Service {
setContent(slot: Slot, content: String): void;
interface ContentService extends Service {
setContent(slot: Slot, content: string): void;
}
export interface LazyLoadOptionsConfig {
fetchMarginPercent?: number,
renderMarginPercent?: number,
mobileScaling?: number
interface LazyLoadOptionsConfig {
fetchMarginPercent?: number;
renderMarginPercent?: number;
mobileScaling?: number;
}
export interface ResponseInformation {
interface ResponseInformation {
advertiserId: string;
campaignId: string;
creativeId?: number;
lineItemId?: number;
}
export interface SafeFrameConfig {
interface SafeFrameConfig {
allowOverlayExpansion?: boolean;
allowPushExpansion?: boolean;
sandbox?: boolean;
@@ -78,7 +79,7 @@ declare namespace googletag {
sizeMapping(): SizeMappingBuilder;
}
export interface Slot {
interface Slot {
addService(service: Service): Slot;
clearCategoryExclusions(): Slot;
clearTargeting(opt_key?: string): Slot;
@@ -100,7 +101,7 @@ declare namespace googletag {
setTargeting(key: string, value: string | string[]): Slot;
}
export interface PassbackSlot {
interface PassbackSlot {
display(): void;
get(key: string): string;
set(key: string, value: string): PassbackSlot;
@@ -109,10 +110,10 @@ declare namespace googletag {
setTagForChildDirectedTreatment(value: number): PassbackSlot;
setTagForUnderAgeOfConsent(value: number): PassbackSlot;
setTargeting(key: string, value: string | string[]): PassbackSlot;
updateTargetingFromMap(map: Object): PassbackSlot;
updateTargetingFromMap(map: object): PassbackSlot;
}
export interface PubAdsService extends Service {
interface PubAdsService extends Service {
clear(opt_slots?: Slot[]): boolean;
clearCategoryExclusions(): PubAdsService;
clearTagForChildDirectedTreatment(): PubAdsService;
@@ -148,23 +149,23 @@ declare namespace googletag {
updateCorrelator(): PubAdsService;
}
export interface SizeMappingBuilder {
interface SizeMappingBuilder {
addSize(viewportSize: SingleSizeArray, slotSize: GeneralSize): SizeMappingBuilder;
build(): SizeMappingArray;
}
export namespace events {
export interface ImpressionViewableEvent {
namespace events {
interface ImpressionViewableEvent {
serviceName: string;
slot: Slot;
}
export interface SlotOnloadEvent {
interface SlotOnloadEvent {
serviceName: string;
slot: Slot;
}
export interface SlotRenderEndedEvent {
interface SlotRenderEndedEvent {
advertiserId?: number;
creativeId?: number;
isEmpty: boolean;
@@ -176,7 +177,7 @@ declare namespace googletag {
sourceAgnosticLineItemId?: number;
}
export interface slotVisibilityChangedEvent {
interface slotVisibilityChangedEvent {
inViewPercentage: number;
serviceName: string;
slot: Slot;
+1 -2
View File
@@ -1,5 +1,4 @@
{
"compileOnSave": false,
"compilerOptions": {
"module": "commonjs",
"lib": [
@@ -22,4 +21,4 @@
"index.d.ts",
"doubleclick-gpt-tests.ts"
]
}
}
+1 -77
View File
@@ -1,79 +1,3 @@
{
"extends": "dtslint/dt.json",
"rules": {
"adjacent-overload-signatures": false,
"array-type": false,
"arrow-return-shorthand": false,
"ban-types": false,
"callable-types": false,
"comment-format": false,
"dt-header": false,
"eofline": false,
"export-just-namespace": false,
"import-spacing": false,
"interface-name": false,
"interface-over-type-literal": false,
"jsdoc-format": false,
"max-line-length": false,
"member-access": false,
"new-parens": false,
"no-any-union": false,
"no-boolean-literal-compare": false,
"no-conditional-assignment": false,
"no-consecutive-blank-lines": false,
"no-construct": false,
"no-declare-current-package": false,
"no-duplicate-imports": false,
"no-duplicate-variable": false,
"no-empty-interface": false,
"no-for-in-array": false,
"no-inferrable-types": false,
"no-internal-module": false,
"no-irregular-whitespace": false,
"no-mergeable-namespace": false,
"no-misused-new": false,
"no-namespace": false,
"no-object-literal-type-assertion": false,
"no-padding": false,
"no-redundant-jsdoc": false,
"no-redundant-jsdoc-2": false,
"no-redundant-undefined": false,
"no-reference-import": false,
"no-relative-import-in-test": false,
"no-self-import": false,
"no-single-declare-module": false,
"no-string-throw": false,
"no-unnecessary-callback-wrapper": false,
"no-unnecessary-class": false,
"no-unnecessary-generics": false,
"no-unnecessary-qualifier": false,
"no-unnecessary-type-assertion": false,
"no-useless-files": false,
"no-var-keyword": false,
"no-var-requires": false,
"no-void-expression": false,
"no-trailing-whitespace": false,
"object-literal-key-quotes": false,
"object-literal-shorthand": false,
"one-line": false,
"one-variable-per-declaration": false,
"only-arrow-functions": false,
"prefer-conditional-expression": false,
"prefer-const": false,
"prefer-declare-function": false,
"prefer-for-of": false,
"prefer-method-signature": false,
"prefer-template": false,
"radix": false,
"semicolon": false,
"space-before-function-paren": false,
"space-within-parens": false,
"strict-export-declare-modifiers": false,
"trim-file": false,
"triple-equals": false,
"typedef-whitespace": false,
"unified-signatures": false,
"void-return": false,
"whitespace": false
}
"extends": "dtslint/dt.json"
}
+4
View File
@@ -989,6 +989,8 @@ import getVisibleSelectionRect = Draft.Component.Selection.getVisibleSelectionRe
import DraftEditorCommand = Draft.Model.Constants.DraftEditorCommand;
import DraftDragType = Draft.Model.Constants.DraftDragType;
import DraftBlockType = Draft.Model.Constants.DraftBlockType;
import DraftBlockRenderConfig = Draft.Model.ImmutableData.DraftBlockRenderConfig;
import DraftBlockRenderMap = Draft.Component.Base.DraftBlockRenderMap;
import DraftInlineStyleType = Draft.Model.Constants.DraftInlineStyleType;
import DraftEntityMutability = Draft.Model.Constants.DraftEntityMutability;
import DraftEntityType = Draft.Model.Constants.DraftEntityType;
@@ -1039,6 +1041,8 @@ export {
DraftEditorCommand,
DraftDragType,
DraftBlockType,
DraftBlockRenderConfig,
DraftBlockRenderMap,
DraftInlineStyleType,
DraftEntityType,
DraftEntityMutability,
+11
View File
@@ -30,3 +30,14 @@ var drake = dragula({
copy: true
});
drake.containers.push(document.querySelector('#container'));
dragula([document.getElementById('left'), document.getElementById('right')])
.on('drag', function (el: Element) {
el.className = el.className.replace('ex-moved', '');
}).on('drop', function (el: Element) {
el.className += ' ex-moved';
}).on('over', function (el: Element, container: Element) {
container.className += ' ex-over';
}).on('out', function (el: Element, container: Element) {
container.className = container.className.replace('ex-over', '');
});
+1 -1
View File
@@ -33,7 +33,7 @@ declare namespace dragula {
cancel(revert:boolean): void;
cancel(): void;
remove(): void;
on(events: string, callback: Function): void;
on(events: string, callback: Function): Drake;
destroy(): void;
}
+1 -1
View File
@@ -1132,7 +1132,7 @@ export namespace DS {
* This method unloads all records in the store.
* It schedules unloading to happen during the next run loop.
*/
unloadAll<K extends keyof ModelRegistry>(modelName: K): void;
unloadAll<K extends keyof ModelRegistry>(modelName?: K): void;
/**
* DEPRECATED:
* This method has been deprecated and is an alias for store.hasRecordForId, which should
+3
View File
@@ -205,3 +205,6 @@ declare module 'ember-data/types/registries/serializer' {
assertType<UserAdapter>(store.adapterFor('user'));
assertType<UserSerializer>(store.serializerFor('user'));
store.unloadAll();
store.unloadAll('user');
+1 -1
View File
@@ -1094,7 +1094,7 @@ export namespace DS {
* This method unloads all records in the store.
* It schedules unloading to happen during the next run loop.
*/
unloadAll<K extends keyof ModelRegistry>(modelName: K): void;
unloadAll<K extends keyof ModelRegistry>(modelName?: K): void;
/**
* DEPRECATED:
* This method has been deprecated and is an alias for store.hasRecordForId, which should
+3
View File
@@ -203,3 +203,6 @@ declare module 'ember-data' {
assertType<UserAdapter>(store.adapterFor('user'));
assertType<UserSerializer>(store.serializerFor('user'));
store.unloadAll();
store.unloadAll('user');
+6 -1
View File
@@ -1,4 +1,4 @@
import { UnwrapComputedPropertyGetter } from '@ember/object/-private/types';
import { UnwrapComputedPropertyGetter } from "@ember/object/-private/types";
/**
* Returns the cached value for a property, if one exists.
@@ -13,6 +13,11 @@ export function cacheFor<T, K extends keyof T>(
/**
* Creates a shallow copy of the passed object. A deep copy of the object is
* returned if the optional `deep` argument is `true`.
*
* @deprecated as of Ember 3.3, to be removed in Ember 4.0. See how to migrate
* [here][deprecation].
*
* [deprecation]: https://emberjs.com/deprecations/v3.x#toc_ember-runtime-deprecate-copy-copyable
*/
export function copy<T>(obj: T, deep: true): T;
export function copy(obj: any, deep?: boolean): any;
+3 -1
View File
@@ -62,7 +62,9 @@ sourceCode.getNodeByRangeIndex(0);
sourceCode.isSpaceBetweenTokens(TOKEN, TOKEN);
sourceCode.getLocFromIndex(0);
const loc = sourceCode.getLocFromIndex(0);
loc.line; // $ExpectType number
loc.column; // $ExpectType number
sourceCode.getIndexFromLoc({ line: 0, column: 0 });
+1 -1
View File
@@ -136,7 +136,7 @@ export class SourceCode {
isSpaceBetweenTokens(first: AST.Token, second: AST.Token): boolean;
getLocFromIndex(index: number): ESTree.SourceLocation;
getLocFromIndex(index: number): ESTree.Position;
getIndexFromLoc(location: ESTree.Position): number;
+2 -2
View File
@@ -55,8 +55,8 @@ function test_render() {
const success = (googleUser: gapi.auth2.GoogleUser): void => {
console.log(googleUser);
};
const failure = (): void => {
console.log('Failure callback');
const failure = (reason: { error: string }): void => {
console.log(`Failure callback: ${reason.error}`);
};
gapi.signin2.render('testId', {
+1 -1
View File
@@ -349,7 +349,7 @@ declare namespace gapi.signin2 {
/**
* The callback function to call when sign-in fails (default: none).
*/
onfailure?(): void;
onfailure?(reason: { error: string }): void;
/**
* The package name of the Android app to install over the air. See
+13
View File
@@ -0,0 +1,13 @@
import * as gitRevSync from "git-rev-sync";
gitRevSync.branch();
gitRevSync.count();
gitRevSync.date();
gitRevSync.isDirty();
gitRevSync.isTagDirty();
gitRevSync.long();
gitRevSync.message();
gitRevSync.remoteUrl();
gitRevSync.short();
gitRevSync.short();
gitRevSync.tag();
+15
View File
@@ -0,0 +1,15 @@
// Type definitions for git-rev-sync 1.12
// Project: https://github.com/kurttheviking/git-rev-sync-js
// Definitions by: khoi-fish <https://github.com/khoi-fish>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export function short(filePath?: string, length?: number): string;
export function long(filePath?: string): string;
export function branch(branch?: string): void;
export function count(): number;
export function date(): Date;
export function isDirty(): boolean;
export function isTagDirty(): boolean;
export function message(): string;
export function remoteUrl(): string;
export function tag(makeDirty?: boolean): string;
+16
View File
@@ -0,0 +1,16 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": ["es6"],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": ["../"],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": ["index.d.ts", "git-rev-sync-tests.ts"]
}
+6
View File
@@ -0,0 +1,6 @@
{
"extends": "dtslint/dt.json",
"rules": {
"dt-header": true
}
}
@@ -0,0 +1,19 @@
import {
combineResolvers,
pipeResolvers,
allResolvers,
resolveDependee,
resolveDependees,
isDependee,
skip
} from "graphql-resolvers";
const resolverOne = () => skip;
const resolverTwo = () => skip;
const combined = combineResolvers(resolverOne, resolverTwo);
const piped = pipeResolvers(resolverOne, resolverTwo);
const all = allResolvers([resolverOne, resolverTwo]);
const dependee = resolveDependee("resolverOne");
const dependees = resolveDependees(["resolverOne", "resolverTwo"]);
const isDependent = isDependee(resolverOne);
+37
View File
@@ -0,0 +1,37 @@
// Type definitions for graphql-resolvers 0.2
// Project: https://github.com/lucasconstantino/graphql-resolvers#readme
// Definitions by: Mike Engel <https://github.com/mike-engel>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.6
import { IFieldResolver } from "graphql-tools";
export const skip: undefined;
export interface TArgs {
[argument: string]: any;
}
export function combineResolvers<TSource = any, TContext = any>(
...resolvers: Array<IFieldResolver<TSource, TContext, TArgs>>
): IFieldResolver<TSource, TContext, TArgs>;
export function pipeResolvers<TSource = any, TContext = any>(
...resolvers: Array<IFieldResolver<TSource, TContext, TArgs>>
): IFieldResolver<TSource, TContext, TArgs>;
export function allResolvers<TSource = any, TContext = any>(
resolvers: Array<IFieldResolver<TSource, TContext, TArgs>>
): IFieldResolver<TSource, TContext, TArgs>;
export function resolveDependee(
dependeeName: string
): IFieldResolver<any, any, TArgs>;
export function resolveDependees(
dependeeNames: string[]
): IFieldResolver<any, any, TArgs>;
export function isDependee<TSource = any, TContext = any>(
resolver: IFieldResolver<TSource, TContext, TArgs>
): IFieldResolver<TSource, TContext, TArgs>;
+6
View File
@@ -0,0 +1,6 @@
{
"private": true,
"dependencies": {
"graphql-tools": "^4.0.2"
}
}
+16
View File
@@ -0,0 +1,16 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": ["es6", "esnext.asynciterable"],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": ["../"],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": ["index.d.ts", "graphql-resolvers-tests.ts"]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }
+32 -9
View File
@@ -1,9 +1,14 @@
declare namespace gsap {
export class Animation {
/** Base class for all TweenLite, TweenMax, TimelineLite, and TimelineMax classes, providing core methods/properties/() => voidality, but there is no reason to create an instance of this class directly. */
class Animation {
/**
* Base class for all TweenLite, TweenMax, TimelineLite, and TimelineMax classes, providing core methods/properties/() => voidality, but there is no reason to create an instance of this
* class directly.
*/
constructor(duration?: number, vars?: any);
/** A place to store any data you want (initially populated with vars.data if it exists). */
/**
* A place to store any data you want (initially populated with vars.data if it exists).
*/
data: any;
/** [Read-only] Parent timeline. */
@@ -20,14 +25,23 @@ declare namespace gsap {
duration(): number;
duration(value: number): Animation;
/** Gets or sets an event callback like "onComplete", "onUpdate", "onStart", "onReverseComplete" or "onRepeat" (onRepeat only applies to TweenMax or TimelineMax instances) along with any parameters that should be passed to that callback. */
/**
* Gets or sets an event callback like "onComplete", "onUpdate", "onStart", "onReverseComplete" or "onRepeat" (onRepeat only applies to TweenMax or TimelineMax instances) along with any
* parameters that should be passed to that callback.
*/
eventCallback(type: string): () => void;
eventCallback(type: string, callback: () => void, params?: any[], scope?: any): Animation;
/** Clears any initialization data (like starting/ending values in tweens) which can be useful if, for example, you want to restart a tween without reverting to any previously recorded starting values. */
/**
* Clears any initialization data (like starting/ending values in tweens) which can be useful if, for example, you want to restart a tween without reverting to any previously recorded
* starting values.
*/
invalidate(): Animation;
/** Indicates whether or not the animation is currently active (meaning the virtual playhead is actively moving across this instance's time span and it is not paused, nor are any of its ancestor timelines). */
/**
* Indicates whether or not the animation is currently active (meaning the virtual playhead is actively moving across this instance's time span and it is not paused, nor are any of its
* ancestor timelines).
*/
isActive(): boolean;
/** Kills the animation entirely or in part depending on the parameters. */
@@ -43,7 +57,10 @@ declare namespace gsap {
/** Begins playing forward, optionally from a specific time (by default playback begins from wherever the playhead currently is). */
play(from?: any, suppressEvents?: boolean): Animation;
/** Gets or sets the animations's progress which is a value between 0 and 1 indicating the position of the virtual playhead (excluding repeats) where 0 is at the beginning, 0.5 is at the halfway point, and 1 is at the end (complete). */
/**
* Gets or sets the animations's progress which is a value between 0 and 1 indicating the position of the virtual playhead (excluding repeats) where 0 is at the beginning, 0.5 is at the
* halfway point, and 1 is at the end (complete).
*/
progress(): number;
progress(value: number, suppressEvents?: boolean): Animation;
@@ -67,7 +84,10 @@ declare namespace gsap {
startTime(): number;
startTime(value: number): Animation;
/** Gets or sets the local position of the playhead (essentially the current time), described in seconds (or frames for frames-based animations) which will never be less than 0 or greater than the animation's duration. */
/**
* Gets or sets the local position of the playhead (essentially the current time), described in seconds (or frames for frames-based animations) which will never be less than 0 or greater
* than the animation's duration.
*/
time(): number;
time(value: number, suppressEvents?: boolean): Animation;
@@ -79,7 +99,10 @@ declare namespace gsap {
totalDuration(): number;
totalDuration(value: number): Animation;
/** Gets or sets the animation's total progress which is a value between 0 and 1 indicating the position of the virtual playhead (including repeats) where 0 is at the beginning, 0.5 is at the halfway point, and 1 is at the end (complete). */
/**
* Gets or sets the animation's total progress which is a value between 0 and 1 indicating the position of the virtual playhead (including repeats) where 0 is at the beginning, 0.5 is at
* the halfway point, and 1 is at the end (complete).
*/
totalProgress(): number;
totalProgress(value: number, suppressEvents?: boolean): Animation;
+25 -27
View File
@@ -1,52 +1,51 @@
declare namespace gsap {
export class Ease {
class Ease {
constructor(func?: () => void, extraParams?: any[], type?: number, power?: number);
/** Translates the tween's progress ratio into the corresponding ease ratio. */
getRatio(p: number): number;
}
export class EaseLookup {
static find(name: string): Ease;
interface EaseLookup {
find(name: string): Ease;
}
export class Back extends Ease {
class Back extends Ease {
static easeIn: Back;
static easeInOut: Back;
static easeOut: Back;
config(overshoot: number): Elastic;
}
export class Bounce extends Ease {
class Bounce extends Ease {
static easeIn: Bounce;
static easeInOut: Bounce;
static easeOut: Bounce;
}
export class Circ extends Ease {
class Circ extends Ease {
static easeIn: Circ;
static easeInOut: Circ;
static easeOut: Circ;
}
export class Cubic extends Ease {
class Cubic extends Ease {
static easeIn: Cubic;
static easeInOut: Cubic;
static easeOut: Cubic;
}
export class Elastic extends Ease {
class Elastic extends Ease {
static easeIn: Elastic;
static easeInOut: Elastic;
static easeOut: Elastic;
config(amplitude: number, period: number): Elastic;
}
export class Expo extends Ease {
class Expo extends Ease {
static easeIn: Expo;
static easeInOut: Expo;
static easeOut: Expo;
}
export class Linear extends Ease {
class Linear extends Ease {
static ease: Linear;
static easeIn: Linear;
static easeInOut: Linear;
@@ -54,60 +53,59 @@ declare namespace gsap {
static easeOut: Linear;
}
export class Quad extends Ease {
class Quad extends Ease {
static easeIn: Quad;
static easeInOut: Quad;
static easeOut: Quad;
}
export class Quart extends Ease {
class Quart extends Ease {
static easeIn: Quart;
static easeInOut: Quart;
static easeOut: Quart;
}
export class Quint extends Ease {
class Quint extends Ease {
static easeIn: Quint;
static easeInOut: Quint;
static easeOut: Quint;
}
export class Sine extends Ease {
class Sine extends Ease {
static easeIn: Sine;
static easeInOut: Sine;
static easeOut: Sine;
}
export class SlowMo extends Ease {
class SlowMo extends Ease {
static ease: SlowMo;
config(linearRatio: number, power: number, yoyoMode: boolean): SlowMo;
}
export class SteppedEase extends Ease {
class SteppedEase extends Ease {
constructor(staps: number);
config(steps: number): SteppedEase;
}
export interface RoughEaseConfig {
interface RoughEaseConfig {
clamp?: boolean;
points?: number;
randomize?: boolean;
strength?: number;
taper?: 'in' | 'out' | 'both' | 'none';
taper?: "in" | "out" | "both" | "none";
template?: Ease;
}
export class RoughEase extends Ease {
class RoughEase extends Ease {
static ease: RoughEase;
constructor(vars: RoughEaseConfig);
config(steps?: number): RoughEase;
}
export var Power0: typeof Linear;
export var Power1: typeof Quad;
export var Power2: typeof Cubic;
export var Power3: typeof Quart;
export var Power4: typeof Quint;
export var Strong: typeof Quint;
const Power0: typeof Linear;
const Power1: typeof Quad;
const Power2: typeof Cubic;
const Power3: typeof Quart;
const Power4: typeof Quint;
const Strong: typeof Quint;
}
+3 -3
View File
@@ -1,15 +1,15 @@
declare namespace gsap {
export interface BezierPlugin extends TweenPlugin {
interface BezierPlugin extends TweenPlugin {
bezierThrough(values: any[], curviness?: number, quadratic?: boolean, correlate?: string, prepend?: {}, calcDifs?: boolean): {};
cubicToQuadratic(a: number, b: number, c: number, d: number): any[];
quadraticToCubic(a: number, b: number, c: number): {};
}
export interface CSSRulePlugin extends TweenPlugin {
interface CSSRulePlugin extends TweenPlugin {
getRule(selector: string): {};
}
export interface TweenPlugin {
interface TweenPlugin {
activate(plugins: any[]): boolean;
}
}
+76 -18
View File
@@ -1,8 +1,11 @@
declare namespace gsap {
export type Timeline = SimpleTimeline | TimelineLite | TimelineMax;
type Timeline = SimpleTimeline | TimelineLite | TimelineMax;
export class SimpleTimeline extends Animation {
/** SimpleTimeline is the base class for TimelineLite and TimelineMax, providing the most basic timeline () => voidality and it is used for the root timelines in TweenLite but is only intended for internal use in the GreenSock tweening platform. It is meant to be very fast and lightweight. */
class SimpleTimeline extends Animation {
/**
* SimpleTimeline is the base class for TimelineLite and TimelineMax, providing the most basic timeline () => voidality and it is used for the root timelines in TweenLite but is only
* intended for internal use in the GreenSock tweening platform. It is meant to be very fast and lightweight.
*/
constructor(vars?: any);
/** If true, child tweens/timelines will be removed as soon as they complete. */
@@ -18,7 +21,7 @@ declare namespace gsap {
render(time: number, suppressEvents?: boolean, force?: boolean): SimpleTimeline;
}
export class TimelineLite extends SimpleTimeline {
class TimelineLite extends SimpleTimeline {
constructor(vars?: {});
/** Adds a tween, timeline, callback, or label (or an array of them) to the timeline. */
@@ -30,7 +33,10 @@ declare namespace gsap {
/** Inserts a special callback that pauses playback of the timeline at a particular time or label. */
addPause(position?: any, callback?: () => void, params?: any[], scope?: any): TimelineLite;
/** Adds a callback to the end of the timeline (or elsewhere using the "position" parameter) - this is a convenience method that accomplishes exactly the same thing as add( TweenLite.delayedCall(...) ) but with less code. */
/**
* Adds a callback to the end of the timeline (or elsewhere using the "position" parameter) - this is a convenience method that accomplishes exactly the same thing as
* add( TweenLite.delayedCall(...) ) but with less code.
*/
call(callback: () => void, params?: any[], scope?: any, position?: any): TimelineLite;
/** Empties the timeline of all tweens, timelines, and callbacks (and optionally labels too). */
@@ -39,10 +45,16 @@ declare namespace gsap {
/** Returns the time at which the animation will finish according to the parent timeline's local time. */
endTime(includeRepeats?: boolean): number;
/** Seamlessly transfers all tweens, timelines, and [optionally] delayed calls from the root timeline into a new TimelineLite so that you can perform advanced tasks on a seemingly global basis without affecting tweens/timelines that you create after the export. */
/**
* Seamlessly transfers all tweens, timelines, and [optionally] delayed calls from the root timeline into a new TimelineLite so that you can perform advanced tasks on a seemingly global
* basis without affecting tweens/timelines that you create after the export.
*/
static exportRoot(vars?: {}, omitDelayedCalls?: boolean): TimelineLite;
/** Adds a TweenLite.from() tween to the end of the timeline (or elsewhere using the "position" parameter) - this is a convenience method that accomplishes exactly the same thing as add( TweenLite.from(...) ) but with less code. */
/**
* Adds a TweenLite.from() tween to the end of the timeline (or elsewhere using the "position" parameter) - this is a convenience method that accomplishes exactly the same thing as
* add( TweenLite.from(...) ) but with less code.
*/
from(target: {}, duration: number, vars: {}, position?: any): TimelineLite;
/** Adds a TweenLite.fromTo() tween to the end of the timeline - this is a convenience method that accomplishes exactly the same thing as add( TweenLite.fromTo(...) ) but with less code. */
@@ -57,7 +69,10 @@ declare namespace gsap {
/** Returns the tweens of a particular object that are inside this timeline. */
getTweensOf(target: {}, nested?: boolean): Tween[];
/** Clears any initialization data (like starting/ending values in tweens) which can be useful if, for example, you want to restart a tween without reverting to any previously recorded starting values. */
/**
* Clears any initialization data (like starting/ending values in tweens) which can be useful if, for example, you want to restart a tween without reverting to any previously recorded
* starting values.
*/
invalidate(): TimelineLite;
/** Returns the most recently added child tween/timeline/callback regardless of its position in the timeline. */
@@ -72,22 +87,65 @@ declare namespace gsap {
/** Jumps to a specific time (or label) without affecting whether or not the instance is paused or reversed. */
seek(position: string | number, supressEvents: boolean): TimelineLite;
/** Adds a zero-duration tween to the end of the timeline (or elsewhere using the "position" parameter) that sets values immediately (when the virtual playhead reaches that position on the timeline) - this is a convenience method that accomplishes exactly the same thing as add( TweenLite.to(target, 0, {...}) ) but with less code. */
/**
* Adds a zero-duration tween to the end of the timeline (or elsewhere using the "position" parameter) that sets values immediately (when the virtual playhead reaches that
* position on the timeline) - this is a convenience method that accomplishes exactly the same thing as add( TweenLite.to(target, 0, {...}) ) but with less code.
*/
set(target: {}, vars: {}, position?: any): TimelineLite;
/** Shifts the startTime of the timeline's children by a certain amount and optionally adjusts labels too. */
shiftChildren(amount: number, adjustLabels?: boolean, ignoreBeforeTime?: number): TimelineLite;
/** Tweens an array of targets from a common set of destination values (using the current values as the destination), but staggers their start times by a specified amount of time, creating an evenly-spaced sequence with a surprisingly small amount of code. */
staggerFrom(targets: any, duration: number, vars: {}, stagger?: number, position?: any, onCompleteAll?: () => void, onCompleteAllParams?: any[], onCompleteScope?: any): TimelineLite;
/**
* Tweens an array of targets from a common set of destination values (using the current values as the destination), but staggers their start times by a specified amount of time,
* creating an evenly-spaced sequence with a surprisingly small amount of code.
*/
staggerFrom(
targets: any,
duration: number,
vars: {},
stagger?: number,
position?: any,
onCompleteAll?: () => void,
onCompleteAllParams?: any[],
onCompleteScope?: any
): TimelineLite;
/** Tweens an array of targets from and to a common set of values, but staggers their start times by a specified amount of time, creating an evenly-spaced sequence with a surprisingly small amount of code. */
staggerFromTo(targets: any, duration: number, fromVars: {}, toVars: {}, stagger?: number, position?: any, onCompleteAll?: () => void, onCompleteAllParams?: any[], onCompleteAllScope?: any): TimelineLite;
/**
* Tweens an array of targets from and to a common set of values, but staggers their start times by a specified amount of time, creating an evenly-spaced sequence with a surprisingly
* small amount of code.
*/
staggerFromTo(
targets: any,
duration: number,
fromVars: {},
toVars: {},
stagger?: number,
position?: any,
onCompleteAll?: () => void,
onCompleteAllParams?: any[],
onCompleteAllScope?: any
): TimelineLite;
/** Tweens an array of targets to a common set of destination values, but staggers their start times by a specified amount of time, creating an evenly-spaced sequence with a surprisingly small amount of code. */
staggerTo(targets: any, duration: number, vars: {}, stagger: number, position?: any, onCompleteAll?: () => void, onCompleteAllParams?: any[], onCompleteAllScope?: any): TimelineLite;
/**
* Tweens an array of targets to a common set of destination values, but staggers their start times by a specified amount of time, creating an evenly-spaced sequence with a surprisingly
* small amount of code.
*/
staggerTo(
targets: any,
duration: number,
vars: {},
stagger: number,
position?: any,
onCompleteAll?: () => void,
onCompleteAllParams?: any[],
onCompleteAllScope?: any
): TimelineLite;
/** Adds a TweenLite.to() tween to the end of the timeline (or elsewhere using the "position" parameter) - this is a convenience method that accomplishes exactly the same thing as add( TweenLite.to(...) ) but with less code. */
/**
* Adds a TweenLite.to() tween to the end of the timeline (or elsewhere using the "position" parameter) - this is a convenience method that accomplishes exactly the same thing as
* add( TweenLite.to(...) ) but with less code.
*/
to(target: {}, duration: number, vars: {}, position?: any): TimelineLite;
usesFrames(): boolean;
@@ -95,7 +153,7 @@ declare namespace gsap {
useFrames(): boolean;
}
export class TimelineMax extends TimelineLite {
class TimelineMax extends TimelineLite {
constructor(vars?: {});
addCallback(callback: () => void, position: any, params?: any[], scope?: any): TimelineMax;
@@ -104,7 +162,7 @@ declare namespace gsap {
getActive(nested?: boolean, tweens?: boolean, timelines?: boolean): Tween | Timeline[];
getLabelAfter(time: number): string;
getLabelBefore(time: number): string;
getLabelsArray(): Array<{ name: string; time: number; }>;
getLabelsArray(): Array<{ name: string; time: number }>;
removeCallback(callback: () => void, timeOrLabel?: any): TimelineMax;
removePause(position: any): TimelineMax;
repeat(): number;
+84 -20
View File
@@ -1,6 +1,6 @@
declare namespace gsap {
export type Tween = TweenLite | TweenMax;
export class TweenLite extends Animation {
type Tween = TweenLite | TweenMax;
class TweenLite extends Animation {
constructor(target: any, duration: number, vars: any);
/** Provides An easy way to change the default easing equation. */
@@ -15,22 +15,37 @@ declare namespace gsap {
/** Target object (or array of objects) whose properties the tween affects. */
readonly target: any;
/** The object that dispatches a "tick" event each time the engine updates, making it easy for you to add your own listener(s) to run custom logic after each update (great for game developers). */
/**
* The object that dispatches a "tick" event each time the engine updates, making it easy for you to add your own listener(s) to run custom logic after each update
* (great for game developers).
*/
static ticker: any;
/** Provides a simple way to call a () => void after a set amount of time (or frames). */
static delayedCall(delay: number, callback: () => void, params?: any[], scope?: any, useFrames?: boolean): TweenLite;
/** Static method for creating a TweenLite instance that tweens backwards - you define the BEGINNING values and the current values are used as the destination values which is great for doing things like animating objects onto the screen because you can set them up initially the way you want them to look at the end of the tween and then animate in from elsewhere. */
/**
* Static method for creating a TweenLite instance that tweens backwards - you define the BEGINNING values and the current values are used as the destination values which is great for doing
* things like animating objects onto the screen because you can set them up initially the way you want them to look at the end of the tween and then animate in from elsewhere.
*/
static from(target: any, duration: number, vars: any): TweenLite;
/** Static method for creating a TweenLite instance that allows you to define both the starting and ending values (as opposed to to() and from() tweens which are based on the target's current values at one end or the other). */
/**
* Static method for creating a TweenLite instance that allows you to define both the starting and ending values (as opposed to to() and from() tweens which are based on the target's
* current values at one end or the other).
*/
static fromTo(target: any, duration: number, fromVars: any, toVars: any): TweenLite;
/** Returns an array containing all the tweens of a particular target (or group of targets) that have not been released for garbage collection yet which typically happens within a few seconds after the tween completes. */
/**
* Returns an array containing all the tweens of a particular target (or group of targets) that have not been released for garbage collection yet which typically happens within a few
* seconds after the tween completes.
*/
static getTweensOf(target: any, onlyActive?: boolean): TweenLite[];
/** [override] Clears any initialization data (like starting/ending values in tweens) which can be useful if, for example, you want to restart a tween without reverting to any previously recorded starting values. */
/**
* [override] Clears any initialization data (like starting/ending values in tweens) which can be useful if, for example, you want to restart a tween without reverting to any previously
* recorded starting values.
*/
invalidate(): TweenLite;
/** Immediately kills all of the delayedCalls to a particular () => void. */
@@ -42,7 +57,10 @@ declare namespace gsap {
/** Permits you to control what happens when too much time elapses between two ticks (updates) of the engine, adjusting the core timing mechanism to compensate and avoid "jumps". */
static lagSmoothing(threshold: number, adjustedLag: number): void;
/** Forces a render of all active tweens which can be useful if, for example, you set up a bunch of from() tweens and then you need to force an immediate render (even of "lazy" tweens) to avoid a brief delay before things render on the very next tick. */
/**
* Forces a render of all active tweens which can be useful if, for example, you set up a bunch of from() tweens and then you need to force an immediate render (even of "lazy" tweens) to
* avoid a brief delay before things render on the very next tick.
*/
static render(): void;
/** Immediately sets properties of the target accordingly - essentially a zero-duration to() tween with a more intuitive name. */
@@ -52,26 +70,35 @@ declare namespace gsap {
static to(target: any, duration: number, vars: any): TweenLite;
}
export class TweenMax extends TweenLite {
class TweenMax extends TweenLite {
constructor(target: {}, duration: number, vars: {});
/** Provides a simple way to call a () => void after a set amount of time (or frames). */
static delayedCall(delay: number, callback: () => void, params?: any[], scope?: {}, useFrames?: boolean): TweenMax;
/** Static method for creating a TweenMax instance that tweens backwards - you define the BEGINNING values and the current values are used as the destination values which is great for doing things like animating objects onto the screen because you can set them up initially the way you want them to look at the end of the tween and then animate in from elsewhere. */
/**
* Static method for creating a TweenMax instance that tweens backwards - you define the BEGINNING values and the current values are used as the destination values which is great for
* doing things like animating objects onto the screen because you can set them up initially the way you want them to look at the end of the tween and then animate in from elsewhere.
*/
static from(target: {}, duration: number, vars: {}): TweenMax;
/** Static method for creating a TweenMax instance that allows you to define both the starting and ending values (as opposed to to() and from() tweens which are based on the target's current values at one end or the other). */
/**
* Static method for creating a TweenMax instance that allows you to define both the starting and ending values (as opposed to to() and from() tweens which are based on the target's
* current values at one end or the other).
*/
static fromTo(target: {}, duration: number, fromVars: {}, toVars: {}): TweenMax;
/** Returns an array containing all tweens (and optionally timelines too, excluding the root timelines). */
static getAllTweens(includeTimelines?: boolean): Tween[];
/** Returns an array containing all the tweens of a particular target (or group of targets) that have not been released for garbage collection yet which typically happens within a few seconds after the tween completes. */
/**
* Returns an array containing all the tweens of a particular target (or group of targets) that have not been released for garbage collection yet which typically happens within a
* few seconds after the tween completes.
*/
static getTweensOf(target: {}): Tween[];
/** Gets or sets the global timeScale which is a multiplier that affects ALL animations equally. This is a great way to globally speed up or slow down all animations at once. */
static globalTimeScale(value: number): void;
static globalTimeScale(value?: number): number;
/** Reports whether or not a particular object is actively tweening. */
static isTweening(target: {}): boolean;
@@ -91,7 +118,10 @@ declare namespace gsap {
/** Pauses all tweens and/or delayedCalls/callbacks and/or timelines. */
static pauseAll(tweens?: boolean, delayedCalls?: boolean, timelines?: boolean): void;
/** Gets or sets the tween's progress which is a value between 0 and 1 indicating the position of the virtual playhead (excluding repeats) where 0 is at the beginning, 0.5 is halfway complete, and 1 is complete. */
/**
* Gets or sets the tween's progress which is a value between 0 and 1 indicating the position of the virtual playhead (excluding repeats) where 0 is at the beginning, 0.5 is halfway
* complete, and 1 is complete.
*/
repeat(): number;
repeat(value: number): TweenMax;
@@ -105,14 +135,48 @@ declare namespace gsap {
/** Immediately sets properties of the target accordingly - essentially a zero-duration to() tween with a more intuitive name. */
static set(target: {}, vars: {}): TweenMax;
/** Tweens an array of targets from a common set of destination values (using the current values as the destination), but staggers their start times by a specified amount of time, creating an evenly-spaced sequence with a surprisingly small amount of code. */
static staggerFrom(targets: any, duration: number, vars: {}, stagger: number, onCompleteAll?: () => void, onCompleteAllParams?: any[], onCompleteAllScope?: any): any[];
/**
* Tweens an array of targets from a common set of destination values (using the current values as the destination), but staggers their start times by a specified amount of time, creating
* an evenly-spaced sequence with a surprisingly small amount of code.
*/
static staggerFrom(
targets: any,
duration: number,
vars: {},
stagger: number,
onCompleteAll?: () => void,
onCompleteAllParams?: any[],
onCompleteAllScope?: any
): any[];
/** Tweens an array of targets from a common set of destination values to a common set of destination values, but staggers their start times by a specified amount of time, creating an evenly-spaced sequence with a surprisingly small amount of code. */
static staggerFromTo(targets: any, duration: number, fromVars: {}, toVars: {}, stagger: number, onCompleteAll?: () => void, onCompleteAllParams?: any[], onCompleteAllScope?: any): any[];
/**
* Tweens an array of targets from a common set of destination values to a common set of destination values, but staggers their start times by a specified amount of time, creating an
* evenly-spaced sequence with a surprisingly small amount of code.
*/
static staggerFromTo(
targets: any,
duration: number,
fromVars: {},
toVars: {},
stagger: number,
onCompleteAll?: () => void,
onCompleteAllParams?: any[],
onCompleteAllScope?: any
): any[];
/** Tweens an array of targets to a common set of destination values, but staggers their start times by a specified amount of time, creating an evenly-spaced sequence with a surprisingly small amount of code. */
static staggerTo(targets: any, duration: number, vars: {}, stagger: number, onCompleteAll?: () => void, onCompleteAllParams?: any[], onCompleteAllScope?: any): any[];
/**
* Tweens an array of targets to a common set of destination values, but staggers their start times by a specified amount of time, creating an evenly-spaced sequence with a surprisingly
* small amount of code.
*/
static staggerTo(
targets: any,
duration: number,
vars: {},
stagger: number,
onCompleteAll?: () => void,
onCompleteAllParams?: any[],
onCompleteAllScope?: any
): any[];
/** Static method for creating a TweenMax instance that animates to the specified destination values (from the current values). */
static to(target: {}, duration: number, vars: TweenConfig): TweenMax;
+24 -7
View File
@@ -1,10 +1,11 @@
declare namespace gsap {
export interface TweenConfig {
interface TweenConfig {
/** Any tweenable property */
[p: string]: any;
/** Amount of delay in seconds (or frames for frames-based tweens) before the animation should begin.*/
/**
* Amount of delay in seconds (or frames for frames-based tweens) before the animation should begin.
*/
delay?: number;
/** Ease (or () => void or String) - You can choose from various eases to control the rate of change during the animation, giving it a specific "feel". */
@@ -15,7 +16,10 @@ declare namespace gsap {
/** If true, the tween will pause itself immediately upon creation. */
paused?: boolean;
/** Controls how (and if) other tweens of the same target are overwritten. There are several modes to choose from, but "auto" is the default (although you can change the default mode using theTweenLite.defaultOverwrite property) */
/**
* Controls how (and if) other tweens of the same target are overwritten. There are several modes to choose from, but "auto" is the default (although you can change the default mode using
* theTweenLite.defaultOverwrite property)
*/
overwrite?: string | number;
/** A () => void that should be called when the animation has completed. */
@@ -27,7 +31,11 @@ declare namespace gsap {
/** Defines the scope of the onComplete () => void (what "this" refers to inside that () => void). */
onCompleteScope?: {};
/** Normally when you create a tween, it begins rendering on the very next frame (update cycle) unless you specify a delay. However, if you prefer to force the tween to render immediately when it is created, setimmediateRender to true. Or to prevent a from() from rendering immediately, set immediateRender to false. By default, from() tweens set immediateRender to true. */
/**
* Normally when you create a tween, it begins rendering on the very next frame (update cycle) unless you specify a delay. However, if you prefer to force the tween to render
* immediately when it is created, setimmediateRender to true. Or to prevent a from() from rendering immediately, set immediateRender to false. By default, from() tweens set
* immediateRender to true.
*/
immediateRender?: boolean;
/** A () => void that should be called when the tween has reached its beginning again from the reverse direction. */
@@ -57,10 +65,19 @@ declare namespace gsap {
/** Defines the scope of the onUpdate () => void (what "this" refers to inside that () => void). */
onUpdateScope?: {};
/** If useFrames is true, the tweens's timing will be based on frames instead of seconds because it is intially added to the root frames-based timeline. This causes both its duration and delay to be based on frames. An animations's timing mode is always determined by its parent timeline. */
/**
* If useFrames is true, the tweens's timing will be based on frames instead of seconds because it is intially added to the root frames-based timeline. This causes both its duration and
* delay to be based on frames. An animations's timing mode is always determined by its parent timeline.
*/
useFrames?: boolean;
/** When a tween renders for the very first time and reads its starting values, GSAP will automatically "lazy render" that particular tick by default, meaning it will try to delay the rendering (writing of values) until the very end of the "tick" cycle which can improve performance because it avoids the read/write/read/write layout thrashing that some browsers do. If you would like to disable lazy rendering for a particular tween, you can set lazy:false. Or, since zero-duration tweens do not lazy-render by default, you can specifically give it permission to lazy-render by setting lazy:true like TweenLite.set(element, {opacity:0, lazy:true});. In most cases, you won't need to set lazy. */
/**
* When a tween renders for the very first time and reads its starting values, GSAP will automatically "lazy render" that particular tick by default, meaning it will try to delay the
* rendering (writing of values) until the very end of the "tick" cycle which can improve performance because it avoids the read/write/read/write layout thrashing that some browsers do.
*
* If you would like to disable lazy rendering for a particular tween, you can set lazy:false. Or, since zero-duration tweens do not lazy-render by default, you can specifically give it
* permission to lazy-render by setting lazy:true like TweenLite.set(element, {opacity:0, lazy:true});. In most cases, you won't need to set lazy.
*/
lazy?: boolean;
/** A () => void that should be called when the tween gets overwritten by another tween. */
+7 -3
View File
@@ -1,6 +1,10 @@
// Type definitions for GSAP 1.19
// Type definitions for GSAP 1.20.6
// Project: http://greensock.com/
// Definitions by: VILIC VANE <https://vilic.github.io/>, Robert S <https://github.com/codebelt>, Richard Fox <https://github.com/ProbablePrime>, Philip Bulley <https://github.com/philipbulley>
// Definitions by: VILIC VANE <https://vilic.github.io/>,
// Robert S <https://github.com/codebelt>,
// Richard Fox <https://github.com/ProbablePrime>,
// Philip Bulley <https://github.com/philipbulley>,
// Leonardo Melo <https://github.com/leomeloxp>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="Animation.d.ts"/>
@@ -10,6 +14,6 @@
/// <reference path="Timeline.d.ts"/>
/// <reference path="Plugins.d.ts"/>
declare module 'gsap' {
declare module "gsap" {
export = gsap;
}
+3
View File
@@ -82,4 +82,7 @@ declare global {
toHaveNoViolations: IToHaveNoViolations;
}
}
// axe-core depends on a global Node
interface Node {}
}
+1 -2
View File
@@ -2,8 +2,7 @@
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
+6 -1
View File
@@ -1 +1,6 @@
{ "extends": "dtslint/dt.json" }
{
"extends": "dtslint/dt.json",
"rules": {
"no-empty-interface": false
}
}
+8 -1
View File
@@ -345,7 +345,14 @@ declare namespace jest {
}
interface ExpectExtendMap {
[key: string]: (this: MatcherUtils, received: any, ...actual: any[]) => { message(): string | (() => string), pass: boolean } | Promise<{ message(): string, pass: boolean }>;
[key: string]: CustomMatcher;
}
type CustomMatcher = (this: MatcherUtils, received: any, ...actual: any[]) => CustomMatcherResult | Promise<CustomMatcherResult>;
interface CustomMatcherResult {
pass: boolean;
message: string | (() => string);
}
interface SnapshotSerializerOptions {
+16
View File
@@ -433,6 +433,14 @@ expect.extend({
};
}
});
expect.extend({
foo(this: jest.MatcherUtils, received: {}, ...actual: Array<{}>) {
return {
message: JSON.stringify(received),
pass: false,
};
}
});
expect.extend({
async foo(this: jest.MatcherUtils, received: {}, ...actual: Array<{}>) {
return {
@@ -441,6 +449,14 @@ expect.extend({
};
}
});
expect.extend({
async foo(this: jest.MatcherUtils, received: {}, ...actual: Array<{}>) {
return {
message: JSON.stringify(received),
pass: false
};
}
});
expect.extend({
foo(this: jest.MatcherUtils) {
const isNot: boolean = this.isNot;
+19 -10
View File
@@ -909,16 +909,29 @@ export interface BinarySchema extends AnySchema {
}
export interface DateSchema extends AnySchema {
/**
* Specifies that the value must be greater than date.
* Notes: 'now' can be passed in lieu of date so as to always compare relatively to the current date,
* allowing to explicitly ensure a date is either in the past or in the future.
* It can also be a reference to another field.
*/
greater(date: 'now' | Date | number | string | Reference): this;
/**
* Specifies that the value must be less than date.
* Notes: 'now' can be passed in lieu of date so as to always compare relatively to the current date,
* allowing to explicitly ensure a date is either in the past or in the future.
* It can also be a reference to another field.
*/
less(date: 'now' | Date | number | string | Reference): this;
/**
* Specifies the oldest date allowed.
* Notes: 'now' can be passed in lieu of date so as to always compare relatively to the current date,
* allowing to explicitly ensure a date is either in the past or in the future.
* It can also be a reference to another field.
*/
min(date: Date): this;
min(date: number): this;
min(date: string): this;
min(date: Reference): this;
min(date: 'now' | Date | number | string | Reference): this;
/**
* Specifies the latest date allowed.
@@ -926,17 +939,13 @@ export interface DateSchema extends AnySchema {
* allowing to explicitly ensure a date is either in the past or in the future.
* It can also be a reference to another field.
*/
max(date: Date): this;
max(date: number): this;
max(date: string): this;
max(date: Reference): this;
max(date: 'now' | Date | number | string | Reference): this;
/**
* Specifies the allowed date format:
* @param format - string or array of strings that follow the moment.js format.
*/
format(format: string): this;
format(format: string[]): this;
format(format: string | string[]): this;
/**
* Requires the string value to be in valid ISO 8601 date format.
+13
View File
@@ -514,15 +514,28 @@ binSchema = binSchema.length(num);
dateSchema = Joi.date();
dateSchema = dateSchema.greater('now');
dateSchema = dateSchema.less('now');
dateSchema = dateSchema.min('now');
dateSchema = dateSchema.max('now');
dateSchema = dateSchema.greater(date);
dateSchema = dateSchema.less(date);
dateSchema = dateSchema.min(date);
dateSchema = dateSchema.max(date);
dateSchema = dateSchema.greater(str);
dateSchema = dateSchema.less(str);
dateSchema = dateSchema.min(str);
dateSchema = dateSchema.max(str);
dateSchema = dateSchema.greater(num);
dateSchema = dateSchema.less(num);
dateSchema = dateSchema.min(num);
dateSchema = dateSchema.max(num);
dateSchema = dateSchema.greater(ref);
dateSchema = dateSchema.less(ref);
dateSchema = dateSchema.min(ref);
dateSchema = dateSchema.max(ref);
-77
View File
@@ -1,77 +0,0 @@
// Type definitions for mali 0.9
// Project: https://github.com/malijs/mali
// Definitions by: Daniel Byrne <https://github.com/danwbyrne>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1
/// <reference types="node" />
import { EventEmitter } from 'events';
import { Stream } from 'stream';
declare class Mali extends EventEmitter {
constructor(path: any, name?: string | ReadonlyArray<string>, options?: any);
name: string;
env: string;
ports: ReadonlyArray<number>;
silent: boolean;
addService(path: any, name: string | ReadonlyArray<string>, options?: any): void;
use(service?: any, name?: any, fns?: any): void;
start(port: number | string, creds?: any, options?: any): any; // gnarly type inferring for these functions so Im just gonna let them handle it.
toJSON(): any;
close(): Promise<void>;
inspect(): any;
}
declare namespace Mali {
interface Context {
name: string;
fullName: string;
service: string;
package: string;
app: any; // ? app
call: any;
request: Request;
response: Response;
req: any; // ?
res: any; // ?
type: string;
metadata: string;
get(field: string): any;
set(field: any, val?: any): void; // do I need `?:` if its of type `any`?
sendMetadata(md: any): void;
getStatus(field: string): any;
setStatus(field: any, val?: any): void; // ^
}
class Request {
constructor(call: any, type: string);
call: any;
type: string;
metadata: any;
req: any; // ?
getMetadata(): any;
get(field: string): any;
}
class Response {
constructor(call: any, type: string);
call: any;
type: string;
metadata: any;
status: any;
res: any; // ?
set(field: any, val?: any): void; // is `val?:` necessary when its of type `any`?
get(field: string): any;
getMetadata(): any;
sendMetadata(md?: any): void;
getStatus(field: string): any;
setStatus(field: any, val?: any): void; // ^ same as above
}
function exec(ctx: Context, handler: any, cb?: any): void;
}
export = Mali;
-16
View File
@@ -1,16 +0,0 @@
// example from https://github.com/malijs/mali#example
import Mali = require('mali');
import path = require('path');
const PROTO_PATH = path.resolve(__dirname, '../protos/helloworld.proto');
async function sayHello(ctx: Mali.Context) {
ctx.res = { message: 'Hello '.concat(ctx.req.name) };
}
const app = new Mali(PROTO_PATH);
// $ExpectType void
app.use({sayHello});
// $ExpectType any
app.start('127.0.0.1:50051');
-19
View File
@@ -1,19 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": ["es6"],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": ["../"],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"mali-tests.ts"
]
}
-3
View File
@@ -1,3 +0,0 @@
{
"extends": "dtslint/dt.json"
}
+25 -10
View File
@@ -707,8 +707,8 @@ export interface Collection<TSchema = Default> {
findOneAndReplace(filter: FilterQuery<TSchema>, replacement: Object, options: FindOneAndReplaceOption, callback: MongoCallback<FindAndModifyWriteOpResultObject<TSchema>>): void;
/** http://mongodb.github.io/node-mongodb-native/3.1/api/Collection.html#findOneAndUpdate */
findOneAndUpdate(filter: FilterQuery<TSchema>, update: Object, callback: MongoCallback<FindAndModifyWriteOpResultObject<TSchema>>): void;
findOneAndUpdate(filter: FilterQuery<TSchema>, update: Object, options?: FindOneAndReplaceOption): Promise<FindAndModifyWriteOpResultObject<TSchema>>;
findOneAndUpdate(filter: FilterQuery<TSchema>, update: Object, options: FindOneAndReplaceOption, callback: MongoCallback<FindAndModifyWriteOpResultObject<TSchema>>): void;
findOneAndUpdate(filter: FilterQuery<TSchema>, update: Object, options?: FindOneAndUpdateOption): Promise<FindAndModifyWriteOpResultObject<TSchema>>;
findOneAndUpdate(filter: FilterQuery<TSchema>, update: Object, options: FindOneAndUpdateOption, callback: MongoCallback<FindAndModifyWriteOpResultObject<TSchema>>): void;
/** http://mongodb.github.io/node-mongodb-native/3.1/api/Collection.html#geoHaystackSearch */
geoHaystackSearch(x: number, y: number, callback: MongoCallback<any>): void;
geoHaystackSearch(x: number, y: number, options?: GeoHaystackSearchOptions): Promise<any>;
@@ -804,17 +804,17 @@ export interface Collection<TSchema = Default> {
/** @deprecated use updateOne, updateMany or bulkWrite */
update(filter: FilterQuery<TSchema>, update: UpdateQuery<TSchema> | TSchema, callback: MongoCallback<WriteOpResult>): void;
/** @deprecated use updateOne, updateMany or bulkWrite */
update(filter: FilterQuery<TSchema>, update: UpdateQuery<TSchema> | TSchema, options?: ReplaceOneOptions & { multi?: boolean }): Promise<WriteOpResult>;
update(filter: FilterQuery<TSchema>, update: UpdateQuery<TSchema> | TSchema, options?: UpdateOneOptions & { multi?: boolean }): Promise<WriteOpResult>;
/** @deprecated use updateOne, updateMany or bulkWrite */
update(filter: FilterQuery<TSchema>, update: UpdateQuery<TSchema> | TSchema, options: ReplaceOneOptions & { multi?: boolean }, callback: MongoCallback<WriteOpResult>): void;
update(filter: FilterQuery<TSchema>, update: UpdateQuery<TSchema> | TSchema, options: UpdateOneOptions & { multi?: boolean }, callback: MongoCallback<WriteOpResult>): void;
/** http://mongodb.github.io/node-mongodb-native/3.1/api/Collection.html#updateMany */
updateMany(filter: FilterQuery<TSchema>, update: UpdateQuery<TSchema> | TSchema, callback: MongoCallback<UpdateWriteOpResult>): void;
updateMany(filter: FilterQuery<TSchema>, update: UpdateQuery<TSchema> | TSchema, options?: CommonOptions & { upsert?: boolean }): Promise<UpdateWriteOpResult>;
updateMany(filter: FilterQuery<TSchema>, update: UpdateQuery<TSchema> | TSchema, options: CommonOptions & { upsert?: boolean }, callback: MongoCallback<UpdateWriteOpResult>): void;
updateMany(filter: FilterQuery<TSchema>, update: UpdateQuery<TSchema> | TSchema, options?: UpdateManyOptions): Promise<UpdateWriteOpResult>;
updateMany(filter: FilterQuery<TSchema>, update: UpdateQuery<TSchema> | TSchema, options: UpdateManyOptions, callback: MongoCallback<UpdateWriteOpResult>): void;
/** http://mongodb.github.io/node-mongodb-native/3.1/api/Collection.html#updateOne */
updateOne(filter: FilterQuery<TSchema>, update: UpdateQuery<TSchema> | TSchema, callback: MongoCallback<UpdateWriteOpResult>): void;
updateOne(filter: FilterQuery<TSchema>, update: UpdateQuery<TSchema> | TSchema, options?: ReplaceOneOptions): Promise<UpdateWriteOpResult>;
updateOne(filter: FilterQuery<TSchema>, update: UpdateQuery<TSchema> | TSchema, options: ReplaceOneOptions, callback: MongoCallback<UpdateWriteOpResult>): void;
updateOne(filter: FilterQuery<TSchema>, update: UpdateQuery<TSchema> | TSchema, options?: UpdateOneOptions): Promise<UpdateWriteOpResult>;
updateOne(filter: FilterQuery<TSchema>, update: UpdateQuery<TSchema> | TSchema, options: UpdateOneOptions, callback: MongoCallback<UpdateWriteOpResult>): void;
/** http://mongodb.github.io/node-mongodb-native/3.1/api/Collection.html#watch */
watch(pipeline?: Object[], options?: ChangeStreamOptions & { startAtClusterTime?: Timestamp, session?: ClientSession }): ChangeStream;
}
@@ -1158,13 +1158,17 @@ export interface FindAndModifyWriteOpResultObject<TSchema = Default> {
}
/** http://mongodb.github.io/node-mongodb-native/3.1/api/Collection.html#findOneAndReplace */
export interface FindOneAndReplaceOption {
export interface FindOneAndReplaceOption extends CommonOptions {
projection?: Object;
sort?: Object;
maxTimeMS?: number;
upsert?: boolean;
returnOriginal?: boolean;
session?: ClientSession;
}
/** http://mongodb.github.io/node-mongodb-native/3.1/api/Collection.html#findOneAndUpdate */
export interface FindOneAndUpdateOption extends FindOneAndReplaceOption {
arrayFilters?: Object[];
}
/** http://mongodb.github.io/node-mongodb-native/3.1/api/Collection.html#geoHaystackSearch */
@@ -1356,6 +1360,17 @@ export interface ReplaceOneOptions extends CommonOptions {
bypassDocumentValidation?: boolean;
}
/** http://mongodb.github.io/node-mongodb-native/3.1/api/Collection.html#updateOne */
export interface UpdateOneOptions extends ReplaceOneOptions {
arrayFilters?: Object[];
}
/** http://mongodb.github.io/node-mongodb-native/3.1/api/Collection.html#updateMany */
export interface UpdateManyOptions extends CommonOptions {
upsert?: boolean;
arrayFilters?: Object[];
}
/** http://mongodb.github.io/node-mongodb-native/3.1/api/Collection.html#~updateWriteOpResult */
export interface UpdateWriteOpResult {
result: { ok: number, n: number, nModified: number };
+2
View File
@@ -13,6 +13,7 @@
// Idan Dardikman <https://github.com/idandrd>
// Dominik Heigl <https://github.com/various89>
// Fazendaaa <https://github.com/Fazendaaa>
// Dan Manastireanu <https://github.com/danmana>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
@@ -869,6 +870,7 @@ declare module "mongoose" {
/** controls document#toObject behavior when called manually - defaults to true */
minimize?: boolean;
read?: string;
writeConcern?: WriteConcern;
/** defaults to true. */
safe?: boolean | { w?: number | string; wtimeout?: number; j?: boolean };
+11
View File
@@ -1989,3 +1989,14 @@ db.createCollection('customers').
// visible outside of the transaction.
then(() => session.commitTransaction()).
then(() => Customer.findOne({ name: 'Test' }).exec())
/**
* https://mongoosejs.com/docs/guide.html#writeConcern
*/
new mongoose.Schema({ name: String }, {
writeConcern: {
w: 'majority',
j: true,
wtimeout: 1000
}
});
+1 -1
View File
@@ -104,7 +104,7 @@ export interface Token {
/**
* The number of line breaks found in the match. (Always zero if this rule has lineBreaks: false.)
*/
lineBreaks: boolean;
lineBreaks: number;
/**
* The line number of the beginning of the match, starting from 1.
*/
+13 -8
View File
@@ -3,7 +3,7 @@
// Definitions by: Fred Eisele <https://github.com/phreed>
// Ruben Taelman <https://github.com/rubensworks>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1
// TypeScript Version: 2.3
/// <reference types="node" />
@@ -12,10 +12,12 @@ import * as stream from "stream";
import * as RDF from "rdf-js";
import { EventEmitter } from "events";
export interface Prefixes {
[key: string]: RDF.NamedNode;
export interface Prefixes<I = RDF.NamedNode> {
[key: string]: I;
}
export type PrefixedToIri = (suffix: string) => RDF.NamedNode;
export class Term implements RDF.Term {
termType: "NamedNode" | "BlankNode" | "Literal" | "Variable" | "DefaultGraph";
id: string;
@@ -139,7 +141,7 @@ export interface N3StreamParser extends RDF.Stream, NodeJS.WritableStream, RDF.S
export interface WriterOptions {
format?: string;
prefixes?: Prefixes;
prefixes?: Prefixes<RDF.NamedNode | string>;
end?: boolean;
}
@@ -157,8 +159,8 @@ export interface N3Writer {
addQuad(subject: RDF.Term, predicate: RDF.Term, object: RDF.Term | RDF.Term[], graph?: RDF.Term, done?: () => void): void;
addQuad(quad: RDF.Quad): void;
addQuads(quads: RDF.Quad[]): void;
addPrefix(prefix: string, iri: string, done?: () => void): void;
addPrefixes(prefixes: Prefixes, done?: () => void): void;
addPrefix(prefix: string, iri: RDF.NamedNode | string , done?: () => void): void;
addPrefixes(prefixes: Prefixes<RDF.NamedNode | string>, done?: () => void): void;
end(err?: ErrorCallback, result?: string): void;
blank(predicate: RDF.Term, object: RDF.Term): RDF.Term;
blank(triple: BlankTriple | RDF.Quad | BlankTriple[] | RDF.Quad[]): RDF.Term;
@@ -218,6 +220,9 @@ export namespace Util {
function isVariable(value: RDF.Term | null): boolean;
function isDefaultGraph(value: RDF.Term | null): boolean;
function inDefaultGraph(value: RDF.Quad): boolean;
function prefix(iri: string, factory?: RDF.DataFactory): (suffix: string) => RDF.NamedNode;
function prefixes(defaultPrefixes: Prefixes, factory?: RDF.DataFactory): (iri: string) => (suffix: string) => RDF.NamedNode;
function prefix(iri: RDF.NamedNode|string, factory?: RDF.DataFactory): PrefixedToIri;
function prefixes(
defaultPrefixes: Prefixes<RDF.NamedNode|string>,
factory?: RDF.DataFactory
): (prefix: string) => PrefixedToIri;
}
+3 -2
View File
@@ -17,7 +17,8 @@ function test_add_prefixes() {
writer.addPrefixes({
freebase: N3.DataFactory.namedNode("http://rdf.freebase.com/ns/"),
xsd: N3.DataFactory.namedNode("http://www.w3.org/2001/XMLSchema#")
xsd: N3.DataFactory.namedNode("http://www.w3.org/2001/XMLSchema#"),
rdf: 'http://test'
});
writer.end((error, result) => {
@@ -31,7 +32,7 @@ function test_serialize() {
format: "ttl",
prefixes: {
foaf: "http://xmlns.com/foaf/0.1",
freebase: "http://rdf.freebase.com/ns/",
freebase: N3.DataFactory.namedNode("http://rdf.freebase.com/ns/"),
g: "http://base.google.com/ns/1.0"
}
});
+10 -4
View File
@@ -82,13 +82,19 @@ export interface WithRouterProps<Q = DefaultQuery> {
router: SingletonRouter<Q>;
}
/**
* Remove properties `K` from `T`.
*
* @internal
*/
export type Omit<T, K extends keyof any> = T extends any ? Pick<T, Exclude<keyof T, K>> : never;
// Manually disabling the no-unnecessary-generics rule so users can
// retain type inference if they warp their component in withRouter
// retain type inference if they wrap their component in withRouter
// without defining props explicitly
export function withRouter<T extends {}, Q = DefaultQuery>(
// tslint:disable-next-line:no-unnecessary-generics
Component: React.ComponentType<T & WithRouterProps<Q>>
): React.ComponentType<T>;
Component: React.ComponentType<T & WithRouterProps<Q>>
): React.ComponentType<Omit<T, keyof WithRouterProps<Q>>>;
declare const Router: SingletonRouter;
export default Router;
@@ -70,14 +70,14 @@ Router.prefetch("/route").then(Component => {
const element = <Component />;
});
interface TestComponentProps {
interface TestComponentProps extends WithRouterProps {
testValue: string;
}
class TestComponent extends React.Component<TestComponentProps & WithRouterProps> {
class TestComponent extends React.Component<TestComponentProps> {
state = { ready: false };
constructor(props: TestComponentProps & WithRouterProps) {
constructor(props: TestComponentProps) {
super(props);
props.router.ready(() => {
this.setState({ ready: true });
@@ -97,12 +97,57 @@ class TestComponent extends React.Component<TestComponentProps & WithRouterProps
withRouter(TestComponent);
interface TestComponent2Props extends WithRouterProps {
testValue: string;
}
class TestComponent2 extends React.Component<TestComponent2Props> {
state = { ready: false };
constructor(props: TestComponent2Props) {
super(props);
props.router.ready(() => {
this.setState({ ready: true });
});
}
render() {
return (
<div>
<h1>{this.state.ready ? 'Ready' : 'Not Ready'}</h1>
<h2>Route: {this.props.router.route}</h2>
<p>Another prop: {this.props.testValue}</p>
</div>
);
}
}
const TestComponent2WithRouter = withRouter(TestComponent2);
const res = <TestComponent2WithRouter testValue="" />;
interface TestSFCQuery {
test?: string;
}
interface TestSFCProps extends WithRouterProps<TestSFCQuery> { }
interface TestSFCProps extends WithRouterProps<TestSFCQuery> {
testProp: string;
}
const TestSFC: React.SFC<TestSFCProps> = ({ router }) => {
return <div>{router.query && router.query.test}</div>;
};
const TestSFCComponent = withRouter(TestSFC);
const res2 = <TestSFCComponent testProp="asdf"/>;
const TestSFC2 = withRouter<TestSFCProps>(({ router }) => {
return <div>{router.query && router.query.test}</div>;
});
const res3 = <TestSFC2 testProp="asdf" />;
const TestSFC3 = withRouter(({ router }) => {
return <div>{router.query && router.query.test}</div>;
});
const res4 = <TestSFC3 />;
+443 -62
View File
@@ -1822,6 +1822,14 @@ declare namespace Office {
* [Api set: Mailbox 1.7]
*/
AppointmentTimeChanged,
/**
* Triggers when an attachment is added to or removed from an item.
*
* [Api set: Mailbox Preview]
*
* @beta
*/
AttachmentsChanged,
/**
* Occurs when data within the binding is changed.
* To add an event handler for the BindingDataChanged event of a binding, use the addHandlerAsync method of the Binding object.
@@ -1918,6 +1926,8 @@ declare namespace Office {
* Triggers when the OfficeTheme is changed in Outlook.
*
* [Api set: Mailbox Preview]
*
* @beta
*/
OfficeThemeChanged,
/**
@@ -7340,6 +7350,57 @@ declare namespace Office {
declare namespace Office {
namespace MailboxEnums {
/**
* Specifies which string formatting to apply to an attachment's content.
*
* [Api set: Mailbox Preview]
*
* @remarks
* <table><tr><td>
* {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}
* </td><td>Compose or read</td></tr></table>
*
* @beta
*/
enum AttachmentContentFormat {
/**
* The content of the attachment is returned as a base64-encoded string.
*/
Base64 = "base64",
/**
* The content of the attachment is returned as a string representing a URL.
*/
Url = "url",
/**
* The content of the attachment is returned as a string representing an .eml formatted file.
*/
Eml = "eml"
}
/**
* Specifies whether an attachment was added to or removed from an item.
*
* [Api set: Mailbox Preview]
*
* @remarks
* <table><tr><td>
* {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}
* </td><td>Compose or read</td></tr></table>
*
* @beta
*/
enum AttachmentStatus {
/**
* An attachment was added to the item.
*/
Added = "added",
/**
* An attachment was removed from the item.
*/
Removed = "removed"
}
/**
* Specifies an attachment's type.
*
@@ -8494,6 +8555,31 @@ declare namespace Office {
*/
subject: string;
}
/**
* Represents the content of an attachment on a message or appointment item.
*
* [Api set: Mailbox Preview]
*
* @remarks
* <table><tr><td>{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}</td><td>ReadItem</td></tr>
*
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}</td><td>Compose or read</td></tr></table>
*
* @beta
*/
interface AttachmentContent {
/**
* The content of an attachment as a string.
*/
content: string;
/**
* The string format to use for an attachment's content.
* For file attachments, the formatting is a base64-encoded string.
* For item attachments that represent messages, the formatting is a string representing an .eml formatted file.
* For cloud attachments, the formatting is a URL string.
*/
format: Office.MailboxEnums.AttachmentContentFormat;
}
/**
* Represents an attachment on an item from the server. Read mode only.
*
@@ -9279,6 +9365,154 @@ declare namespace Office {
getAsync(callback?: (result: AsyncResult<Office.EmailAddressDetails>) => void): void;
}
/**
* The InternetHeaders object represents properties that are preserved after the item leaves Exchange and converted to a MIME message.
* These properties are stored as x-headers in the MIME message.
*
* InternetHeaders are stored as key/value pairs on a per-item basis.
*
* [Api set: Mailbox Preview]
*
* @remarks
* <table><tr><td>{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}</td><td>ReadItem</td></tr>
*
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}</td><td>Compose or read</td></tr></table>
*
* @beta
*/
export interface InternetHeaders {
/**
* Given an array of internet header names, this method returns a dictionary containing those internet headers and their values.
* If the add-in requests an x-header that is not available, that x-header will not be returned in the results.
*
* [Api set: Mailbox Preview]
*
* @remarks
* <table><tr><td>{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}</td><td>ReadItem</td></tr>
*
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}</td><td>Compose or read</td></tr></table>
*
* In addition to this signature, this method also has the following signature:
*
* `getAsync(names: string[], callback: (result: AsyncResult<Office.InternetHeaders>) => void): void;`
*
* @param names The names of the internet headers to be returned.
* @param options Optional. An object literal that contains one or more of the following properties:
* asyncContext: Developers can provide any object they wish to access in the callback method.
* @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter,
* asyncResult, which is an Office.AsyncResult object.
*
* @beta
*/
getAsync(names: string[], options?: Office.AsyncContextOptions, callback?: (result: AsyncResult<Office.InternetHeaders>) => void): void;
/**
* Given an array of internet header names, this method returns a dictionary containing those internet headers and their values.
* If the add-in requests an x-header that is not available, that x-header will not be returned in the results.
*
* [Api set: Mailbox Preview]
*
* @remarks
* <table><tr><td>{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}</td><td>ReadItem</td></tr>
*
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}</td><td>Compose or read</td></tr></table>
*
* @param names The names of the internet headers to be returned.
* @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter,
* asyncResult, which is an Office.AsyncResult object.
*
* @beta
*/
getAsync(names: string[], callback?: (result: AsyncResult<Office.InternetHeaders>) => void): void;
/**
* Given an array of internet header names, this method removes the specified headers from the internet header collection.
*
* [Api set: Mailbox Preview]
*
* @remarks
* <table><tr><td>{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}</td><td>ReadWriteItem</td></tr>
*
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}</td><td>Compose</td></tr></table>
*
* In addition to this signature, this method also has the following signature:
*
* `removeAsync(names: string[], callback: (result: AsyncResult<Office.Body>) => void): void;`
*
* @param names The names of the internet headers to be removed.
* @param options Optional. An object literal that contains one or more of the following properties:
* asyncContext: Developers can provide any object they wish to access in the callback method.
* @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter,
* asyncResult, which is an Office.AsyncResult object.
*
* @beta
*/
removeAsync(names: string[], options?: Office.AsyncContextOptions, callback?: (result: AsyncResult<Office.InternetHeaders>) => void): void;
/**
* Given an array of internet header names, this method removes the specified headers from the internet header collection.
*
* [Api set: Mailbox Preview]
*
* @remarks
* <table><tr><td>{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}</td><td>ReadWriteItem</td></tr>
*
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}</td><td>Compose</td></tr></table>
*
* @param names The names of the internet headers to be removed.
* @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter,
* asyncResult, which is an Office.AsyncResult object.
*
* @beta
*/
removeAsync(names: string[], callback?: (result: AsyncResult<Office.InternetHeaders>) => void): void;
/**
* Sets the specified internet headers to the specified values.
*
* The setAsync method creates a new header if the specified header does not already exist; otherwise, the existing value is replaced with
* the new value.
*
* [Api set: Mailbox Preview]
*
* @remarks
* <table><tr><td>{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}</td><td>ReadWriteItem</td></tr>
*
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}</td><td>Compose</td></tr>
*
* In addition to this signature, this method also has the following signatures:
*
* `setAsync(headers: string, callback: (result: AsyncResult<void>) => void): void;`
*
* @param headers The names and corresponding values of the headers to be set. Should be a dictionary object with keys being the names of the
* internet headers and values being the values of the internet headers.
* @param options Optional. An object literal that contains one or more of the following properties.
* asyncContext: Developers can provide any object they wish to access in the callback method.
* @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of type Office.AsyncResult.
* Any errors encountered will be provided in the asyncResult.error property.
*
* @beta
*/
setAsync(headers: Object, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult<void>) => void): void;
/**
* Sets the specified internet headers to the specified values.
*
* The setAsync method creates a new header if the specified header does not already exist; otherwise, the existing value is replaced with
* the new value.
*
* [Api set: Mailbox Preview]
*
* @remarks
* <table><tr><td>{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}</td><td>ReadWriteItem</td></tr>
*
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}</td><td>Compose</td></tr>
*
* @param headers The names and corresponding values of the headers to be set. Should be a dictionary object with keys being the names of the
* internet headers and values being the values of the internet headers.
* @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of type Office.AsyncResult.
* Any errors encountered will be provided in the asyncResult.error property.
*
* @beta
*/
setAsync(headers: Object, callback?: (result: AsyncResult<void>) => void): void;
}
/**
* Represents the appointment organizer, even if an alias or a delegate was used to create the appointment.
* This object provides a method to get the organizer value of an appointment in an Outlook add-in.
@@ -9669,7 +9903,8 @@ declare namespace Office {
/**
* Adds an event handler for a supported event.
*
* Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`.
* Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and
* `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported.
*
* [Api set: Mailbox 1.7]
*
@@ -9696,7 +9931,7 @@ declare namespace Office {
* Adds an event handler for a supported event.
*
* Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and
* `Office.EventType.RecurrenceChanged`.
* `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported.
*
* [Api set: Mailbox 1.7]
*
@@ -9855,6 +10090,26 @@ declare namespace Office {
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}</td><td>Appointment Organizer</td></tr></table>
*/
close(): void;
/**
* Gets the item's attachments as an array.
*
* [Api set: Mailbox Preview]
*
* @remarks
*
* <table><tr><td>{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}</td><td>ReadItem</td></tr>
*
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}</td><td>Compose</td></tr></table>
*
* @param options Optional. An object literal that contains one or more of the following properties.
* asyncContext: Developers can provide any object they wish to access in the callback method.
* @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of
* type Office.AsyncResult. If the call fails, the asyncResult.error property will contain and error code with the reason for
* the failure.
*
* @beta
*/
getAttachmentsAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult<Office.AttachmentDetails[]>) => void): void;
/**
* Gets initialization data passed when the add-in is activated by an actionable message.
*
@@ -9963,8 +10218,8 @@ declare namespace Office {
* The removeAttachmentAsync method removes the attachment with the specified identifier from the item.
* As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment
* in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session.
* A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form
* to continue in a separate window.
* A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to
* continue in a separate window.
*
* [Api set: Mailbox 1.1]
*
@@ -9997,8 +10252,8 @@ declare namespace Office {
* The removeAttachmentAsync method removes the attachment with the specified identifier from the item.
* As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment
* in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session.
* A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form
* to continue in a separate window.
* A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to
* continue in a separate window.
*
* [Api set: Mailbox 1.1]
*
@@ -10019,8 +10274,8 @@ declare namespace Office {
* The removeAttachmentAsync method removes the attachment with the specified identifier from the item.
* As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment
* in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session.
* A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form
* to continue in a separate window.
* A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to
* continue in a separate window.
*
* [Api set: Mailbox 1.1]
*
@@ -10044,8 +10299,8 @@ declare namespace Office {
* As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment
* in the same session.
* In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session.
* A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form
* to continue in a separate window.
* A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to
* continue in a separate window.
*
* [Api set: Mailbox 1.1]
*
@@ -10067,7 +10322,7 @@ declare namespace Office {
* Removes an event handler for a supported event.
*
* Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and
* `Office.EventType.RecurrenceChanged`.
* `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported.
*
* [Api set: Mailbox 1.7]
*
@@ -10081,7 +10336,7 @@ declare namespace Office {
*
* `removeHandlerAsync(eventType:EventType, handler: any, callback?: (result: AsyncResult<void>) => void): void;`
*
* @param eventType The event that should invoke the handler.
* @param eventType The event that should revoke the handler.
* @param handler The function to handle the event. The function must accept a single parameter, which is an object literal.
* The type property on the parameter will match the eventType parameter passed to removeHandlerAsync.
* @param options Optional. An object literal that contains one or more of the following properties.
@@ -10093,7 +10348,8 @@ declare namespace Office {
/**
* Removes an event handler for a supported event.
*
* Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`.
* Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and
* `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported.
*
* [Api set: Mailbox 1.7]
*
@@ -10103,7 +10359,7 @@ declare namespace Office {
*
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}</td><td>Appointment Organizer</td></tr></table>
*
* @param eventType The event that should invoke the handler.
* @param eventType The event that should revoke the handler.
* @param handler The function to handle the event. The function must accept a single parameter, which is an object literal.
* The type property on the parameter will match the eventType parameter passed to removeHandlerAsync.
* @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter,
@@ -10378,7 +10634,7 @@ declare namespace Office {
*/
interface AppointmentRead extends Appointment, ItemRead {
/**
* Gets an array of attachments for the item.
* Gets the item's attachments as an array.
*
* [Api set: Mailbox 1.0]
*
@@ -10682,7 +10938,7 @@ declare namespace Office {
* Adds an event handler for a supported event.
*
* Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and
* `Office.EventType.RecurrenceChanged`.
* `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported.
*
* [Api set: Mailbox 1.7]
*
@@ -10710,7 +10966,7 @@ declare namespace Office {
* Adds an event handler for a supported event.
*
* Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and
* `Office.EventType.RecurrenceChanged`.
* `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported.
*
* [Api set: Mailbox 1.7]
*
@@ -11063,7 +11319,7 @@ declare namespace Office {
* Removes an event handler for a supported event.
*
* Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and
* `Office.EventType.RecurrenceChanged`.
* `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported.
*
* [Api set: Mailbox 1.7]
*
@@ -11077,7 +11333,7 @@ declare namespace Office {
*
* `removeHandlerAsync(eventType:EventType, handler: any, callback?: (result: AsyncResult<void>) => void): void;`
*
* @param eventType The event that should invoke the handler.
* @param eventType The event that should revoke the handler.
* @param handler The function to handle the event. The function must accept a single parameter, which is an object literal.
* The type property on the parameter will match the eventType parameter passed to removeHandlerAsync.
* @param options Optional. An object literal that contains one or more of the following properties.
@@ -11090,7 +11346,7 @@ declare namespace Office {
* Removes an event handler for a supported event.
*
* Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and
* `Office.EventType.RecurrenceChanged`.
* `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported.
*
* [Api set: Mailbox 1.7]
*
@@ -11100,7 +11356,7 @@ declare namespace Office {
*
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}</td><td>Appointment Attendee</td></tr></table>
*
* @param eventType The event that should invoke the handler.
* @param eventType The event that should revoke the handler.
* @param handler The function to handle the event. The function must accept a single parameter, which is an object literal.
* The type property on the parameter will match the eventType parameter passed to removeHandlerAsync.
* @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter,
@@ -11237,7 +11493,8 @@ declare namespace Office {
/**
* Adds an event handler for a supported event.
*
* Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`.
* Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and
* `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported.
*
* [Api set: Mailbox 1.7]
*
@@ -11264,7 +11521,8 @@ declare namespace Office {
/**
* Adds an event handler for a supported event.
*
* Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`.
* Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and
* `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported.
*
* [Api set: Mailbox 1.7]
*
@@ -11281,6 +11539,36 @@ declare namespace Office {
* asyncResult, which is an Office.AsyncResult object.
*/
addHandlerAsync(eventType: Office.EventType, handler: any, callback?: (result: AsyncResult<void>) => void): void;
/**
* Gets an attachment from a message or appointment and returns it as an `Office.AttachmentContent` object.
*
* The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should use
* the identifier to retrieve an attachment in the same session that the attachmentIds were retrieved with the `getAttachmentsAsync` or
* `item.attachments` call. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session.
* A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to
* continue in a separate window.
*
* [Api set: Mailbox Preview]
*
* @remarks
*
* <table><tr><td>{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}</td><td>ReadItem</td></tr>
*
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}</td><td>Compose or read</td></tr>
*
* <tr><td>Errors</td><td>InvalidAttachmentId - The attachment identifier does not exist.</td></tr></table>
*
* @param attachmentId The identifier of the attachment you want to get. The maximum length of the string is 100 characters.
* @param options Optional. An object literal that contains one or more of the following properties.
* asyncContext: Developers can provide any object they wish to access in the callback method.
* @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter,
* asyncResult, which is an Office.AsyncResult object. If the call fails, the asyncResult.error property will contain and error code
* with the reason for the failure.
*
* @beta
*/
getAttachmentContentAsync(attachmentId: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult<Office.AttachmentContent>) => void): void;
/**
* Gets initialization data passed when the add-in is {@link https://docs.microsoft.com/outlook/actionable-messages/invoke-add-in-from-actionable-message | activated by an actionable message}.
@@ -11384,7 +11672,7 @@ declare namespace Office {
* Removes an event handler for a supported event.
*
* Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and
* `Office.EventType.RecurrenceChanged`.
* `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported.
*
* [Api set: Mailbox 1.7]
*
@@ -11398,7 +11686,7 @@ declare namespace Office {
*
* `removeHandlerAsync(eventType: Office.EventType, handler: any, callback?: (result: AsyncResult<void>) => void): void;`
*
* @param eventType The event that should invoke the handler.
* @param eventType The event that should revoke the handler.
* @param handler The function to handle the event. The function must accept a single parameter, which is an object literal.
* The type property on the parameter will match the eventType parameter passed to removeHandlerAsync.
* @param options Optional. An object literal that contains one or more of the following properties.
@@ -11412,7 +11700,7 @@ declare namespace Office {
* Removes an event handler for a supported event.
*
* Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and
* `Office.EventType.RecurrenceChanged`.
* `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported.
*
* [Api set: Mailbox 1.7]
*
@@ -11422,7 +11710,7 @@ declare namespace Office {
*
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}</td><td>Compose or read</td></tr></table>
*
* @param eventType The event that should invoke the handler.
* @param eventType The event that should revoke the handler.
* @param handler The function to handle the event. The function must accept a single parameter, which is an object literal.
* The type property on the parameter will match the eventType parameter passed to removeHandlerAsync.
* @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter,
@@ -11732,6 +12020,26 @@ declare namespace Office {
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}</td><td>Compose</td></tr></table>
*/
close(): void;
/**
* Gets the item's attachments as an array.
*
* [Api set: Mailbox Preview]
*
* @remarks
*
* <table><tr><td>{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}</td><td>ReadItem</td></tr>
*
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}</td><td>Compose</td></tr></table>
*
* @param options Optional. An object literal that contains one or more of the following properties.
* asyncContext: Developers can provide any object they wish to access in the callback method.
* @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of
* type Office.AsyncResult. If the call fails, the asyncResult.error property will contain and error code with the reason for
* the failure.
*
* @beta
*/
getAttachmentsAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult<Office.AttachmentDetails[]>) => void): void;
/**
* Gets initialization data passed when the add-in is activated by an actionable message.
*
@@ -11818,8 +12126,8 @@ declare namespace Office {
* The removeAttachmentAsync method removes the attachment with the specified identifier from the item.
* As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment
* in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session.
* A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form
* to continue in a separate window.
* A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to
* continue in a separate window.
*
* [Api set: Mailbox 1.1]
*
@@ -11853,8 +12161,8 @@ declare namespace Office {
* The removeAttachmentAsync method removes the attachment with the specified identifier from the item.
* As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment
* in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session.
* A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form
* to continue in a separate window.
* A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to
* continue in a separate window.
*
* [Api set: Mailbox 1.1]
*
@@ -11875,8 +12183,8 @@ declare namespace Office {
* The removeAttachmentAsync method removes the attachment with the specified identifier from the item.
* As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment
* in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session.
* A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form
* to continue in a separate window.
* A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to
* continue in a separate window.
*
* [Api set: Mailbox 1.1]
*
@@ -11899,8 +12207,8 @@ declare namespace Office {
* The removeAttachmentAsync method removes the attachment with the specified identifier from the item.
* As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment
* in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session.
* A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form
* to continue in a separate window.
* A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to
* continue in a separate window.
*
* [Api set: Mailbox 1.1]
*
@@ -12192,7 +12500,7 @@ declare namespace Office {
*/
interface ItemRead extends Item {
/**
* Gets an array of attachments for the item.
* Gets the item's attachments as an array.
*
* [Api set: Mailbox 1.0]
*
@@ -12740,6 +13048,22 @@ declare namespace Office {
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}</td><td>Message Compose</td></tr></table>
*/
from: Office.From;
/**
* Sets the internet headers of a message.
*
* The internetHeaders property returns an InternetHeaders object that provides methods to manage the internet headers on the message.
*
* [Api set: Mailbox Preview]
*
* @remarks
*
* <table><tr><td>{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}</td><td>ReadItem</td></tr>
*
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}</td><td>Message Compose</td></tr></table>
*
* @beta
*/
internetHeaders: Office.InternetHeaders;
/**
* Gets the type of item that an instance represents.
*
@@ -12978,7 +13302,8 @@ declare namespace Office {
/**
* Adds an event handler for a supported event.
*
* Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`.
* Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and
* `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported.
*
* [Api set: Mailbox 1.7]
*
@@ -13005,7 +13330,7 @@ declare namespace Office {
* Adds an event handler for a supported event.
*
* Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and
* `Office.EventType.RecurrenceChanged`.
* `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported.
*
* [Api set: Mailbox 1.7]
*
@@ -13166,6 +13491,26 @@ declare namespace Office {
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}</td><td>Message Compose</td></tr></table>
*/
close(): void;
/**
* Gets the item's attachments as an array.
*
* [Api set: Mailbox Preview]
*
* @remarks
*
* <table><tr><td>{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}</td><td>ReadItem</td></tr>
*
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}</td><td>Compose</td></tr></table>
*
* @param options Optional. An object literal that contains one or more of the following properties.
* asyncContext: Developers can provide any object they wish to access in the callback method.
* @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of
* type Office.AsyncResult. If the call fails, the asyncResult.error property will contain and error code with the reason for
* the failure.
*
* @beta
*/
getAttachmentsAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult<Office.AttachmentDetails[]>) => void): void;
/**
* Gets initialization data passed when the add-in is activated by an actionable message.
*
@@ -13278,8 +13623,8 @@ declare namespace Office {
* The removeAttachmentAsync method removes the attachment with the specified identifier from the item.
* As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment
* in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session.
* A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form
* to continue in a separate window.
* A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to
* continue in a separate window.
*
* [Api set: Mailbox 1.1]
*
@@ -13313,8 +13658,8 @@ declare namespace Office {
* The removeAttachmentAsync method removes the attachment with the specified identifier from the item.
* As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment
* in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session.
* A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form
* to continue in a separate window.
* A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to
* continue in a separate window.
*
* [Api set: Mailbox 1.1]
*
@@ -13335,8 +13680,8 @@ declare namespace Office {
* The removeAttachmentAsync method removes the attachment with the specified identifier from the item.
* As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment
* in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session.
* A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form
* to continue in a separate window.
* A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to
* continue in a separate window.
*
* [Api set: Mailbox 1.1]
*
@@ -13359,8 +13704,8 @@ declare namespace Office {
* The removeAttachmentAsync method removes the attachment with the specified identifier from the item.
* As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment
* in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session.
* A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form
* to continue in a separate window.
* A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to
* continue in a separate window.
*
* [Api set: Mailbox 1.1]
*
@@ -13382,7 +13727,7 @@ declare namespace Office {
* Removes an event handler for a supported event.
*
* Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and
* `Office.EventType.RecurrenceChanged`.
* `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported.
*
* [Api set: Mailbox 1.7]
*
@@ -13396,7 +13741,7 @@ declare namespace Office {
*
* `removeHandlerAsync(eventType:EventType, handler: any, callback?: (result: AsyncResult<void>) => void): void;`
*
* @param eventType The event that should invoke the handler.
* @param eventType The event that should revoke the handler.
* @param handler The function to handle the event. The function must accept a single parameter, which is an object literal.
* The type property on the parameter will match the eventType parameter passed to removeHandlerAsync.
* @param options Optional. An object literal that contains one or more of the following properties.
@@ -13409,7 +13754,7 @@ declare namespace Office {
* Removes an event handler for a supported event.
*
* Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and
* `Office.EventType.RecurrenceChanged`.
* `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported.
*
* [Api set: Mailbox 1.7]
*
@@ -13419,7 +13764,7 @@ declare namespace Office {
*
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}</td><td>Message Compose</td></tr></table>
*
* @param eventType The event that should invoke the handler.
* @param eventType The event that should revoke the handler.
* @param handler The function to handle the event. The function must accept a single parameter, which is an object literal.
* The type property on the parameter will match the eventType parameter passed to removeHandlerAsync.
* @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter,
@@ -13694,7 +14039,7 @@ declare namespace Office {
*/
interface MessageRead extends Message, ItemRead {
/**
* Gets an array of attachments for the item.
* Gets the item's attachments as an array.
*
* [Api set: Mailbox 1.0]
*
@@ -13802,6 +14147,22 @@ declare namespace Office {
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}</td><td>Message Read</td></tr></table>
*/
from: EmailAddressDetails;
/**
* Gets the internet headers of a message.
*
* The internetHeaders property returns an InternetHeaders object that provides methods to manage the internet headers on the message.
*
* [Api set: Mailbox Preview]
*
* @remarks
*
* <table><tr><td>{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}</td><td>ReadItem</td></tr>
*
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}</td><td>Message Read</td></tr></table>
*
* @beta
*/
internetHeaders: Office.InternetHeaders;
/**
* Gets the Internet message identifier for an email message.
*
@@ -14014,7 +14375,7 @@ declare namespace Office {
* Adds an event handler for a supported event.
*
* Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and
* `Office.EventType.RecurrenceChanged`.
* `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported.
*
* [Api set: Mailbox 1.7]
*
@@ -14042,7 +14403,7 @@ declare namespace Office {
* Adds an event handler for a supported event.
*
* Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and
* `Office.EventType.RecurrenceChanged`.
* `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported.
*
* [Api set: Mailbox 1.7]
*
@@ -14399,7 +14760,7 @@ declare namespace Office {
* Removes an event handler for a supported event.
*
* Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and
* `Office.EventType.RecurrenceChanged`.
* `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported.
*
* [Api set: Mailbox 1.7]
*
@@ -14413,7 +14774,7 @@ declare namespace Office {
*
* `removeHandlerAsync(eventType:EventType, handler: any, callback?: (result: AsyncResult<void>) => void): void;`
*
* @param eventType The event that should invoke the handler.
* @param eventType The event that should revoke the handler.
* @param handler The function to handle the event. The function must accept a single parameter, which is an object literal.
* The type property on the parameter will match the eventType parameter passed to removeHandlerAsync.
* @param options Optional. An object literal that contains one or more of the following properties.
@@ -14426,7 +14787,7 @@ declare namespace Office {
* Removes an event handler for a supported event.
*
* Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and
* `Office.EventType.RecurrenceChanged`.
* `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported.
*
* [Api set: Mailbox 1.7]
*
@@ -14436,7 +14797,7 @@ declare namespace Office {
*
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}</td><td>Message Read</td></tr></table>
*
* @param eventType The event that should invoke the handler.
* @param eventType The event that should revoke the handler.
* @param handler The function to handle the event. The function must accept a single parameter, which is an object literal.
* The type property on the parameter will match the eventType parameter passed to removeHandlerAsync.
* @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter,
@@ -14733,7 +15094,7 @@ declare namespace Office {
/**
* Adds an event handler for a supported event.
*
* Currently, the supported event types are `Office.EventType.ItemChanged` and `Office.EventType.OfficeThemeChanged`.
* Currently, the only supported event type is `Office.EventType.ItemChanged`. In Preview, `Office.EventType.OfficeThemeChanged` is also supported.
*
* [Api set: Mailbox 1.5]
*
@@ -15139,6 +15500,27 @@ declare namespace Office {
* @param userContext Optional. Any state data that is passed to the asynchronous method.
*/
makeEwsRequestAsync(data: any, callback: (result: AsyncResult<string>) => void, userContext?: any): void;
/**
* Removes an event handler for a supported event.
*
* Currently, the only supported event type is `Office.EventType.ItemChanged`. In Preview, `Office.EventType.OfficeThemeChanged` is also supported.
*
* [Api set: Mailbox 1.5]
*
* @remarks
*
* <table><tr><td>{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}</td><td>ReadItem</td></tr>
*
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}</td><td>Compose or read</td></tr></table>
*
* @param eventType The event that should revoke the handler.
* @param handler The function to handle the event. The function must accept a single parameter, which is an object literal.
* The type property on the parameter will match the eventType parameter passed to addHandlerAsync.
* @param options Optional. Provides an option for preserving context data of any type, unchanged, for use in a callback.
* @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of
* type Office.AsyncResult.
*/
removeHandlerAsync(eventType: Office.EventType, handler: (type: EventType) => void, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult<void>) => void): void;
}
/**
@@ -16444,7 +16826,7 @@ declare namespace Office {
*/
owner: String;
/**
* The remote REST url related to the owner’s mailbox.
* The remote REST URL related to the owner’s mailbox.
*/
restUrl: String;
/**
@@ -21397,12 +21779,11 @@ declare namespace Excel {
inCellDropDown: boolean;
/**
*
* Source of the list for data validation
When setting the value, it can be passed in as a Excel Range object, or a string that contains comma separated number, boolean or date.
* The source of the list for data validation. The value is a string, which can either be a range reference (e.g. `"=Names!$A$1:$A$3"`) or a comma-separated list of the values themselves.
*
* [Api set: ExcelApi 1.8]
*/
source: string | Range;
source: string;
}
/**
*
+9 -9
View File
@@ -1169,6 +1169,15 @@ export interface FrameBase extends Evalable {
*/
hover(selector: string): Promise<void>;
/**
* Triggers a `change` and `input` event once all the provided options have been selected.
* If there's no `<select>` element matching selector, the method throws an error.
* @param selector A selector to query page for.
* @param values Values of options to select. If the `<select>` has the `multiple` attribute,
* all values are considered, otherwise only the first one is taken into account.
*/
select(selector: string, ...values: string[]): Promise<string[]>;
/**
* Sets the page content.
* @param html HTML markup to assign to the page.
@@ -1472,15 +1481,6 @@ export interface Page extends EventEmitter, FrameBase {
screenshot(options?: BinaryScreenShotOptions): Promise<Buffer>;
screenshot(options?: ScreenshotOptions): Promise<string | Buffer>;
/**
* Triggers a `change` and `input` event once all the provided options have been selected.
* If there's no `<select>` element matching selector, the method throws an error.
* @param selector A selector to query page for.
* @param values Values of options to select. If the `<select>` has the `multiple` attribute,
* all values are considered, otherwise only the first one is taken into account.
*/
select(selector: string, ...values: string[]): Promise<string[]>;
/**
* Toggles bypassing page's Content-Security-Policy.
* NOTE CSP bypassing happens at the moment of CSP initialization rather then evaluation.
+2
View File
@@ -0,0 +1,2 @@
import { F } from '../index';
export default F;
+2
View File
@@ -0,0 +1,2 @@
import { T } from '../index';
export default T;
+2
View File
@@ -0,0 +1,2 @@
import { add } from '../index';
export default add;
+2
View File
@@ -0,0 +1,2 @@
import { addIndex } from '../index';
export default addIndex;
+2
View File
@@ -0,0 +1,2 @@
import { adjust } from '../index';
export default adjust;
+2
View File
@@ -0,0 +1,2 @@
import { all } from '../index';
export default all;
+2
View File
@@ -0,0 +1,2 @@
import { allPass } from '../index';
export default allPass;
+2
View File
@@ -0,0 +1,2 @@
import { always } from '../index';
export default always;
+2
View File
@@ -0,0 +1,2 @@
import { and } from '../index';
export default and;
+2
View File
@@ -0,0 +1,2 @@
import { any } from '../index';
export default any;
+2
View File
@@ -0,0 +1,2 @@
import { anyPass } from '../index';
export default anyPass;
+2
View File
@@ -0,0 +1,2 @@
import { ap } from '../index';
export default ap;
+2
View File
@@ -0,0 +1,2 @@
import { aperture } from '../index';
export default aperture;
+2
View File
@@ -0,0 +1,2 @@
import { append } from '../index';
export default append;
+2
View File
@@ -0,0 +1,2 @@
import { apply } from '../index';
export default apply;
+2
View File
@@ -0,0 +1,2 @@
import { applySpec } from '../index';
export default applySpec;
+2
View File
@@ -0,0 +1,2 @@
import { applyTo } from '../index';
export default applyTo;
+2
View File
@@ -0,0 +1,2 @@
import { ascend } from '../index';
export default ascend;
+2
View File
@@ -0,0 +1,2 @@
import { assoc } from '../index';
export default assoc;
+2
View File
@@ -0,0 +1,2 @@
import { assocPath } from '../index';
export default assocPath;
+2
View File
@@ -0,0 +1,2 @@
import { binary } from '../index';
export default binary;
+2
View File
@@ -0,0 +1,2 @@
import { bind } from '../index';
export default bind;
+2
View File
@@ -0,0 +1,2 @@
import { both } from '../index';
export default both;

Some files were not shown because too many files have changed in this diff Show More