diff --git a/alexa-sdk/alexa-sdk-tests.ts b/alexa-sdk/alexa-sdk-tests.ts new file mode 100644 index 0000000000..e161c5bf38 --- /dev/null +++ b/alexa-sdk/alexa-sdk-tests.ts @@ -0,0 +1,25 @@ +/// +/// + +import * as Alexa from "alexa-sdk"; + +exports.handler = function(event: Alexa.RequestBody, context: Alexa.Context, callback: Function) { + let alexa = Alexa.handler(event, context); + alexa.registerHandlers(handlers); + alexa.execute(); +}; + +let handlers: Alexa.Handlers = { + 'LaunchRequest': function () { + var self: Alexa.Handler = this; + self.emit('SayHello'); + }, + 'HelloWorldIntent': function () { + var self: Alexa.Handler = this; + self.emit('SayHello'); + }, + 'SayHello': function () { + var self: Alexa.Handler = this; + self.emit(':tell', 'Hello World!'); + } +}; diff --git a/alexa-sdk/alexa-sdk.d.ts b/alexa-sdk/alexa-sdk.d.ts new file mode 100644 index 0000000000..5866d8c4ee --- /dev/null +++ b/alexa-sdk/alexa-sdk.d.ts @@ -0,0 +1,132 @@ +// Type definitions for Alexa SDK for Node.js v1.0.3 +// Project: https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs +// Definitions by: Pete Beegle +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare module 'alexa-sdk' { + export function handler(event: RequestBody, context: Context, callback?: Function): AlexaObject; + export function CreateStateHandler(state: string, obj: any): any; + export var StateString: string; + + interface AlexaObject { + _event: any; + _context: any; + _callback: any; + state: any; + appId: any; + response: any; + dynamoDBTableName: any; + saveBeforeResponse: boolean; + registerHandlers: (...handlers: Handlers[]) => any; + execute: () => void; + } + + interface Handlers { + [intent: string]: () => void; + } + + interface Handler { + on: any; + emit(event: string, ...args: any[]): boolean; + emitWithState: any; + state: any; + handler: any; + event: RequestBody; + attributes: any; + context: any; + name: any; + isOverriden: any; + } + + interface Context { + callbackWaitsForEmptyEventLoop: boolean; + logGroupName: string; + logStreamName: string; + functionName: string; + memoryLimitInMB: string; + functionVersion: string; + invokeid: string; + awsRequestId: string; + } + + interface RequestBody { + version: string; + session: Session; + request: LaunchRequest | IntentRequest | SessionEndedRequest; + } + + interface Session { + new: boolean; + sessionId: string; + attributes: any; + application: SessionApplication; + user: SessionUser; + } + + interface SessionApplication { + applicationId: string; + } + + interface SessionUser { + userId: string; + accessToken: string; + } + + interface LaunchRequest extends IRequest {} + + interface IntentRequest extends IRequest { + intent: Intent; + } + + interface Intent { + name: string; + slots: any; + } + + interface SessionEndedRequest extends IRequest{ + reason: string; + } + + interface IRequest { + type: "LaunchRequest" | "IntentRequest" | "SessionEndedRequest"; + requestId: string; + timeStamp: string; + } + + interface ResponseBody { + version: string; + sessionAttributes?: any; + response: Response; + } + + interface Response { + outputSpeech?: OutputSpeech; + card?: Card; + reprompt?: Reprompt; + shouldEndSession: boolean; + } + + interface OutputSpeech { + type: "PlainText" | "SSML"; + text?: string; + ssml?: string; + } + + interface Card { + type: "Simple" | "Standard" | "LinkAccount"; + title?: string; + content?: string; + text?: string; + image?: Image; + } + + interface Image { + smallImageUrl: string; + largeImageUrl: string; + } + + interface Reprompt { + outputSpeech: OutputSpeech; + } +} + diff --git a/amcharts/AmCharts.d.ts b/amcharts/AmCharts.d.ts index 7268150c75..27998956b8 100644 --- a/amcharts/AmCharts.d.ts +++ b/amcharts/AmCharts.d.ts @@ -29,6 +29,16 @@ declare namespace AmCharts { /** Create chart by params. */ function makeChart(selector: string, params: any, delay?: number): AmChart; + + /** Set a method to be called before initializing the chart. + * When the method is called, the chart instance is passed as an attribute. + * You can use this feature to preprocess chart data or do some other things you need + * before initializing the chart. + * @param {Function} handler - The method to be called. + * @param {string[]} types - Which chart types should call this method. Defaults to all + * if none is passed. + */ + function addInitHandler(handler: Function, types: string[]); /** AmPieChart class creates pie/donut chart. In order to display pie chart you need to set at least three properties - dataProvider, titleField and valueField. @example @@ -1006,7 +1016,7 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val bold - specifies if text is bold (true/false), url - url */ - addLabel(x: number, y: number, text: string, align: string, size: number, color: string, rotation: number, alpha: number, bold: boolean, url: string); + addLabel(x: number|string, y: number|string, text: string, align: string, size?: number, color?: string, rotation?: number, alpha?: number, bold?: boolean, url?: string); /** Adds a legend to the chart. By default, you don't need to create div for your legend, however if you want it to be positioned in some different way, you can create div anywhere you want and pass id or reference to your div as a second parameter. (NOTE: This method will not work on StockPanel.) diff --git a/angular-material/angular-material.d.ts b/angular-material/angular-material.d.ts index c19dae9dbd..23da7bceb2 100644 --- a/angular-material/angular-material.d.ts +++ b/angular-material/angular-material.d.ts @@ -299,6 +299,7 @@ declare namespace angular.material { locals?: {[index: string]: any}; resolve?: {[index: string]: angular.IPromise} attachTo?: string|JQuery|Element; + propagateContainerEvents?: boolean; panelClass?: string; zIndex?: number; // default: 80 position?: IPanelPosition; @@ -331,16 +332,18 @@ declare namespace angular.material { addClass(newClass: string): void; removeClass(oldClass: string): void; toggleClass(toggleClass: string): void; - focusOnOpen(): void; + updatePosition(position: IPanelPosition): void; } interface IPanelPosition { absolute(): IPanelPosition; relativeTo(someElement: string|JQuery|Element): IPanelPosition; - top(opt_top: string): IPanelPosition; // default: '0' - bottom(opt_bottom: string): IPanelPosition; // default: '0' - left(opt_left: string): IPanelPosition; // default: '0' - right(opt_right: string): IPanelPosition; // default: '0' + top(top?: string): IPanelPosition; // default: '0' + bottom(bottom?: string): IPanelPosition; // default: '0' + start(start?: string): IPanelPosition; // default: '0' + end(end?: string): IPanelPosition; // default: '0' + left(left?: string): IPanelPosition; // default: '0' + right(right?: string): IPanelPosition; // default: '0' centerHorizontally(): IPanelPosition; centerVertically(): IPanelPosition; center(): IPanelPosition; @@ -360,5 +363,24 @@ declare namespace angular.material { open(opt_config: IPanelConfig): angular.IPromise; newPanelPosition(): IPanelPosition; newPanelAnimation(): IPanelAnimation; + xPosition: { + CENTER: string, + ALIGN_START: string, + ALIGN_END: string, + OFFSET_START: string, + OFFSET_END: string, + }; + yPosition: { + CENTER: string, + ALIGN_TOPS: string, + ALIGN_BOTTOMS: string, + ABOVE: string, + BELOW: string, + }; + animation: { + SLIDE: string, + SCALE: string, + FADE: string, + }; } } diff --git a/auth0.lock/auth0.lock-tests.ts b/auth0.lock/auth0.lock-tests.ts index fd646ee1bb..07a7cf8323 100644 --- a/auth0.lock/auth0.lock-tests.ts +++ b/auth0.lock/auth0.lock-tests.ts @@ -1,13 +1,165 @@ /// /// -var lock: Auth0LockStatic = new Auth0Lock("dsa7d77dsa7d7", "mine.auth0.com"); +const CLIENT_ID = "YOUR_AUTH0_APP_CLIENTID"; +const DOMAIN = "YOUR_DOMAIN_AT.auth0.com"; -lock.showSignin({ - connections: ["facebook", "google-oauth2", "twitter", "Username-Password-Authentication"], - icon: "https://contoso.com/logo-32.png", - socialBigButtons: true - }, - () => { - // The Auth0 Widget is now loaded. +var lock: Auth0LockStatic = new Auth0Lock(CLIENT_ID, DOMAIN); + +lock.show(); +lock.hide(); +lock.logout(() => {}); + +// The examples below are lifted from auth0-lock documentation on Github + +// "on" event-driven example + +lock.on("authenticated", function(authResult : any) { + lock.getProfile(authResult.idToken, function(error, profile) { + if (error) { + // Handle error + return; + } + + localStorage.setItem("idToken", authResult.idToken); + localStorage.setItem("profile", JSON.stringify(profile)); + }); }); + + +// test theme + +var themeOptions : Auth0LockConstructorOptions = { + theme: { + logo: "https://example.com/assets/logo.png", + primaryColor: "green" + } +}; + +new Auth0Lock(CLIENT_ID, DOMAIN, themeOptions); + +// test authentication + +var authOptions : Auth0LockConstructorOptions = { + auth: { + params: { state: "foo" }, + redirect: true, + redirectUrl: "some url", + responseType: "token", + sso: true + } +}; + +new Auth0Lock(CLIENT_ID, DOMAIN, authOptions); + +// test multi-variant example + +var multiVariantOptions : Auth0LockConstructorOptions = { + container: "myContainer", + closable: false, + languageDictionary: { + signUpTerms: "I agree to the terms of service ...", + title: "My Company", + }, + autofocus: false +}; + +new Auth0Lock(CLIENT_ID, DOMAIN, multiVariantOptions); + +// test text-field additional sign up field + +var textFieldOptions : Auth0LockConstructorOptions = { + additionalSignUpFields: [{ + name: "address", + placeholder: "enter your address", + // The following properties are optional + icon: "https://example.com/assests/address_icon.png", + prefill: "street 123", + validator: function(input : string) { + return { + valid: input.length >= 10, + hint: "Must have 10 or more chars" // optional + }; + } + }] +}; + +new Auth0Lock(CLIENT_ID, DOMAIN, textFieldOptions); + +// test select-field additional sign up field + +var selectFieldOptions : Auth0LockConstructorOptions = { + additionalSignUpFields: [{ + type: "select", + name: "location", + placeholder: "choose your location", + options: [ + {value: "us", label: "United States"}, + {value: "fr", label: "France"}, + {value: "ar", label: "Argentina"} + ], + // The following properties are optional + icon: "https://example.com/assests/location_icon.png", + prefill: "us" + }] +}; + +new Auth0Lock(CLIENT_ID, DOMAIN, selectFieldOptions); + +// test select-field additional sign up field with callbacks for + +var selectFieldOptionsWithCallbacks : Auth0LockConstructorOptions = { + additionalSignUpFields: [{ + type: "select", + name: "location", + placeholder: "choose your location", + options: function(cb) { + // obtain options, in case of error you call cb with the error in the + // first arg instead of null + + let options = [ + {value: "us", label: "United States"}, + {value: "fr", label: "France"}, + {value: "ar", label: "Argentina"} + ]; + + cb(null, options); + }, + icon: "https://example.com/assests/location_icon.png", + prefill: function(cb) { + // obtain prefill, in case of error you call cb with the error in the + // first arg instead of null + + let prefill = "us"; + + cb(null, prefill); + } + }] +} + +new Auth0Lock(CLIENT_ID, DOMAIN, selectFieldOptionsWithCallbacks); + +// test Avatar options + +var avatarOptions : Auth0LockConstructorOptions = { + avatar: { + url: (email : string, cb : Auth0LockAvatarUrlCallback) => { + // obtain url for email, in case of error you call cb with the error in + // the first arg instead of null + + let url = "url"; + + cb(null, url); + }, + displayName: (email : string, cb : Auth0LockAvatarDisplayNameCallback) => { + // obtain displayName for email, in case of error you call cb with the + // error in the first arg instead of null + + let displayName = "displayName"; + + cb(null, displayName); + } + } +}; + +new Auth0Lock(CLIENT_ID, DOMAIN, avatarOptions); diff --git a/auth0.lock/auth0.lock.d.ts b/auth0.lock/auth0.lock.d.ts index 15f767984b..7a459afd97 100644 --- a/auth0.lock/auth0.lock.d.ts +++ b/auth0.lock/auth0.lock.d.ts @@ -1,10 +1,70 @@ -// Type definitions for Auth0Widget.js +// Type definitions for auth0-lock v10.0.1 // Project: http://auth0.com -// Definitions by: Robert McLaws +// Definitions by: Brian Caruso // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// +interface Auth0LockAdditionalSignUpFieldOption { + value: string; + label: string; +} + +type Auth0LockAdditionalSignUpFieldOptionsCallback = + (error: Auth0Error, options: Auth0LockAdditionalSignUpFieldOption[]) => void; + +type Auth0LockAdditionalSignUpFieldOptionsFunction = + (callback: Auth0LockAdditionalSignUpFieldOptionsCallback) => void; + +type Auth0LockAdditionalSignUpFieldPrefillCallback = + (error: Auth0Error, prefill: string) => void; + +type Auth0LockAdditionalSignUpFieldPrefillFunction = + (callback: Auth0LockAdditionalSignUpFieldPrefillCallback) => void; + +interface Auth0LockAdditionalSignUpField { + icon?: string; + name: string; + options?: Auth0LockAdditionalSignUpFieldOption[] | Auth0LockAdditionalSignUpFieldOptionsFunction; + placeholder: string; + prefill?: string | Auth0LockAdditionalSignUpFieldPrefillFunction; + type?: "select" | "text"; + validator?: (input: string) => { valid: boolean; hint?: string }; +} + +type Auth0LockAvatarUrlCallback = (error: Auth0Error, url: string) => void; +type Auth0LockAvatarDisplayNameCallback = (error: Auth0Error, displayName: string) => void; + +interface Auth0LockAvatarOptions { + url: (email: string, callback: Auth0LockAvatarUrlCallback) => void; + displayName: (email: string, callback: Auth0LockAvatarDisplayNameCallback) => void; +} + +interface Auth0LockThemeOptions { + logo?: string; + primaryColor?: string; +} + +// https://auth0.com/docs/libraries/lock/v10/sending-authentication-parameters +interface Auth0LockAuthParamsOptions { + access_token?: any; + connection_scopes?: any; + device?: any; + nonce?: any; + protocol?: any; + request_id?: any; + scope?: string; + state?: string; +} + +interface Auth0LockAuthOptions { + params?: Auth0LockAuthParamsOptions; + redirect?: boolean; + redirectUrl?: string; + responseType?: string; + sso?: boolean; +} + interface Auth0LockPopupOptions { width: number; height: number; @@ -12,68 +72,51 @@ interface Auth0LockPopupOptions { top: number; } -interface Auth0LockOptions { - authParams?: any; - callbackURL?: string; - connections?: string[]; - container?: string; - closable?: boolean; - dict?: any; - defaultUserPasswordConnection?: string; - defaultADUsernameFromEmailPrefix?: boolean; - disableResetAction?: boolean; - disableSignupAction?: boolean; - focusInput?: boolean; - forceJSONP?: boolean; - gravatar?: boolean; - integratedWindowsLogin?: boolean; - icon?: string; - loginAfterSignup?: boolean; - popup?: boolean; - popupOptions?: Auth0LockPopupOptions; - rememberLastLogin?: boolean; - resetLink?: string; - responseType?: string; - signupLink?: string; - socialBigButtons?: boolean; - sso?: boolean; - theme?: string; - usernameStyle?: any; -} - interface Auth0LockConstructorOptions { - cdn?: string; + additionalSignUpFields?: Auth0LockAdditionalSignUpField[]; + allowedConnections?: string[]; + allowForgotPassword?: boolean; + allowLogin?: boolean; + allowSignUp?: boolean; assetsUrl?: string; - useCordovaSocialPlugins?: boolean; + auth?: Auth0LockAuthOptions; + autoclose?: boolean; + autofocus?: boolean; + avatar?: Auth0LockAvatarOptions; + closable?: boolean; + container?: string; + defaultADUsernameFromEmailPrefix?: string; + defaultDatabaseConnection?: string; + defaultEnterpriseConnection?: string; + forgotPasswordLink?: string; + initialScreen?: "login" | "signUp" | "forgotPassword"; + language?: string; + languageDictionary?: any; + loginAfterSignup?: boolean; + mustAcceptTerms?: boolean; + popupOptions?: Auth0LockPopupOptions; + prefill?: { email?: string, username?: string}; + rememberLastLogin?: boolean; + signupLink?: string; + socialButtonStyle?: "big" | "small"; + theme?: Auth0LockThemeOptions; + usernameStyle?: string; } interface Auth0LockStatic { new (clientId: string, domain: string, options?: Auth0LockConstructorOptions): Auth0LockStatic; + getProfile(token: string, callback: (error: Auth0Error, profile: Auth0UserProfile) => void) : void; show(): void; - show(options: Auth0LockOptions): void; - show(callback: (error?: Auth0Error, profile?: Auth0UserProfile, token?: string) => void) : void; - show(options: Auth0LockOptions, callback: (error?: Auth0Error, profile?: Auth0UserProfile, token?: string) => void) : void; + hide(): void; + logout(query: any): void; - showSignin(): void; - showSignin(options: Auth0LockOptions): void; - showSignin(callback: (error?: Auth0Error, profile?: Auth0UserProfile, token?: string) => void) : void; - showSignin(options: Auth0LockOptions, callback: (error?: Auth0Error, profile?: Auth0UserProfile, token?: string) => void) : void; - - showSignup(): void; - showSignup(options: Auth0LockOptions): void; - showSignup(callback: (error?: Auth0Error) => void) : void; - showSignup(options: Auth0LockOptions, callback: (error?: Auth0Error) => void) : void; - - showReset(): void; - showReset(options: Auth0LockOptions): void; - showReset(callback: (error?: Auth0Error) => void) : void; - showReset(options: Auth0LockOptions, callback: (error?: Auth0Error) => void) : void; - - hide(callback: () => void): void; - logout(callback: () => void): void; - - getClient(): Auth0Static; + on(event: "show", callback: () => void) : void; + on(event: "hide", callback: () => void) : void; + on(event: "unrecoverable_error", callback: (error: Auth0Error) => void) : void; + on(event: "authorization_error", callback: (error: Auth0Error) => void) : void; + on(event: "authenticated", callback: (authResult: any) => void) : void; + on(event: string, callback: (...args: any[]) => void) : void; } declare var Auth0Lock: Auth0LockStatic; diff --git a/autosize/autosize-tests.ts b/autosize/autosize-tests.ts new file mode 100644 index 0000000000..23686fbd88 --- /dev/null +++ b/autosize/autosize-tests.ts @@ -0,0 +1,10 @@ +/// + +// from a NodeList +autosize(document.querySelectorAll('textarea')); + +// from a single Node +autosize(document.querySelector('textarea')); + +// from a single element +autosize(document.getElementById('my-textarea')); diff --git a/autosize/autosize.d.ts b/autosize/autosize.d.ts new file mode 100644 index 0000000000..0a8a696c3d --- /dev/null +++ b/autosize/autosize.d.ts @@ -0,0 +1,17 @@ +// Type definitions for jquery.autosize 3.0.7 +// Project: http://www.jacklmoore.com/autosize/ +// Definitions by: Aaron T. King +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace autosize { + interface AutosizeStatic { + (el: Element): void; + (el: NodeList): void; + } +} + +declare var autosize: autosize.AutosizeStatic; + +declare module 'autosize' { + export = autosize; +} diff --git a/aws-sdk/aws-sdk.d.ts b/aws-sdk/aws-sdk.d.ts index f061353812..cadb392863 100644 --- a/aws-sdk/aws-sdk.d.ts +++ b/aws-sdk/aws-sdk.d.ts @@ -319,7 +319,8 @@ declare module "aws-sdk" { export class DynamoDB { constructor(options?: any); endpoint: Endpoint; - + createTable(params: any, next: (err: any, data: any) => void): void; + deleteTable(params: any, next: (err: any, data: any) => void): void; } // ========================================================== @@ -355,10 +356,10 @@ declare module "aws-sdk" { ConditionalOperator?: "AND" | "OR"; Expected?: { [someKey: string]: { - AttributeValueList: any[]; - ComparisonOperator: _DDBDC_ComparisonOperator; + AttributeValueList?: any[]; + ComparisonOperator?: _DDBDC_ComparisonOperator; Exists: boolean; - Value: any; + Value?: any; } } } diff --git a/backbone/backbone-global.d.ts b/backbone/backbone-global.d.ts index d86305ee3d..3dca269eb0 100644 --- a/backbone/backbone-global.d.ts +++ b/backbone/backbone-global.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Backbone 1.0.0 +// Type definitions for Backbone 1.3.3 // Project: http://backbonejs.org/ // Definitions by: Boris Yankov , Natan Vivo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -109,9 +109,15 @@ declare namespace Backbone { attributes: any; changed: any[]; + cidPrefix: string; cid: string; collection: Collection; + private _changing: boolean; + private _previousAttributes : any; + private _pending: boolean; + + /** * Default attributes for the model. It can be an object hash or a method returning an object hash. * For assigning an object hash, do it like this: this.defaults = { attribute: value, ... }; @@ -147,7 +153,14 @@ declare namespace Backbone { /*private*/ set(attributeName: string, value: any, options?: ModelSetOptions): Model; set(obj: any, options?: ModelSetOptions): Model; - changedAttributes(attributes?: any): any[]; + /** + * Return an object containing all the attributes that have changed, or + * false if there are no changed attributes. Useful for determining what + * parts of a view need to be updated and/or what attributes need to be + * persisted to the server. Unset attributes will be set to undefined. + * You can also pass an attributes object to diff against the model, + * determining if there *would be* a change. */ + changedAttributes(attributes?: any): any; clear(options?: Silenceable): any; clone(): Model; destroy(options?: ModelDestroyOptions): any; @@ -178,6 +191,7 @@ declare namespace Backbone { omit(fn: (value: any, key: any, object: any) => any): any; chain(): any; isEmpty(): boolean; + matches(attrs: any): boolean; } class Collection extends ModelBase { @@ -208,6 +222,7 @@ declare namespace Backbone { * Get a model from a collection, specified by an id, a cid, or by passing in a model. **/ get(id: number|string|Model): TModel; + has(key: number|string|Model): boolean; create(attributes: any, options?: ModelSaveOptions): TModel; pluck(attribute: string): any[]; push(model: TModel, options?: AddOptions): TModel; @@ -221,10 +236,12 @@ declare namespace Backbone { unshift(model: TModel, options?: AddOptions): TModel; where(properties: any): TModel[]; findWhere(properties: any): TModel; + modelId(attrs: any) : any private _prepareModel(attributes?: any, options?: any): any; private _removeReference(model: TModel): void; private _onModelEvent(event: string, model: TModel, collection: Collection, options: any): void; + private _isModel(obj: any) : obj is Model; /** * Return a shallow copy of this collection's models, using the same options as native Array#slice. @@ -314,6 +331,8 @@ declare namespace Backbone { navigate(fragment: string, options?: NavigateOptions): Router; navigate(fragment: string, trigger?: boolean): Router; + execute(callback: Function, args: any[], name: string) : void; + private _bindRoutes(): void; private _routeToRegExp(route: string): RegExp; private _extractParameters(route: RegExp, fragment: string): string[]; @@ -330,9 +349,14 @@ declare namespace Backbone { getHash(window?: Window): string; getFragment(fragment?: string): string; + decodeFragment(fragment: string): string; + getSearch(): string; stop(): void; route(route: string, callback: Function): number; checkUrl(e?: any): void; + getPath(): string; + matchRoot(): boolean; + atRoot(): boolean; loadUrl(fragmentOverride?: string): boolean; navigate(fragment: string, options?: any): boolean; static started: boolean; diff --git a/backbone/backbone.d.ts b/backbone/backbone.d.ts index 65e273a61f..d3887b4176 100644 --- a/backbone/backbone.d.ts +++ b/backbone/backbone.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Backbone 1.0.0 +// Type definitions for Backbone 1.3.3 // Project: http://backbonejs.org/ // Definitions by: Boris Yankov , Natan Vivo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped diff --git a/chai-dom/chai-dom.d.ts b/chai-dom/chai-dom.d.ts index 397bc17cb4..64cf97f516 100644 --- a/chai-dom/chai-dom.d.ts +++ b/chai-dom/chai-dom.d.ts @@ -24,6 +24,14 @@ declare namespace Chai { value(text: string): Assertion; } + + interface Include { + + text(text: string|string[]): Assertion; + + html(text: string|string[]): Assertion; + + } } diff --git a/diff/diff-tests.ts b/diff/diff-tests.ts index 46d367bf68..20d75b38ea 100644 --- a/diff/diff-tests.ts +++ b/diff/diff-tests.ts @@ -49,5 +49,44 @@ function printDiff(diff:jsdiff.IDiffResult[]) { console.log(addLineHeader(" ", part.value)); } }); +} -} \ No newline at end of file +function verifyPatchMethods(oldStr: string, newStr: string, uniDiff: jsdiff.IUniDiff) { + var verifyPatch = jsdiff.parsePatch( + jsdiff.createTwoFilesPatch("oldFile.ts", "newFile.ts", oldStr, newStr, + "old", "new", { context: 1 })); + if (JSON.stringify(verifyPatch) !== JSON.stringify(uniDiff)) { + console.error("Patch did not match uniDiff"); + } +} + +function verifyApplyMethods(oldStr: string, newStr: string, uniDiff: jsdiff.IUniDiff) { + var verifyApply = [ + jsdiff.applyPatch(oldStr, uniDiff), + jsdiff.applyPatch(oldStr, [uniDiff]) + ]; + jsdiff.applyPatches([uniDiff], { + loadFile: (index: number, callback: (err: Error, data: string) => void) => { + callback(undefined, one); + }, + patched: (index: number, content: string) => { + verifyApply.push(content); + }, + complete: (err?: Error) => { + if (err) { + console.error(err); + } + + verifyApply.forEach(result => { + if (result !== newStr) { + console.error("Result did not match newStr"); + } + }); + } + }); +} + +verifyPatchMethods(one, other, uniDiff); +var uniDiff = jsdiff.structuredPatch("oldFile.ts", "newFile.ts", one, other, + "old", "new", { context: 1 }); +verifyApplyMethods(one, other, uniDiff); diff --git a/diff/diff.d.ts b/diff/diff.d.ts index b1f947300b..fc4708c2a1 100644 --- a/diff/diff.d.ts +++ b/diff/diff.d.ts @@ -16,6 +16,22 @@ declare namespace JsDiff { componenets: IDiffResult[]; } + interface IHunk { + oldStart: number; + oldLines: number; + newStart: number; + newLines: number; + lines: string[]; + } + + interface IUniDiff { + oldFileName: string; + newFileName: string; + oldHeader: string; + newHeader: string; + hunks: IHunk[]; + } + class Diff { ignoreWhitespace:boolean; @@ -46,9 +62,21 @@ declare namespace JsDiff { function diffCss(oldStr:string, newStr:string):IDiffResult[]; - function createPatch(fileName:string, oldStr:string, newStr:string, oldHeader:string, newHeader:string):string; + function createPatch(fileName: string, oldStr: string, newStr: string, oldHeader: string, newHeader: string, options?: {context: number}): string; - function applyPatch(oldStr:string, uniDiff:string):string; + function createTwoFilesPatch(oldFileName: string, newFileName: string, oldStr: string, newStr: string, oldHeader: string, newHeader: string, options?: {context: number}): string; + + function structuredPatch(oldFileName: string, newFileName: string, oldStr: string, newStr: string, oldHeader: string, newHeader: string, options?: {context: number}): IUniDiff; + + function applyPatch(oldStr: string, uniDiff: string | IUniDiff | IUniDiff[]): string; + + function applyPatches(uniDiff: IUniDiff[], options: { + loadFile: (index: number, callback: (err: Error, data: string) => void) => void, + patched: (index: number, content: string) => void, + complete: (err?: Error) => void + }): void; + + function parsePatch(diffStr: string, options?: {strict: boolean}): IUniDiff[]; function convertChangesToXML(changes:IDiffResult[]):string; diff --git a/express-serve-static-core/express-serve-static-core.d.ts b/express-serve-static-core/express-serve-static-core.d.ts index e092d2ecef..de91c521cc 100644 --- a/express-serve-static-core/express-serve-static-core.d.ts +++ b/express-serve-static-core/express-serve-static-core.d.ts @@ -192,9 +192,10 @@ declare module "express-serve-static-core" { * req.accepts('html, json'); * // => "json" */ - accepts(type: string): string; - - accepts(type: string[]): string; + accepts(): string[]; + accepts(type: string): string | boolean; + accepts(type: string[]): string | boolean; + accepts(...type: string[]): string | boolean; /** * Returns the first accepted charset of the specified character sets, @@ -204,7 +205,10 @@ declare module "express-serve-static-core" { * For more information, or if you have issues or concerns, see accepts. * @param charset */ - acceptsCharsets(charset?: string | string[]): string[]; + acceptsCharsets(): string[]; + acceptsCharsets(charset: string): string | boolean; + acceptsCharsets(charset: string[]): string | boolean; + acceptsCharsets(...charset: string[]): string | boolean; /** * Returns the first accepted encoding of the specified encodings, @@ -214,7 +218,10 @@ declare module "express-serve-static-core" { * For more information, or if you have issues or concerns, see accepts. * @param encoding */ - acceptsEncodings(encoding?: string | string[]): string[]; + acceptsEncodings(): string[]; + acceptsEncodings(encoding: string): string | boolean; + acceptsEncodings(encoding: string[]): string | boolean; + acceptsEncodings(...encoding: string[]): string | boolean; /** * Returns the first accepted language of the specified languages, @@ -225,7 +232,10 @@ declare module "express-serve-static-core" { * * @param lang */ - acceptsLanguages(lang?: string | string[]): string[]; + acceptsLanguages(): string[]; + acceptsLanguages(lang: string): string | boolean; + acceptsLanguages(lang: string[]): string | boolean; + acceptsLanguages(...lang: string[]): string | boolean; /** * Parse Range header field, diff --git a/express/express-tests.ts b/express/express-tests.ts index 11f8fd44fd..ed9265b66a 100644 --- a/express/express-tests.ts +++ b/express/express-tests.ts @@ -50,6 +50,26 @@ router.delete(pathRE); router.use((req, res, next) => { next(); }) router.route('/users') .get((req, res, next) => { + let types: string[] = req.accepts(); + let type: string | boolean = req.accepts('json'); + type = req.accepts(['json', 'text']); + type = req.accepts('json', 'text'); + + let charsets: string[] = req.acceptsCharsets(); + let charset: string | boolean = req.acceptsCharsets('utf-8'); + charset = req.acceptsCharsets(['utf-8', 'utf-16']); + charset = req.acceptsCharsets('utf-8', 'utf-16'); + + let encodings: string[] = req.acceptsEncodings(); + let encoding: string | boolean = req.acceptsEncodings('gzip'); + encoding = req.acceptsEncodings(['gzip', 'deflate']); + encoding = req.acceptsEncodings('gzip', 'deflate'); + + let languages: string[] = req.acceptsLanguages(); + let language: string | boolean = req.acceptsLanguages('en'); + language = req.acceptsLanguages(['en', 'ja']); + language = req.acceptsLanguages('en', 'ja'); + res.send(req.query['token']); }); diff --git a/get-port/get-port-tests.ts b/get-port/get-port-tests.ts new file mode 100644 index 0000000000..d414742230 --- /dev/null +++ b/get-port/get-port-tests.ts @@ -0,0 +1,7 @@ +/// + +import * as getPort from "get-port"; + +getPort().then(port => { + console.log(port); +}); diff --git a/get-port/get-port.d.ts b/get-port/get-port.d.ts new file mode 100644 index 0000000000..673c547f1c --- /dev/null +++ b/get-port/get-port.d.ts @@ -0,0 +1,9 @@ +// Type definitions for ajv +// Project: https://github.com/sindresorhus/get-port +// Definitions by: York Yao +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare module "get-port" { + var getPort: () => PromiseLike + export = getPort; +} diff --git a/handlebars/handlebars.d.ts b/handlebars/handlebars.d.ts index 0af3d6f6e7..96b0491040 100644 --- a/handlebars/handlebars.d.ts +++ b/handlebars/handlebars.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Handlebars v3.0.3 +// Type definitions for Handlebars v4.0.5 // Project: http://handlebarsjs.com/ // Definitions by: Boris Yankov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -15,14 +15,25 @@ declare namespace Handlebars { export function Exception(message: string): void; export function log(level: number, obj: any): void; export function parse(input: string): hbs.AST.Program; - export function compile(input: any, options?: any): HandlebarsTemplateDelegate; + export function compile(input: any, options?: CompileOptions): HandlebarsTemplateDelegate; + export function precompile(input: any, options?: PrecompileOptions): TemplateSpecification; + export function template(precompilation: TemplateSpecification): HandlebarsTemplateDelegate; + + export function create(): typeof Handlebars; export var SafeString: typeof hbs.SafeString; + export var escapeExpression: typeof hbs.Utils.escapeExpression; export var Utils: typeof hbs.Utils; export var logger: Logger; export var templates: HandlebarsTemplates; export var helpers: any; + export function registerDecorator(name: string, fn: Function): void; + export function registerDecorator(obj: {[name: string] : Function}): void; + export function unregisterDecorator(name: string): void; + + export function noConflict(): typeof Handlebars; + export module AST { export var helpers: hbs.AST.helpers; } @@ -32,6 +43,9 @@ declare namespace Handlebars { Program(program: hbs.AST.Program): void; BlockStatement(block: hbs.AST.BlockStatement): void; PartialStatement(partial: hbs.AST.PartialStatement): void; + PartialBlockStatement(partial: hbs.AST.PartialBlockStatement): void; + DecoratorBlock(decorator: hbs.AST.DecoratorBlock): void; + Decorator(decorator: hbs.AST.Decorator): void; MustacheStatement(mustache: hbs.AST.MustacheStatement): void; ContentStatement(content: hbs.AST.ContentStatement): void; CommentStatement(comment?: hbs.AST.CommentStatement): void; @@ -52,6 +66,9 @@ declare namespace Handlebars { Program(program: hbs.AST.Program): void; BlockStatement(block: hbs.AST.BlockStatement): void; PartialStatement(partial: hbs.AST.PartialStatement): void; + PartialBlockStatement(partial: hbs.AST.PartialBlockStatement): void; + DecoratorBlock(decorator: hbs.AST.DecoratorBlock): void; + Decorator(decorator: hbs.AST.Decorator): void; MustacheStatement(mustache: hbs.AST.MustacheStatement): void; ContentStatement(content: hbs.AST.ContentStatement): void; CommentStatement(comment?: hbs.AST.CommentStatement): void; @@ -81,6 +98,37 @@ interface HandlebarsTemplates { [index: string]: HandlebarsTemplateDelegate; } +interface TemplateSpecification { + +} + +interface CompileOptions { + data?: boolean; + compat?: boolean; + knownHelpers?: { + helperMissing?: boolean; + blockHelperMissing?: boolean; + each?: boolean; + if?: boolean; + unless?: boolean; + with?: boolean; + log?: boolean; + lookup?: boolean; + } + knownHelpersOnly?: boolean; + noEscape?: boolean; + strict?: boolean; + assumeObjects?: boolean; + preventIndent?: boolean; + ignoreStandalone?: boolean; + explicitPartialContext?: boolean; +} + +interface PrecompileOptions extends CompileOptions { + srcName?: string; + destName?: string; +} + declare namespace hbs { class SafeString { constructor(str: string); @@ -89,6 +137,12 @@ declare namespace hbs { namespace Utils { function escapeExpression(str: string): string; + function createFrame(obj: Object): Object; + function isEmpty(obj: any) : boolean; + function extend(obj: any, ...source: any[]): any; + function toString(obj: any): string; + function isArray(obj: any): boolean; + function isFunction(obj: any): boolean; } } @@ -137,6 +191,8 @@ declare namespace hbs { strip: StripFlags; } + interface Decorator extends MustacheStatement { } + interface BlockStatement extends Statement { path: PathExpression; params: Expression[]; @@ -148,6 +204,8 @@ declare namespace hbs { closeStrip: StripFlags; } + interface DecoratorBlock extends BlockStatement { } + interface PartialStatement extends Statement { name: PathExpression | SubExpression; params: Expression[]; @@ -156,6 +214,15 @@ declare namespace hbs { strip: StripFlags; } + interface PartialBlockStatement extends Statement { + name: PathExpression | SubExpression; + params: Expression[], + hash: Hash, + program: Program, + openStrip: StripFlags, + closeStrip: StripFlags + } + interface ContentStatement extends Statement { value: string; original: StripFlags; diff --git a/hellosign-embedded/hellosign-embedded-tests.ts b/hellosign-embedded/hellosign-embedded-tests.ts new file mode 100644 index 0000000000..455171942e --- /dev/null +++ b/hellosign-embedded/hellosign-embedded-tests.ts @@ -0,0 +1,39 @@ +/// + +HelloSign.init('abc123'); + +// some options +HelloSign.open({ + url: 'http://example.org', + messageListener: (e: HelloSign.MessageEvent) => { + if (e.event === HelloSign.EVENT_SIGNED) { + console.log('signed'); + } + }, + uxVersion: 2 +}); + +// all options +HelloSign.open({ + url: 'http://example.org', + redirectUrl: 'https://github.com/DefinitelyTyped/DefinitelyTyped', + allowCancel: true, + messageListener: (e: HelloSign.MessageEvent) => { + if (e.event === HelloSign.EVENT_SIGNED) { + console.log('signed'); + } + }, + userCulture: HelloSign.CULTURES.EN_US, + debug: true, + skipDomainVerification: true, + container: document.getElementById('#hellosign-container'), + height: 1326, + hideHeader: true, + uxVersion: 2, + requester: 'hellosign@example.org', + whiteLabelingOptions: { + "page_background_color": "#f7f8f9" + } +}); + +HelloSign.close(); diff --git a/hellosign-embedded/hellosign-embedded.d.ts b/hellosign-embedded/hellosign-embedded.d.ts new file mode 100644 index 0000000000..f215dac6bc --- /dev/null +++ b/hellosign-embedded/hellosign-embedded.d.ts @@ -0,0 +1,193 @@ +// Type definitions for hellosign-embedded v1.0.3 +// Project: https://github.com/HelloFax/hellosign-embedded +// Definitions by: Brian Surowiec +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +declare module HelloSign { + interface MessageEvent { + event: string; + } + + interface ClientCultures { + /** + * English (United States) + * + * @default en_US + */ + EN_US: string; + + /** + * French (France) + * + * @default fr_FR + */ + FR_FR: string; + + /** + * German (Germany) + * + * @default de_DE + */ + DE_DE: string; + + /** + * Swedish (Sweden) + * + * @default sv_SE + */ + SV_SE: string; + + /** + * Chinese (China) + * + * @default zh_CN + */ + ZH_CN: string; + + /** + * Danish (Denmark) + * + * @default da_DK + */ + DA_DK: string; + + /** + * Dutch (The Netherlands) + * @default nl_NL + */ + NL_NL: string; + + /** + * The available client UI cultures + */ + supportedCultures: string[]; + } + + interface OpenParameters { + /** + * The url to open in the child frame + */ + url?: string; + + /** + * Where to go after the signature is completed + */ + redirectUrl?: string; + + /** + * Whether a cancel button should be displayed + * + * @default true + */ + allowCancel?: boolean; + + /** + * A listener for X-window messages coming from the child frame + */ + messageListener?: (eventData: MessageEvent) => void; + + /** + * One of the HelloSign.CULTURES.supportedCultures + * + * @default HelloSign.CULTURES.EN_US + */ + userCulture?: string; + + /** + * When true, debugging statements will be written to the console + * + * @default false + */ + debug?: boolean; + + /** + * When true, domain verification step will be skipped if and only if the Signature Request was created with test_mode=1 + * + * @default false + */ + skipDomainVerification?: boolean; + + /** + * DOM element that will contain the iframe on the page (defaults to document.body) + */ + container?: Element; + + /** + * Height of the iFrame (only applicable when a container is specified) + */ + height?: number; + + /** + * When true, the header will be hidden. + * This is only functional for customers with embedded branding enabled. + * + * @default false + */ + hideHeader?: boolean; + + /** + * The version of the embedded user experience to display to signers (1 = legacy, 2 = responsive). + * This option is only honored if your account has accessed the API prior to Nov 14, 2015. + */ + uxVersion?: number; + + /** + * The email of the person issuing a signature request. + * Required for allowing 'Me + Others' requests + */ + requester?: string; + + /** + * An associative array to be used to customize the app's signer page + */ + whiteLabelingOptions?: Object; + } + + interface HelloSignStatic { + /** + * The available client UI cultures + */ + CULTURES: ClientCultures; + + /** + * The signature request was signed + * + * @default signature_request_signed + */ + EVENT_SIGNED: string; + + /** + * The user closed the iFrame before completing + * + * @default signature_request_canceled + */ + EVENT_CANCELED: string; + + /** + * An error occurred in the iFrame + * + * @default error + */ + EVENT_ERROR: string; + + /** + * Initialize using your HelloSign API client ID. + * + * @param appClientId The API client ID the request is for. + */ + init(appClientId: string): void; + + /** + * Open the signing window. + * + * @param params The options to use when opening the signing window. + */ + open(params: OpenParameters): void; + + /** + * Close the signing window. + */ + close(): void; + } +} + +declare var HelloSign: HelloSign.HelloSignStatic; diff --git a/highcharts/highcharts.d.ts b/highcharts/highcharts.d.ts index 4ea165814f..7185587190 100644 --- a/highcharts/highcharts.d.ts +++ b/highcharts/highcharts.d.ts @@ -3183,6 +3183,14 @@ interface HighchartsPointEvents { * @since 1.2.0 */ update?: (event: Event) => boolean|void; + /** + * Fires when the legend item belonging to the pie point (slice) is clicked. + * The this keyword refers to the point itself. One parameter, event, is passed to the function. + * This contains common event information based on jQuery or MooTools depending on which library is used as the base for Highcharts. + * The default action is to toggle the visibility of the point. This can be prevented by calling event.preventDefault(). + */ + legendItemClick?: (event: Event) => boolean | void; + } interface HighchartsHalo { diff --git a/json-editor/json-editor-tests.ts b/json-editor/json-editor-tests.ts new file mode 100644 index 0000000000..0492324555 --- /dev/null +++ b/json-editor/json-editor-tests.ts @@ -0,0 +1,146 @@ +/// + +var element = document.getElementById('editor_holder'); +var editor = new JSONEditor(element, {}); + +// Set an option globally +JSONEditor.defaults.options.theme = 'bootstrap2'; +// Set an option during instantiation +editor = new JSONEditor(element, { + theme: 'bootstrap2' +}); +editor.on('ready', function () { + // Now the api methods will be available + editor.validate(); +}); + +var editor2 = new JSONEditor<{ name: string; }>(element, {}); +editor2.setValue({ name: "John Smith" }); +var value = editor2.getValue(); +console.log(value.name) // Will log "John Smith" + +// Get a reference to a node within the editor +var name2 = editor.getEditor('root.name'); + +// `getEditor` will return null if the path is invalid +if (name2) { + name2.setValue("John Smith"); + + console.log(name2.getValue()); +} + +var errors = editor.validate(); + +if (errors.length) { + // errors is an array of objects, each with a `path`, `property`, and `message` parameter + // `property` is the schema keyword that triggered the validation error (e.g. "minLength") + // `path` is a dot separated path into the JSON object (e.g. "root.path.to.field") + console.log(errors); +} +else { + // It's valid! +} + +// Validate an arbitrary value against the editor's schema +var errors = editor.validate({ + value: { + to: "test" + } +}); + +editor.on('change', function () { + // Do something +}); + +editor.off('change', function () { + // Do something +}); + +editor.watch('path.to.field', function () { + // Do something +}); + +editor.unwatch('path.to.field', function () { + // Do something +}); + +// Disable entire form +editor.disable(); + +// Disable part of the form +editor.getEditor('root.location').disable(); + +// Enable entire form +editor.enable(); + +// Enable part of the form +editor.getEditor('root.location').enable(); + +// Check if form is currently enabled +if (editor.isEnabled()) alert("It's editable!"); + +editor.destroy(); + +JSONEditor.defaults.options.theme = 'foundation5'; + +JSONEditor.plugins.sceditor.emoticonsEnabled = false; + +JSONEditor.plugins.epiceditor.basePath = 'epiceditor'; + +JSONEditor.plugins.ace.theme = 'twilight'; + +JSONEditor.defaults.editors.object.options.collapsed = true; + +JSONEditor.defaults.options.template = 'handlebars'; + +var myengine = { + compile: function (template: any) { + // Compile should return a render function + return function (vars: any) { + // A real template engine would render the template here + var result = template; + return result; + } + } +}; + +// Set globally +JSONEditor.defaults.options.template = myengine; + +// Override a specific translation +JSONEditor.defaults.languages.en.error_minLength = + "This better be at least {{0}} characters long or else!"; + + +// Create your own language mapping +// Any keys not defined here will fall back to the "en" language +JSONEditor.defaults.languages.es = { + error_notset: "propiedad debe existir" +}; + +JSONEditor.defaults.language = "es"; + +JSONEditor.defaults.resolvers.unshift(function (schema) { + if (schema.type === "object" && schema.format === "location") { + return "location"; + } + + // If no valid editor is returned, the next resolver function will be used +}); + +JSONEditor.plugins.selectize.enable = true; + +JSONEditor.defaults.custom_validators.push(function (schema, value, path) { + var errors: JSONEditorError[] = []; + if (schema.format === "date") { + if (!/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/.test(value)) { + // Errors must be an object with `path`, `property`, and `message` + errors.push({ + path: path, + property: 'format', + message: 'Dates must be in the format "YYYY-MM-DD"' + }); + } + } + return errors; +}); diff --git a/json-editor/json-editor.d.ts b/json-editor/json-editor.d.ts new file mode 100644 index 0000000000..cbb0c9c29c --- /dev/null +++ b/json-editor/json-editor.d.ts @@ -0,0 +1,184 @@ +// Type definitions for json-editor +// Project: https://github.com/jdorn/json-editor +// Definitions by: York Yao +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +type JSONEditorOptions = { + /** + * If true, JSON Editor will load external URLs in $ref via ajax. + */ + ajax?: boolean; + /** + * If true, remove all "add row" buttons from arrays. + */ + disable_array_add?: boolean; + /** + * If true, remove all "delete row" buttons from arrays. + */ + disable_array_delete?: boolean; + /** + * If true, remove all "move up" and "move down" buttons from arrays. + */ + disable_array_reorder?: boolean; + /** + * If true, remove all collapse buttons from objects and arrays. + */ + disable_collapse?: boolean; + /** + * If true, remove all Edit JSON buttons from objects. + */ + disable_edit_json?: boolean; + /** + * If true, remove all Edit Properties buttons from objects. + */ + disable_properties?: boolean; + /** + * The first part of the `name` attribute of form inputs in the editor. An full example name is `root[person][name]` where "root" is the form_name_root. + */ + form_name_root?: string; + /** + * The icon library to use for the editor. + */ + iconlib?: boolean; + /** + * If true, objects can only contain properties defined with the properties keyword. + */ + no_additional_properties?: boolean; + /** + * An object containing schema definitions for URLs. Allows you to pre-define external schemas. + */ + refs?: any; + /** + * If true, all schemas that don't explicitly set the required property will be required. + */ + required_by_default?: boolean; + /** + * If true, makes oneOf copy properties over when switching. + */ + keep_oneof_values?: boolean; + /** + * A valid JSON Schema to use for the editor. Version 3 and Version 4 of the draft specification are supported. + */ + schema?: any; + /** + * When to show validation errors in the UI. Valid values are interaction, change, always, and never. + */ + show_errors?: "interaction" | "change" | "always" | "never"; + /** + * Seed the editor with an initial value. This should be valid against the editor's schema. + */ + startval?: TValue; + /** + * The JS template engine to use. + */ + template?: string | { compile: (template: string) => (vars: any) => string }; + /** + * The CSS theme to use. + */ + theme?: string; + /** + * If true, only required properties will be included by default. + */ + display_required_only?: boolean; +} +type JSONEditorError = { + path: string; + property: string; + message: string; +} +type JSONEditorObjectOptions = { + /** + * If set to true, the editor will start collapsed + */ + collapsed?: boolean; + /** + * If set to true, the collapse button will be hidden + */ + disable_collapse?: boolean; + /** + * If set to true, the Edit JSON button will be hidden + */ + disable_edit_json?: boolean; + /** + * If set to true, the Edit Properties button will be hidden + */ + disable_properties?: boolean; +} +type JSONEditorArrayOptions = { + /** + * If set to true, the editor will start collapsed + */ + collapsed?: boolean; + /** + * If set to true, the "add row" button will be hidden + */ + disable_array_add?: boolean; + /** + * If set to true, all of the "delete" buttons will be hidden + */ + disable_array_delete?: boolean; + /** + * If set to true, just the "delete all rows" button will be hidden + */ + disable_array_delete_all_rows?: boolean; + /** + * If set to true, just the "delete last row" buttons will be hidden + */ + disable_array_delete_last_row?: boolean; + /** + * If set to true, the "move up/down" buttons will be hidden + */ + disable_array_reorder?: boolean; + /** + * If set to true, the collapse button will be hidden + */ + disable_collapse?: boolean; +} +declare class JSONEditor { + public static defaults: { + options: JSONEditorOptions; + editors: { + object: { + options: JSONEditorObjectOptions; + }; + array: { + options: JSONEditorArrayOptions; + } + }; + languages: any; + language: string; + resolvers: ((schema: any) => string)[]; + custom_validators: (((schema: any, value: string, path: string) => JSONEditorError[]))[]; + }; + public static plugins: { + sceditor: { + emoticonsEnabled: boolean; + }; + epiceditor: { + basePath: string; + }; + ace: { + theme: string; + }; + selectize: { + enable: boolean; + }; + }; + constructor(element: HTMLElement, options: JSONEditorOptions); + public on(event: string, fn: Function): JSONEditor; + public off(event: string, fn: Function): JSONEditor; + public watch(event: string, fn: Function): JSONEditor; + public unwatch(event: string, fn: Function): JSONEditor; + public validate(value?: TValue): JSONEditorError[]; + public setValue(value: TValue): void; + public getValue(): TValue; + public getEditor(name: string): JSONEditor; + public disable(): void; + public enable(): void; + public isEnabled(): boolean; + public destroy(): void; +} + +declare module "json-editor" { + export = JSONEditor; +} diff --git a/nodemailer-direct-transport/nodemailer-direct-transport.d.ts b/nodemailer-direct-transport/nodemailer-direct-transport.d.ts index ce5caed172..4fa8e9ad34 100644 --- a/nodemailer-direct-transport/nodemailer-direct-transport.d.ts +++ b/nodemailer-direct-transport/nodemailer-direct-transport.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module "nodemailer-direct-transport" { diff --git a/nodemailer-pickup-transport/nodemailer-pickup-transport.d.ts b/nodemailer-pickup-transport/nodemailer-pickup-transport.d.ts index 52aef3801d..35dfad9bc1 100644 --- a/nodemailer-pickup-transport/nodemailer-pickup-transport.d.ts +++ b/nodemailer-pickup-transport/nodemailer-pickup-transport.d.ts @@ -3,7 +3,7 @@ // Definitions by: Peter Snider // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module "nodemailer-pickup-transport" { diff --git a/nodemailer-ses-transport/nodemailer-ses-transport-tests.ts b/nodemailer-ses-transport/nodemailer-ses-transport-tests.ts new file mode 100644 index 0000000000..1cbd06929b --- /dev/null +++ b/nodemailer-ses-transport/nodemailer-ses-transport-tests.ts @@ -0,0 +1,26 @@ +/// +/// + +import * as AWS from 'aws-sdk'; +import * as sesTransport from 'nodemailer-ses-transport'; + +var opts: sesTransport.SesOptions = { + ses: new AWS.SES(), + rateLimit: 5, + maxConnections: 3, +}; + +var transport: nodemailer.Transport = sesTransport(opts); + +// setup e-mail data with unicode symbols +var mailOptions: nodemailer.SendMailOptions = { + from: 'Fred Foo ✔ ', // sender address + to: 'bar@blurdybloop.com, baz@blurdybloop.com', // list of receivers + subject: 'Hello ✔', // Subject line + text: 'Hello world ✔', // plaintext body + html: 'Hello world ✔' // html body +}; + +transport.send(mailOptions, (error: Error, info: nodemailer.SentMessageInfo): void => { + // nothing +}); diff --git a/nodemailer-ses-transport/nodemailer-ses-transport.d.ts b/nodemailer-ses-transport/nodemailer-ses-transport.d.ts new file mode 100644 index 0000000000..8ce3d88d69 --- /dev/null +++ b/nodemailer-ses-transport/nodemailer-ses-transport.d.ts @@ -0,0 +1,29 @@ +// Type definitions for nodemailer-ses-transport 1.4.0 +// Project: https://github.com/andris9/nodemailer-ses-transport +// Definitions by: Seth Westphal +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +/// + +declare module "nodemailer-ses-transport" { + + import * as AWS from 'aws-sdk'; + + namespace sesTransport { + export interface SesOptions { + ses?: AWS.SES; + accessKeyId?: string; + secretAccessKey?: string; + sessionToken?: string; + region?: string; + httpOptions?: AWS.HttpOptions; + rateLimit?: number; + maxConnections?: number; + } + } + + function sesTransport(options: sesTransport.SesOptions): nodemailer.Transport; + + export = sesTransport; +} diff --git a/nodemailer-smtp-pool/nodemailer-smtp-pool.d.ts b/nodemailer-smtp-pool/nodemailer-smtp-pool.d.ts index d815bab293..b636ef7df7 100644 --- a/nodemailer-smtp-pool/nodemailer-smtp-pool.d.ts +++ b/nodemailer-smtp-pool/nodemailer-smtp-pool.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// -/// +/// declare module "nodemailer-smtp-pool" { import tls = require("tls"); diff --git a/nodemailer-smtp-transport/nodemailer-smtp-transport.d.ts b/nodemailer-smtp-transport/nodemailer-smtp-transport.d.ts index 0beff75ee5..412dd269b0 100644 --- a/nodemailer-smtp-transport/nodemailer-smtp-transport.d.ts +++ b/nodemailer-smtp-transport/nodemailer-smtp-transport.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// -/// +/// declare module "nodemailer-smtp-transport" { diff --git a/nodemailer/nodemailer-tests.ts b/nodemailer/nodemailer-tests.ts index 46aae5448d..85c89ddea6 100644 --- a/nodemailer/nodemailer-tests.ts +++ b/nodemailer/nodemailer-tests.ts @@ -42,4 +42,22 @@ transporter.sendMail(mailOptions, (error: Error, info: nodemailer.SentMessageInf // promise send mail without callback transporter .sendMail(mailOptions) - .then(info => info.messageId) \ No newline at end of file + .then(info => info.messageId) + +// create template based sender function +var sendPwdReset = transporter.templateSender({ + subject: 'Password reset for {{username}}!', + text: 'Hello, {{username}}, Please go here to reset your password: {{ reset }}', + html: 'Hello, {{username}}, Please go here to reset your password: {{ reset }}

' +}, { + from: 'sender@example.com', +}); + +// use template based sender to send a message +sendPwdReset({ + to: 'receiver@example.com' +}, { + username: 'Node Mailer', + reset: 'https://www.example.com/reset?token=' +}) +.then(info => info.messageId); diff --git a/nodemailer/nodemailer-types.d.ts b/nodemailer/nodemailer-types.d.ts deleted file mode 100644 index 6fde6ebad9..0000000000 --- a/nodemailer/nodemailer-types.d.ts +++ /dev/null @@ -1,149 +0,0 @@ -// Type definitions for Nodemailer 1.3.2 -// Project: https://github.com/andris9/Nodemailer -// Definitions by: Rogier Schouten -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// - -declare namespace nodemailer { - - export interface AttachmentObject { - /** - * filename to be reported as the name of the attached file, use of unicode is allowed - */ - filename?: string; - /** - * optional content id for using inline images in HTML message source - */ - cid?: string; - /** - * Pathname or URL to use streaming - */ - path?: string; - /** - * String, Buffer or a Stream contents for the attachment - */ - content: string|Buffer|NodeJS.ReadableStream; - /** - * If set and content is string, then encodes the content to a Buffer using the specified encoding. Example values: base64, hex, 'binary' etc. Useful if you want to use binary attachments in a JSON formatted e-mail object. - */ - encoding?: string; - /** - * optional content type for the attachment, if not set will be derived from the filename property - */ - contentType?: string; - /** - * optional content disposition type for the attachment, defaults to 'attachment' - */ - contentDisposition?: string; - } - - export interface SendMailOptions { - /** - * The e-mail address of the sender. All e-mail addresses can be plain 'sender@server.com' or formatted 'Sender Name ', see here for details - */ - from?: string; - /** - * An e-mail address that will appear on the Sender: field - */ - sender?: string; - /** - * Comma separated list or an array of recipients e-mail addresses that will appear on the To: field - */ - to?: string|string[]; - /** - * Comma separated list or an array of recipients e-mail addresses that will appear on the Cc: field - */ - cc?: string|string[]; - /** - * Comma separated list or an array of recipients e-mail addresses that will appear on the Bcc: field - */ - bcc?: string|string[]; - /** - * An e-mail address that will appear on the Reply-To: field - */ - replyTo?: string; - /** - * The message-id this message is replying - */ - inReplyTo?: string; - /** - * Message-id list (an array or space separated string) - */ - references?: string|string[]; - /** - * The subject of the e-mail - */ - subject?: string; - /** - * The plaintext version of the message as an Unicode string, Buffer, Stream or an object {path: '...'} - */ - text?: string|Buffer|NodeJS.ReadableStream|AttachmentObject; - /** - * The HTML version of the message as an Unicode string, Buffer, Stream or an object {path: '...'} - */ - html?: string|Buffer|NodeJS.ReadableStream|AttachmentObject; - /** - * An object or array of additional header fields (e.g. {"X-Key-Name": "key value"} or [{key: "X-Key-Name", value: "val1"}, {key: "X-Key-Name", value: "val2"}]) - */ - headers?: any; - /** - * An array of attachment objects (see below for details) - */ - attachments?: AttachmentObject[]; - /** - * An array of alternative text contents (in addition to text and html parts) (see below for details) - */ - alternatives?: AttachmentObject[]; - /** - * optional Message-Id value, random value will be generated if not set - */ - messageId?: string; - /** - * optional Date value, current UTC string will be used if not set - */ - date?: Date; - /** - * optional transfer encoding for the textual parts (defaults to 'quoted-printable') - */ - encoding?: string; - } - - export interface SentMessageInfo { - /** - * most transports should return the final Message-Id value used with this property - */ - messageId: string; - /** - * includes the envelope object for the message - */ - envelope: any; - /** - * is an array returned by SMTP transports (includes recipient addresses that were accepted by the server) - */ - accepted: string[]; - /** - * is an array returned by SMTP transports (includes recipient addresses that were rejected by the server) - */ - rejected: string[]; - /** - * is an array returned by Direct SMTP transport. Includes recipient addresses that were temporarily rejected together with the server response - */ - pending?: string[]; - /** - * is a string returned by SMTP transports and includes the last SMTP response from the server - */ - response: string; - } - - /** - * This is what you implement to create a new transporter yourself - */ - export interface Transport { - name: string; - version: string; - send(mail: SendMailOptions, callback?: (error: Error, info: SentMessageInfo) => void): void; - close(): void; - } - -} diff --git a/nodemailer/nodemailer.d.ts b/nodemailer/nodemailer.d.ts index 647566437f..cd30f2acdc 100644 --- a/nodemailer/nodemailer.d.ts +++ b/nodemailer/nodemailer.d.ts @@ -3,8 +3,8 @@ // Definitions by: Rogier Schouten // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +/// /// -/// /// /// @@ -13,6 +13,8 @@ declare module "nodemailer" { import directTransport = require("nodemailer-direct-transport"); import smtpTransport = require("nodemailer-smtp-transport"); + import * as Promise from 'bluebird'; + export type Transport = nodemailer.Transport; export type SendMailOptions = nodemailer.SendMailOptions; export type SentMessageInfo = nodemailer.SentMessageInfo; @@ -39,6 +41,17 @@ declare module "nodemailer" { */ sendMail(mail: SendMailOptions): Promise; + /** + * Send mail using a template. + */ + templateSender(template?: any, defaults?: any): (mailData: any, context: any) => Promise; + + /** + * Send mail using a template with a callback. + */ + templateSender(template?: any, defaults?: any, callback?: (error: Error, info: SentMessageInfo) => void): void; + + /** * Attach a plugin. 'compile' and 'stream' plugins can be attached with use(plugin) method * @@ -48,14 +61,14 @@ declare module "nodemailer" { use(step: string, plugin: Plugin): void; /** - * Verifies connection with server - */ - verify(callback: (error: Error, success?: boolean) => void): void; - - /** - * Verifies connection with server - */ - verify(): Promise; + * Verifies connection with server + */ + verify(callback: (error: Error, success?: boolean) => void): void; + + /** + * Verifies connection with server + */ + verify(): Promise; /** * Close all connections @@ -76,3 +89,146 @@ declare module "nodemailer" { */ export function createTransport(transport: Transport, defaults?: Object): Transporter; } + +declare namespace nodemailer { + + export interface AttachmentObject { + /** + * filename to be reported as the name of the attached file, use of unicode is allowed + */ + filename?: string; + /** + * optional content id for using inline images in HTML message source + */ + cid?: string; + /** + * Pathname or URL to use streaming + */ + path?: string; + /** + * String, Buffer or a Stream contents for the attachment + */ + content: string|Buffer|NodeJS.ReadableStream; + /** + * If set and content is string, then encodes the content to a Buffer using the specified encoding. Example values: base64, hex, 'binary' etc. Useful if you want to use binary attachments in a JSON formatted e-mail object. + */ + encoding?: string; + /** + * optional content type for the attachment, if not set will be derived from the filename property + */ + contentType?: string; + /** + * optional content disposition type for the attachment, defaults to 'attachment' + */ + contentDisposition?: string; + } + + export interface SendMailOptions { + /** + * The e-mail address of the sender. All e-mail addresses can be plain 'sender@server.com' or formatted 'Sender Name ', see here for details + */ + from?: string; + /** + * An e-mail address that will appear on the Sender: field + */ + sender?: string; + /** + * Comma separated list or an array of recipients e-mail addresses that will appear on the To: field + */ + to?: string|string[]; + /** + * Comma separated list or an array of recipients e-mail addresses that will appear on the Cc: field + */ + cc?: string|string[]; + /** + * Comma separated list or an array of recipients e-mail addresses that will appear on the Bcc: field + */ + bcc?: string|string[]; + /** + * An e-mail address that will appear on the Reply-To: field + */ + replyTo?: string; + /** + * The message-id this message is replying + */ + inReplyTo?: string; + /** + * Message-id list (an array or space separated string) + */ + references?: string|string[]; + /** + * The subject of the e-mail + */ + subject?: string; + /** + * The plaintext version of the message as an Unicode string, Buffer, Stream or an object {path: '...'} + */ + text?: string|Buffer|NodeJS.ReadableStream|AttachmentObject; + /** + * The HTML version of the message as an Unicode string, Buffer, Stream or an object {path: '...'} + */ + html?: string|Buffer|NodeJS.ReadableStream|AttachmentObject; + /** + * An object or array of additional header fields (e.g. {"X-Key-Name": "key value"} or [{key: "X-Key-Name", value: "val1"}, {key: "X-Key-Name", value: "val2"}]) + */ + headers?: any; + /** + * An array of attachment objects (see below for details) + */ + attachments?: AttachmentObject[]; + /** + * An array of alternative text contents (in addition to text and html parts) (see below for details) + */ + alternatives?: AttachmentObject[]; + /** + * optional Message-Id value, random value will be generated if not set + */ + messageId?: string; + /** + * optional Date value, current UTC string will be used if not set + */ + date?: Date; + /** + * optional transfer encoding for the textual parts (defaults to 'quoted-printable') + */ + encoding?: string; + } + + export interface SentMessageInfo { + /** + * most transports should return the final Message-Id value used with this property + */ + messageId: string; + /** + * includes the envelope object for the message + */ + envelope: any; + /** + * is an array returned by SMTP transports (includes recipient addresses that were accepted by the server) + */ + accepted: string[]; + /** + * is an array returned by SMTP transports (includes recipient addresses that were rejected by the server) + */ + rejected: string[]; + /** + * is an array returned by Direct SMTP transport. Includes recipient addresses that were temporarily rejected together with the server response + */ + pending?: string[]; + /** + * is a string returned by SMTP transports and includes the last SMTP response from the server + */ + response: string; + } + + /** + * This is what you implement to create a new transporter yourself + */ + export interface Transport { + name: string; + version: string; + send(mail: SendMailOptions, callback?: (error: Error, info: SentMessageInfo) => void): void; + close(): void; + } + +} diff --git a/page/page.d.ts b/page/page.d.ts index dd76823ecf..682322f3fa 100644 --- a/page/page.d.ts +++ b/page/page.d.ts @@ -86,6 +86,11 @@ declare namespace PageJS { * */ redirect(page: string): void; + /** + * Replace `path` with optional `state` object. + * + */ + replace(path: string, state?: any, init?: boolean, dispatch?: boolean): Context; /** * Navigate to the given path. * diff --git a/pikaday/pikaday.d.ts b/pikaday/pikaday.d.ts index 3e4f80df9a..913ea69613 100644 --- a/pikaday/pikaday.d.ts +++ b/pikaday/pikaday.d.ts @@ -10,6 +10,14 @@ declare class Pikaday { constructor(options: Pikaday.PikadayOptions); + /** + * Extends the existing configuration options for Pikaday object with the options provided. + * Can be used to change/extend the configurations on runtime. + * @param options full/partial configuration options. + * @returns {} extended configurations. + */ + config(options: Pikaday.PikadayOptions): Pikaday.PikadayOptions; + /** * Returns the selected date in a string format. If Moment.js exists * (recommended) then Pikaday can return any format that Moment diff --git a/react-bootstrap/react-bootstrap-tests.tsx b/react-bootstrap/react-bootstrap-tests.tsx index c6976d8a05..e8646d79ea 100644 --- a/react-bootstrap/react-bootstrap-tests.tsx +++ b/react-bootstrap/react-bootstrap-tests.tsx @@ -14,7 +14,7 @@ import { OverlayTrigger, Popover, ProgressBar, Nav, NavItem, Navbar, NavDropdown, Tabs, Tab, Pager, PageItem, - Pagination, Alert, Carousel, + Pagination, Alert, Carousel, SafeAnchor, Grid, Row, Col, Thumbnail, Image, Label, Badge, Jumbotron, PageHeader, Glyphicon, Table, Form, FormGroup, @@ -634,6 +634,14 @@ export class ReactBootstrapTest extends Component { +
+ + + } + maxButtons={10}/> +
+
Holy guacamole! Best check yo self, you're not looking too good. diff --git a/react-bootstrap/react-bootstrap.d.ts b/react-bootstrap/react-bootstrap.d.ts index 8c9d50a304..c39efed388 100644 --- a/react-bootstrap/react-bootstrap.d.ts +++ b/react-bootstrap/react-bootstrap.d.ts @@ -110,6 +110,18 @@ declare namespace ReactBootstrap { var ButtonGroup: React.ClassicComponentClass; + // + interface SafeAnchorProps extends React.HTMLProps { + href?: string; + onClick?: React.MouseEventHandler; + disabled?: boolean; + role?: string; + componentClass?: React.ReactType; + } + type SafeAnchor = React.ClassicComponent; + const SafeAnchor: React.ClassicComponentClass; + + // interface CheckboxProps extends React.HTMLProps { bsClass?: string; diff --git a/react-swipeable/react-swipeable-tests.tsx b/react-swipeable/react-swipeable-tests.tsx index dec0414759..d28d6d348b 100644 --- a/react-swipeable/react-swipeable-tests.tsx +++ b/react-swipeable/react-swipeable-tests.tsx @@ -3,7 +3,7 @@ import Swipeable = require('react-swipeable'); import React = require('react'); - + var SampleComponent = React.createClass({ render: function () { return ( @@ -18,7 +18,8 @@ var SampleComponent = React.createClass({ onSwipedDown={this.swipedDown} onSwipedLeft={this.swipedLeft} onSwiped={this.handleSwipeAction} - preventDefaultTouchmoveEvent={false}> + preventDefaultTouchmoveEvent={false} + nodeName={"swipe"}>
This element can be swiped
diff --git a/react-swipeable/react-swipeable.d.ts b/react-swipeable/react-swipeable.d.ts index 1e147a222f..db0d7b5e4f 100644 --- a/react-swipeable/react-swipeable.d.ts +++ b/react-swipeable/react-swipeable.d.ts @@ -39,6 +39,7 @@ declare namespace ReactSwipeableModule { flickThreshold?: number; delta?: number; preventDefaultTouchmoveEvent?: boolean; + nodeName?: string; } interface ReactSwipeable extends React.ComponentClass { } diff --git a/seneca/seneca-tests.ts b/seneca/seneca-tests.ts index 9bc411525f..f61279c749 100644 --- a/seneca/seneca-tests.ts +++ b/seneca/seneca-tests.ts @@ -5,8 +5,8 @@ * This file contains all of the example code that was on http://senecajs.org as of Mon June 16, 2016. */ -import SENECA = require('seneca') -var seneca = SENECA() +import * as SENECA from 'seneca' +var seneca: SENECA.Instance = SENECA() seneca.add({ cmd: 'salestax' }, function (args, callback) { var rate = 0.23 diff --git a/seneca/seneca.d.ts b/seneca/seneca.d.ts index 08fd71859d..7db8f83b6c 100644 --- a/seneca/seneca.d.ts +++ b/seneca/seneca.d.ts @@ -6,18 +6,13 @@ declare module "seneca" { - type UnknownType = any; + function SNS(options?: SNS.Options): SNS.Instance; + namespace SNS { - // function s(options?: Options): Seneca; + type UnknownType = any; - // what does seneca do about logging? - function log(): void; - - - // module s { - interface Options { [plugin_name: string]: any; tag?: string; @@ -125,8 +120,8 @@ declare module "seneca" { } interface Optioner { - set: (input: string | Options) => Options; - get: () => Options; + set: (input: string | Options) => Options; + get: () => Options; } type ExecutorWorker = (callback: any) => void; @@ -171,10 +166,11 @@ declare module "seneca" { type EntityListCallback = (error: Error, result: any[]) => void; - interface Seneca { + + + interface Instance { version: string; - (options?: Options): Seneca; options(options: Options): void; error(handler: GlobalErrorHandler): void; @@ -196,7 +192,7 @@ declare module "seneca" { make(zone: string, base: string, entity_canon: string, properties?: any): Entity; // @param name reference to plugin provided object - export(name: string): void; + export(name: string): PluginModule; pin(pattern: Pattern): void; } @@ -222,10 +218,9 @@ declare module "seneca" { remove$(id: DatabaseID | EntityDataWithQuery, callback: EntityRemoveCallback): void; list$(query: EntityDataWithQuery, callback: EntityListCallback): void; } + + } - // } - - var sen: Seneca - export = sen; - + export = SNS; } + diff --git a/ui-grid/ui-grid-tests.ts b/ui-grid/ui-grid-tests.ts index 7d91d94748..5a088337cd 100644 --- a/ui-grid/ui-grid-tests.ts +++ b/ui-grid/ui-grid-tests.ts @@ -33,13 +33,14 @@ columnDef.filter = { condition: 2, term: 'yes', placeholder: 'testing', + ariaLabel: 'testing', noTerm: false, flags: { caseSensitive: true }, type: 1, selectOptions: [{value: 4, label: 'test'}], - disableCancelButton: false + disableCancelFilterButton: false }; columnDef.filter.condition = (searchTerm: string, cellValue: any, row: uiGrid.IGridRow, column: uiGrid.IGridColumn): boolean => { return true; diff --git a/ui-grid/ui-grid.d.ts b/ui-grid/ui-grid.d.ts index a598bc9846..1ce953885f 100644 --- a/ui-grid/ui-grid.d.ts +++ b/ui-grid/ui-grid.d.ts @@ -3871,6 +3871,10 @@ declare namespace uiGrid { term?: string; /** String that will be set to the .placeholder attribute */ placeholder?: string; + /** + * String that will be set to the .ariaLabel attribute. This is what is read as a label to screen reader users. + */ + ariaLabel?: string; /** * set this to true if you have defined a custom function in condition, * and your custom function doesn't require a term @@ -3895,7 +3899,7 @@ declare namespace uiGrid { * If set to true then the 'x' button that cancels/clears the filter will not be shown. * @default false */ - disableCancelButton?: boolean; + disableCancelFilterButton?: boolean; } export interface ISelectOption { value: number | string; diff --git a/videojs/videojs.d.ts b/videojs/videojs.d.ts index d0da6b10db..7fb5005092 100644 --- a/videojs/videojs.d.ts +++ b/videojs/videojs.d.ts @@ -48,6 +48,9 @@ interface VideoJSPlayer { on(eventName: string, callback: () => void ): void; off(eventName: string, callback: () => void ): void; dispose(): void; + addRemoteTextTrack(options : {}) : HTMLTrackElement; + removeRemoteTextTrack(track : HTMLTrackElement) : void; + poster(val?: string) : string|VideoJSPlayer; } interface VideoJSStatic {