diff --git a/templates/Angular2Spa/package.json b/templates/Angular2Spa/package.json index 01f30f01..deddf658 100644 --- a/templates/Angular2Spa/package.json +++ b/templates/Angular2Spa/package.json @@ -2,21 +2,21 @@ "name": "Angular2Spa", "version": "0.0.0", "dependencies": { - "@angular/common": "2.0.0", - "@angular/compiler": "2.0.0", - "@angular/core": "2.0.0", - "@angular/forms": "2.0.0", - "@angular/http": "2.0.0", - "@angular/platform-browser": "2.0.0", - "@angular/platform-browser-dynamic": "2.0.0", - "@angular/platform-server": "2.0.0", - "@angular/router": "3.0.0", - "@types/node": "^6.0.38", - "angular2-platform-node": "~2.0.10", - "angular2-universal": "~2.0.10", - "angular2-universal-polyfills": "~2.0.10", - "aspnet-prerendering": "^1.0.6", - "aspnet-webpack": "^1.0.11", + "@angular/common": "2.0.2", + "@angular/compiler": "2.0.2", + "@angular/core": "2.0.2", + "@angular/forms": "2.0.2", + "@angular/http": "2.0.2", + "@angular/platform-browser": "2.0.2", + "@angular/platform-browser-dynamic": "2.0.2", + "@angular/platform-server": "2.0.2", + "@angular/router": "3.0.2", + "@types/node": "^6.0.42", + "angular2-platform-node": "~2.0.11", + "angular2-universal": "~2.0.11", + "angular2-universal-polyfills": "~2.0.11", + "aspnet-prerendering": "^1.0.7", + "aspnet-webpack": "^1.0.17", "bootstrap": "^3.3.7", "css": "^2.2.1", "css-loader": "^0.25.0", @@ -30,15 +30,15 @@ "preboot": "^4.5.2", "raw-loader": "^0.5.1", "rxjs": "5.0.0-beta.12", - "style-loader": "^0.13.0", + "style-loader": "^0.13.1", "to-string-loader": "^1.1.5", "ts-loader": "^0.8.2", - "typescript": "^2.0.0", + "typescript": "^2.0.3", "url-loader": "^0.5.7", - "webpack": "^1.12.14", + "webpack": "^1.13.2", + "webpack-hot-middleware": "^2.12.2", "webpack-node-externals": "^1.4.3", - "webpack-hot-middleware": "^2.10.0", "webpack-merge": "^0.14.1", - "zone.js": "^0.6.21" + "zone.js": "^0.6.25" } } diff --git a/templates/KnockoutSpa/ClientApp/boot.ts b/templates/KnockoutSpa/ClientApp/boot.ts index a3932f87..8a54c0d7 100644 --- a/templates/KnockoutSpa/ClientApp/boot.ts +++ b/templates/KnockoutSpa/ClientApp/boot.ts @@ -1,8 +1,8 @@ import './css/site.css'; import * as ko from 'knockout'; -import { createHistory } from 'history'; import './webpack-component-loader'; import AppRootComponent from './components/app-root/app-root'; +const createHistory = require('history').createBrowserHistory // Load and register the component ko.components.register('app-root', AppRootComponent); diff --git a/templates/KnockoutSpa/ClientApp/components/app-root/app-root.ts b/templates/KnockoutSpa/ClientApp/components/app-root/app-root.ts index 7583faff..1a24a0b8 100644 --- a/templates/KnockoutSpa/ClientApp/components/app-root/app-root.ts +++ b/templates/KnockoutSpa/ClientApp/components/app-root/app-root.ts @@ -13,7 +13,7 @@ class AppRootViewModel { public route: KnockoutObservable; private _router: Router; - constructor(params: { history: HistoryModule.History }) { + constructor(params: { history: History.History }) { // Activate the client-side router this._router = new Router(params.history, routes) this.route = this._router.currentRoute; @@ -40,4 +40,4 @@ class AppRootViewModel { } } -export default { viewModel: AppRootViewModel, template: require('./app-root.html') }; +export default { viewModel: AppRootViewModel, template: require('./app-root.html') }; \ No newline at end of file diff --git a/templates/KnockoutSpa/ClientApp/router.ts b/templates/KnockoutSpa/ClientApp/router.ts index 4550d16e..181613c7 100644 --- a/templates/KnockoutSpa/ClientApp/router.ts +++ b/templates/KnockoutSpa/ClientApp/router.ts @@ -15,7 +15,7 @@ export class Router { private disposeHistory: () => void; private clickEventListener: EventListener; - constructor(history: HistoryModule.History, routes: Route[]) { + constructor(history: History.History, routes: Route[]) { // Reset and configure Crossroads so it matches routes and updates this.currentRoute crossroads.removeAllRoutes(); crossroads.resetState(); diff --git a/templates/KnockoutSpa/package.json b/templates/KnockoutSpa/package.json index fb661bb3..edca0e49 100644 --- a/templates/KnockoutSpa/package.json +++ b/templates/KnockoutSpa/package.json @@ -2,24 +2,33 @@ "name": "WebApplicationBasic", "version": "0.0.0", "devDependencies": { - "aspnet-webpack": "^1.0.6", + "@types/core-js": "^0.9.34", + "@types/crossroads": "0.0.29", + "@types/history": "^2.0.38", + "@types/jquery": "^2.0.32", + "@types/knockout": "^3.4.35", + "@types/react-router": "^2.0.37", + "@types/requirejs": "^2.1.26", + "@types/signals": "0.0.16", + "@types/whatwg-fetch": "0.0.30", + "aspnet-webpack": "^1.0.17", "bootstrap": "^3.3.6", "bundle-loader": "^0.5.4", "crossroads": "^0.12.2", - "css-loader": "^0.23.1", + "css-loader": "^0.25.0", "event-source-polyfill": "^0.0.7", "extract-text-webpack-plugin": "^1.0.1", - "file-loader": "^0.8.5", - "history": "^2.0.1", + "file-loader": "^0.9.0", + "history": "^4.3.0", "isomorphic-fetch": "^2.2.1", "jquery": "^2.2.1", "knockout": "^3.4.0", "raw-loader": "^0.5.1", - "style-loader": "^0.13.0", - "ts-loader": "^0.8.1", - "typescript": "^1.8.2", + "style-loader": "^0.13.1", + "ts-loader": "^0.8.2", + "typescript": "^2.0.3", "url-loader": "^0.5.7", - "webpack": "^1.12.14", - "webpack-hot-middleware": "^2.10.0" + "webpack": "^1.13.2", + "webpack-hot-middleware": "^2.12.2" } } diff --git a/templates/KnockoutSpa/tsconfig.json b/templates/KnockoutSpa/tsconfig.json index 1404455b..b9615f9d 100644 --- a/templates/KnockoutSpa/tsconfig.json +++ b/templates/KnockoutSpa/tsconfig.json @@ -3,8 +3,12 @@ "moduleResolution": "node", "target": "es5", "sourceMap": true, - "skipDefaultLibCheck": true + "skipDefaultLibCheck": true, + "types": ["core-js", "crossroads", "history", "knockout", + "requirejs", "signals", "whatwg-fetch" ] }, + "compileOnSave": false, + "buildOnSave": false, "exclude": [ "bin", "node_modules" diff --git a/templates/KnockoutSpa/tsd.json b/templates/KnockoutSpa/tsd.json deleted file mode 100644 index aed3b2a9..00000000 --- a/templates/KnockoutSpa/tsd.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "version": "v4", - "repo": "borisyankov/DefinitelyTyped", - "ref": "master", - "path": "typings", - "bundle": "typings/tsd.d.ts", - "installed": { - "knockout/knockout.d.ts": { - "commit": "9f0f926a12026287b5a4a229e5672c01e7549313" - }, - "requirejs/require.d.ts": { - "commit": "9f0f926a12026287b5a4a229e5672c01e7549313" - }, - "es6-promise/es6-promise.d.ts": { - "commit": "9f0f926a12026287b5a4a229e5672c01e7549313" - }, - "history/history.d.ts": { - "commit": "9f0f926a12026287b5a4a229e5672c01e7549313" - }, - "react-router/history.d.ts": { - "commit": "9f0f926a12026287b5a4a229e5672c01e7549313" - }, - "crossroads/crossroads.d.ts": { - "commit": "9f0f926a12026287b5a4a229e5672c01e7549313" - }, - "js-signals/js-signals.d.ts": { - "commit": "9f0f926a12026287b5a4a229e5672c01e7549313" - }, - "isomorphic-fetch/isomorphic-fetch.d.ts": { - "commit": "57ec5fbb76060329c10959d449eb1d4e70b15a65" - }, - "jquery/jquery.d.ts": { - "commit": "f470e7569e7046c62866f57bc4fea56ba79975d5" - } - } -} diff --git a/templates/KnockoutSpa/types/history.d.ts b/templates/KnockoutSpa/types/history.d.ts new file mode 100644 index 00000000..11bd2849 --- /dev/null +++ b/templates/KnockoutSpa/types/history.d.ts @@ -0,0 +1,233 @@ +// // Type definitions for history v2.0.0 +// // Project: https://github.com/rackt/history +// // Definitions by: Sergey Buturlakin , Nathan Brown +// // Definitions: https://github.com/borisyankov/DefinitelyTyped + + +// declare namespace HistoryModule { + +// // types based on https://github.com/rackt/history/blob/master/docs/Terms.md + +// type Action = string + +// type BeforeUnloadHook = () => string | boolean + +// type CreateHistory = (options?: HistoryOptions) => T + +// type CreateHistoryEnhancer = (createHistory: CreateHistory) => CreateHistory + +// interface History { +// listenBefore(hook: TransitionHook): () => void +// listen(listener: LocationListener): () => void +// transitionTo(location: Location): void +// push(path: LocationDescriptor): void +// replace(path: LocationDescriptor): void +// go(n: number): void +// goBack(): void +// goForward(): void +// createKey(): LocationKey +// createPath(path: LocationDescriptor): Path +// createHref(path: LocationDescriptor): Href +// createLocation(path?: LocationDescriptor, action?: Action, key?: LocationKey): Location + +// /** @deprecated use a location descriptor instead */ +// createLocation(path?: Path, state?: LocationState, action?: Action, key?: LocationKey): Location +// /** @deprecated use location.key to save state instead */ +// pushState(state: LocationState, path: Path): void +// /** @deprecated use location.key to save state instead */ +// replaceState(state: LocationState, path: Path): void +// /** @deprecated use location.key to save state instead */ +// setState(state: LocationState): void +// /** @deprecated use listenBefore instead */ +// registerTransitionHook(hook: TransitionHook): void +// /** @deprecated use the callback returned from listenBefore instead */ +// unregisterTransitionHook(hook: TransitionHook): void +// } + +// type HistoryOptions = { +// getCurrentLocation?: () => Location +// finishTransition?: (nextLocation: Location) => boolean +// saveState?: (key: LocationKey, state: LocationState) => void +// go?: (n: number) => void +// getUserConfirmation?: (message: string, callback: (result: boolean) => void) => void +// keyLength?: number +// queryKey?: string | boolean +// stringifyQuery?: (obj: any) => string +// parseQueryString?: (str: string) => any +// basename?: string +// entries?: string | [any] +// current?: number +// } + +// type Href = string + +// type Location = { +// pathname: Pathname +// search: Search +// query: Query +// state: LocationState +// action: Action +// key: LocationKey +// basename?: string +// } + +// type LocationDescriptorObject = { +// pathname?: Pathname +// search?: Search +// query?: Query +// state?: LocationState +// } + +// type LocationDescriptor = LocationDescriptorObject | Path + +// type LocationKey = string + +// type LocationListener = (location: Location) => void + +// type LocationState = Object + +// type Path = string // Pathname + QueryString + +// type Pathname = string + +// type Query = Object + +// type QueryString = string + +// type Search = string + +// type TransitionHook = (location: Location, callback: (result: any) => void) => any + + +// interface HistoryBeforeUnload { +// listenBeforeUnload(hook: BeforeUnloadHook): () => void +// } + +// interface HistoryQueries { +// pushState(state: LocationState, pathname: Pathname | Path, query?: Query): void +// replaceState(state: LocationState, pathname: Pathname | Path, query?: Query): void +// createPath(path: Path, query?: Query): Path +// createHref(path: Path, query?: Query): Href +// } + + +// // Global usage, without modules, needs the small trick, because lib.d.ts +// // already has `history` and `History` global definitions: +// // var createHistory = ((window as any).History as HistoryModule.Module).createHistory; +// interface Module { +// createHistory: CreateHistory +// createHashHistory: CreateHistory +// createMemoryHistory: CreateHistory +// createLocation(path?: Path, state?: LocationState, action?: Action, key?: LocationKey): Location +// useBasename(createHistory: CreateHistory): CreateHistory +// useBeforeUnload(createHistory: CreateHistory): CreateHistory +// useQueries(createHistory: CreateHistory): CreateHistory +// actions: { +// PUSH: string +// REPLACE: string +// POP: string +// } +// } + +// } + + +// declare module "history/lib/createBrowserHistory" { + +// export default function createBrowserHistory(options?: HistoryModule.HistoryOptions): HistoryModule.History + +// } + + +// declare module "history/lib/createHashHistory" { + +// export default function createHashHistory(options?: HistoryModule.HistoryOptions): HistoryModule.History + +// } + + +// declare module "history/lib/createMemoryHistory" { + +// export default function createMemoryHistory(options?: HistoryModule.HistoryOptions): HistoryModule.History + +// } + + +// declare module "history/lib/createLocation" { + +// export default function createLocation(path?: HistoryModule.Path, state?: HistoryModule.LocationState, action?: HistoryModule.Action, key?: HistoryModule.LocationKey): HistoryModule.Location + +// } + + +// declare module "history/lib/useBasename" { + +// export default function useBasename(createHistory: HistoryModule.CreateHistory): HistoryModule.CreateHistory + +// } + + +// declare module "history/lib/useBeforeUnload" { + +// export default function useBeforeUnload(createHistory: HistoryModule.CreateHistory): HistoryModule.CreateHistory + +// } + + +// declare module "history/lib/useQueries" { + +// export default function useQueries(createHistory: HistoryModule.CreateHistory): HistoryModule.CreateHistory + +// } + + +// declare module "history/lib/actions" { + +// export const PUSH: string + +// export const REPLACE: string + +// export const POP: string + +// export default { +// PUSH, +// REPLACE, +// POP +// } + +// } + +// declare module "history/lib/DOMUtils" { +// export function addEventListener(node: EventTarget, event: string, listener: EventListenerOrEventListenerObject): void; +// export function removeEventListener(node: EventTarget, event: string, listener: EventListenerOrEventListenerObject): void; +// export function getHashPath(): string; +// export function replaceHashPath(path: string): void; +// export function getWindowPath(): string; +// export function go(n: number): void; +// export function getUserConfirmation(message: string, callback: (result: boolean) => void): void; +// export function supportsHistory(): boolean; +// export function supportsGoWithoutReloadUsingHash(): boolean; +// } + + +// declare module "history" { + +// export { default as createHistory } from "history/lib/createBrowserHistory" + +// export { default as createHashHistory } from "history/lib/createHashHistory" + +// export { default as createMemoryHistory } from "history/lib/createMemoryHistory" + +// export { default as createLocation } from "history/lib/createLocation" + +// export { default as useBasename } from "history/lib/useBasename" + +// export { default as useBeforeUnload } from "history/lib/useBeforeUnload" + +// export { default as useQueries } from "history/lib/useQueries" + +// import * as Actions from "history/lib/actions" + +// export { Actions } + +// } \ No newline at end of file diff --git a/templates/KnockoutSpa/typings/crossroads/crossroads.d.ts b/templates/KnockoutSpa/typings/crossroads/crossroads.d.ts deleted file mode 100644 index 84f69ea4..00000000 --- a/templates/KnockoutSpa/typings/crossroads/crossroads.d.ts +++ /dev/null @@ -1,159 +0,0 @@ -// Type definitions for Crossroads.js -// Project: http://millermedeiros.github.io/crossroads.js/ -// Definitions by: Diullei Gomes -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// - -declare module CrossroadsJs { - - export interface Route { - matched: Signal; - - /** - * Signal dispatched every time a request "leaves" the route. - */ - switched: Signal; - - /** - * Object used to configure parameters/segments validation rules. - */ - rules: any; - - /** - * If crossroads should try to match this Route even after matching another Route. - */ - greedy: boolean; - - /** - * Remove route from crossroads and destroy it, releasing memory. - */ - dispose(): void; - - /** - * Test if Route matches against request. Return true if request validate against route rules and pattern. - */ - match(request: any): boolean; - - /** - * Return a string that matches the route replacing the capturing groups with the values provided in the replacements object. - */ - interpolate(replacements: any): string; - - /** - * Add a listener to the signal. - * - * @param listener Signal handler function. - * @param listenercontext Context on which listener will be executed (object that should represent the `this` variable inside listener function). - * @param priority The priority level of the event listener. Listeners with higher priority will be executed before listeners with lower priority. Listeners with same priority level will be executed at the same order as they were added. (default = 0) - */ - add(listener: Function, listenerContext?: any, priority?: Number): SignalBinding; - } - - export interface CrossRoadsStatic { - - NORM_AS_ARRAY: Function; - - NORM_AS_OBJECT: Function; - - /** - * Creates a new route pattern listener and add it to crossroads routes collection. - * - * @param pattern String pattern or Regular Expression that should be used to match against requests. - * @param handler Function that should be executed when a request matches the Route pattern. - * @param priority Route execution priority. - */ - addRoute(pattern: any, handler?: Function, priority?: number): Route; - - /** - * Remove a single route from crossroads collection. - * - * @param route Reference to the Route object returned by crossroads.addRoute(). - */ - removeRoute(route: Route): void; - - /** - * Remove all routes from crossroads collection. - */ - removeAllRoutes(): void; - - /** - * Parse a string input and dispatch matched Signal of the first Route that matches the request. - * - * @param request String that should be evaluated and matched against Routes to define which Route handlers should be executed and which parameters should be passed to the handlers. - * @param defaultargs Array containing values passed to matched/routed/bypassed signals as first arguments. Useful for node.js in case you need to access the request and response objects. - */ - parse(request: string, ...defaultArgs: any[]): void; - - /** - * Get number of Routes contained on the crossroads collection. - */ - getNumRoutes(): number; - - /** - * Signal dispatched every time that crossroads.parse can't find a Route that matches the request. Useful for debuging and error handling. - */ - bypassed: Signal; - - /** - * Signal dispatched every time that crossroads.parse find a Route that matches the request. Useful for debuging and for executing tasks that should happen at each routing. - */ - routed: Signal; - - /** - * Create a new independent Router instance. - */ - create(): CrossRoadsStatic; - - /** - * Sets a default function that should be used to normalize parameters before passing them to the Route.matched, works similarly to Route.rules.normalize_. - */ - normalizeFn: Function; - - /** - * Set if crossroads should typecast route paths. Default value is false (IMPORTANT: on v0.5.0 it was true by default). - */ - shouldTypecast: boolean; - - /** - * String representation of the crossroads version number (e.g. "0.6.0"). - */ - VERSION: string; - - /** - * Sets global route matching behavior to greedy so crossroads will try to match every single route with the supplied request (if true it won't stop at first match). - */ - greedy: boolean; - - /** - * Sets if the greedy routes feature is enabled. If false it won't try to match multiple routes (faster). - */ - greedyEnabled: boolean; - - /** - * Resets the Router internal state. Will clear reference to previously matched routes (so they won't dispatch switched signal when matching a new route) and reset last request. - */ - resetState(): void; - - /** - * Sets if Router should care about previous state, so multiple crossroads.parse() calls passing same argument would not trigger the routed, matched and bypassed signals. - */ - ignoreState: boolean; - - /** - * Pipe routers, so all crossroads.parse() calls will be forwarded to the other router as well. - */ - pipe(router: CrossRoadsStatic): void; - - /** - * "Ceci n'est pas une pipe" - */ - unpipe(router: CrossRoadsStatic): void; - } -} - -declare var crossroads: CrossroadsJs.CrossRoadsStatic; - -declare module 'crossroads'{ - export = crossroads; -} diff --git a/templates/KnockoutSpa/typings/es6-promise/es6-promise.d.ts b/templates/KnockoutSpa/typings/es6-promise/es6-promise.d.ts deleted file mode 100644 index d5fdc2db..00000000 --- a/templates/KnockoutSpa/typings/es6-promise/es6-promise.d.ts +++ /dev/null @@ -1,75 +0,0 @@ -// Type definitions for es6-promise -// Project: https://github.com/jakearchibald/ES6-Promise -// Definitions by: François de Campredon , vvakame -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -interface Thenable { - then(onFulfilled?: (value: T) => U | Thenable, onRejected?: (error: any) => U | Thenable): Thenable; - then(onFulfilled?: (value: T) => U | Thenable, onRejected?: (error: any) => void): Thenable; - catch(onRejected?: (error: any) => U | Thenable): Thenable; -} - -declare class Promise implements Thenable { - /** - * If you call resolve in the body of the callback passed to the constructor, - * your promise is fulfilled with result object passed to resolve. - * If you call reject your promise is rejected with the object passed to reject. - * For consistency and debugging (eg stack traces), obj should be an instanceof Error. - * Any errors thrown in the constructor callback will be implicitly passed to reject(). - */ - constructor(callback: (resolve : (value?: T | Thenable) => void, reject: (error?: any) => void) => void); - - /** - * onFulfilled is called when/if "promise" resolves. onRejected is called when/if "promise" rejects. - * Both are optional, if either/both are omitted the next onFulfilled/onRejected in the chain is called. - * Both callbacks have a single parameter , the fulfillment value or rejection reason. - * "then" returns a new promise equivalent to the value you return from onFulfilled/onRejected after being passed through Promise.resolve. - * If an error is thrown in the callback, the returned promise rejects with that error. - * - * @param onFulfilled called when/if "promise" resolves - * @param onRejected called when/if "promise" rejects - */ - then(onFulfilled?: (value: T) => U | Thenable, onRejected?: (error: any) => U | Thenable): Promise; - then(onFulfilled?: (value: T) => U | Thenable, onRejected?: (error: any) => void): Promise; - - /** - * Sugar for promise.then(undefined, onRejected) - * - * @param onRejected called when/if "promise" rejects - */ - catch(onRejected?: (error: any) => U | Thenable): Promise; -} - -declare module Promise { - /** - * Make a new promise from the thenable. - * A thenable is promise-like in as far as it has a "then" method. - */ - function resolve(value?: T | Thenable): Promise; - - /** - * Make a promise that rejects to obj. For consistency and debugging (eg stack traces), obj should be an instanceof Error - */ - function reject(error: any): Promise; - function reject(error: T): Promise; - - /** - * Make a promise that fulfills when every item in the array fulfills, and rejects if (and when) any item rejects. - * the array passed to all can be a mixture of promise-like objects and other objects. - * The fulfillment value is an array (in order) of fulfillment values. The rejection value is the first rejection value. - */ - function all(promises: (T | Thenable)[]): Promise; - - /** - * Make a Promise that fulfills when any item fulfills, and rejects if any item rejects. - */ - function race(promises: (T | Thenable)[]): Promise; -} - -declare module 'es6-promise' { - var foo: typeof Promise; // Temp variable to reference Promise in local context - module rsvp { - export var Promise: typeof foo; - } - export = rsvp; -} diff --git a/templates/KnockoutSpa/typings/history/history.d.ts b/templates/KnockoutSpa/typings/history/history.d.ts deleted file mode 100644 index 21b556ae..00000000 --- a/templates/KnockoutSpa/typings/history/history.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -// Type definitions for History.js 1.8.0 -// Project: https://github.com/browserstate/history.js -// Definitions by: Boris Yankov , Gidon Junge -// Definitions: https://github.com/borisyankov/DefinitelyTyped - - -interface HistoryAdapter { - bind(element: any, event: string, callback: () => void): void; - trigger(element: any, event: string): void; - onDomLoad(callback: () => void): void; -} - -// Since History is defined in lib.d.ts as well -// the name for our interfaces was chosen to be Historyjs -// However at runtime you would need to do -// https://github.com/borisyankov/DefinitelyTyped/issues/277 -// var Historyjs: Historyjs = History; - -interface Historyjs { - - enabled: boolean; - - pushState(data: any, title: string, url: string): void; - replaceState(data: any, title: string, url: string): void; - getState(): HistoryState; - getStateByIndex(index: number): HistoryState; - getCurrentIndex(): number; - getHash(): string; - - Adapter: HistoryAdapter; - - back(): void; - forward(): void; - go(x: Number): void; - - log(...messages: any[]): void; - debug(...messages: any[]): void; - - options: HistoryOptions; -} - -interface HistoryState { - data?: any; - title?: string; - url: string; -} - -interface HistoryOptions { - hashChangeInterval?: number; - safariPollInterval?: number; - doubleCheckInterval?: number; - disableSuid?: boolean; - storeInterval?: number; - busyDelay?: number; - debug?: boolean; - initialTitle?: string; - html4Mode?: boolean; - delayInit?: number; - - -} diff --git a/templates/KnockoutSpa/typings/isomorphic-fetch/isomorphic-fetch.d.ts b/templates/KnockoutSpa/typings/isomorphic-fetch/isomorphic-fetch.d.ts deleted file mode 100644 index 19754db0..00000000 --- a/templates/KnockoutSpa/typings/isomorphic-fetch/isomorphic-fetch.d.ts +++ /dev/null @@ -1,119 +0,0 @@ -// Type definitions for isomorphic-fetch -// Project: https://github.com/matthew-andrews/isomorphic-fetch -// Definitions by: Todd Lucas -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -declare enum RequestContext { - "audio", "beacon", "cspreport", "download", "embed", "eventsource", - "favicon", "fetch", "font", "form", "frame", "hyperlink", "iframe", - "image", "imageset", "import", "internal", "location", "manifest", - "object", "ping", "plugin", "prefetch", "script", "serviceworker", - "sharedworker", "subresource", "style", "track", "video", "worker", - "xmlhttprequest", "xslt" -} -declare enum RequestMode { "same-origin", "no-cors", "cors" } -declare enum RequestCredentials { "omit", "same-origin", "include" } -declare enum RequestCache { - "default", "no-store", "reload", "no-cache", "force-cache", - "only-if-cached" -} -declare enum ResponseType { "basic", "cors", "default", "error", "opaque" } - -declare type HeaderInit = Headers | Array; -declare type BodyInit = ArrayBuffer | ArrayBufferView | Blob | FormData | string; -declare type RequestInfo = Request | string; - -interface RequestInit { - method?: string; - headers?: HeaderInit | { [index: string]: string }; - body?: BodyInit; - mode?: string | RequestMode; - credentials?: string | RequestCredentials; - cache?: string | RequestCache; -} - -interface IHeaders { - get(name: string): string; - getAll(name: string): Array; - has(name: string): boolean; -} - -declare class Headers implements IHeaders { - append(name: string, value: string): void; - delete(name: string):void; - get(name: string): string; - getAll(name: string): Array; - has(name: string): boolean; - set(name: string, value: string): void; -} - -interface IBody { - bodyUsed: boolean; - arrayBuffer(): Promise; - blob(): Promise; - formData(): Promise; - json(): Promise; - json(): Promise; - text(): Promise; -} - -declare class Body implements IBody { - bodyUsed: boolean; - arrayBuffer(): Promise; - blob(): Promise; - formData(): Promise; - json(): Promise; - json(): Promise; - text(): Promise; -} - -interface IRequest extends IBody { - method: string; - url: string; - headers: Headers; - context: string | RequestContext; - referrer: string; - mode: string | RequestMode; - credentials: string | RequestCredentials; - cache: string | RequestCache; -} - -declare class Request extends Body implements IRequest { - constructor(input: string | Request, init?: RequestInit); - method: string; - url: string; - headers: Headers; - context: string | RequestContext; - referrer: string; - mode: string | RequestMode; - credentials: string | RequestCredentials; - cache: string | RequestCache; -} - -interface IResponse extends IBody { - url: string; - status: number; - statusText: string; - ok: boolean; - headers: IHeaders; - type: string | ResponseType; - size: number; - timeout: number; - redirect(url: string, status: number): IResponse; - error(): IResponse; - clone(): IResponse; -} - -interface IFetchStatic { - Promise: any; - Headers: IHeaders - Request: IRequest; - Response: IResponse; - (url: string | IRequest, init?: RequestInit): Promise; -} - -declare var fetch: IFetchStatic; - -declare module "isomorphic-fetch" { - export = fetch; -} diff --git a/templates/KnockoutSpa/typings/jquery/jquery.d.ts b/templates/KnockoutSpa/typings/jquery/jquery.d.ts deleted file mode 100644 index b08598cc..00000000 --- a/templates/KnockoutSpa/typings/jquery/jquery.d.ts +++ /dev/null @@ -1,3242 +0,0 @@ -// Type definitions for jQuery 1.10.x / 2.0.x -// Project: http://jquery.com/ -// Definitions by: Boris Yankov , Christian Hoffmeister , Steve Fenton , Diullei Gomes , Tass Iliopoulos , Jason Swearingen , Sean Hill , Guus Goossens , Kelly Summerlin , Basarat Ali Syed , Nicholas Wolverson , Derek Cicerone , Andrew Gaspar , James Harrison Fisher , Seikichi Kondo , Benjamin Jackman , Poul Sorensen , Josh Strobl , John Reilly , Dick van den Brink -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/* ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - -THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ - - -/** - * Interface for the AJAX setting that will configure the AJAX request - */ -interface JQueryAjaxSettings { - /** - * The content type sent in the request header that tells the server what kind of response it will accept in return. If the accepts setting needs modification, it is recommended to do so once in the $.ajaxSetup() method. - */ - accepts?: any; - /** - * By default, all requests are sent asynchronously (i.e. this is set to true by default). If you need synchronous requests, set this option to false. Cross-domain requests and dataType: "jsonp" requests do not support synchronous operation. Note that synchronous requests may temporarily lock the browser, disabling any actions while the request is active. As of jQuery 1.8, the use of async: false with jqXHR ($.Deferred) is deprecated; you must use the success/error/complete callback options instead of the corresponding methods of the jqXHR object such as jqXHR.done() or the deprecated jqXHR.success(). - */ - async?: boolean; - /** - * A pre-request callback function that can be used to modify the jqXHR (in jQuery 1.4.x, XMLHTTPRequest) object before it is sent. Use this to set custom headers, etc. The jqXHR and settings objects are passed as arguments. This is an Ajax Event. Returning false in the beforeSend function will cancel the request. As of jQuery 1.5, the beforeSend option will be called regardless of the type of request. - */ - beforeSend? (jqXHR: JQueryXHR, settings: JQueryAjaxSettings): any; - /** - * If set to false, it will force requested pages not to be cached by the browser. Note: Setting cache to false will only work correctly with HEAD and GET requests. It works by appending "_={timestamp}" to the GET parameters. The parameter is not needed for other types of requests, except in IE8 when a POST is made to a URL that has already been requested by a GET. - */ - cache?: boolean; - /** - * A function to be called when the request finishes (after success and error callbacks are executed). The function gets passed two arguments: The jqXHR (in jQuery 1.4.x, XMLHTTPRequest) object and a string categorizing the status of the request ("success", "notmodified", "error", "timeout", "abort", or "parsererror"). As of jQuery 1.5, the complete setting can accept an array of functions. Each function will be called in turn. This is an Ajax Event. - */ - complete? (jqXHR: JQueryXHR, textStatus: string): any; - /** - * An object of string/regular-expression pairs that determine how jQuery will parse the response, given its content type. (version added: 1.5) - */ - contents?: { [key: string]: any; }; - //According to jQuery.ajax source code, ajax's option actually allows contentType to set to "false" - // https://github.com/DefinitelyTyped/DefinitelyTyped/issues/742 - /** - * When sending data to the server, use this content type. Default is "application/x-www-form-urlencoded; charset=UTF-8", which is fine for most cases. If you explicitly pass in a content-type to $.ajax(), then it is always sent to the server (even if no data is sent). The W3C XMLHttpRequest specification dictates that the charset is always UTF-8; specifying another charset will not force the browser to change the encoding. - */ - contentType?: any; - /** - * This object will be made the context of all Ajax-related callbacks. By default, the context is an object that represents the ajax settings used in the call ($.ajaxSettings merged with the settings passed to $.ajax). - */ - context?: any; - /** - * An object containing dataType-to-dataType converters. Each converter's value is a function that returns the transformed value of the response. (version added: 1.5) - */ - converters?: { [key: string]: any; }; - /** - * If you wish to force a crossDomain request (such as JSONP) on the same domain, set the value of crossDomain to true. This allows, for example, server-side redirection to another domain. (version added: 1.5) - */ - crossDomain?: boolean; - /** - * Data to be sent to the server. It is converted to a query string, if not already a string. It's appended to the url for GET-requests. See processData option to prevent this automatic processing. Object must be Key/Value pairs. If value is an Array, jQuery serializes multiple values with same key based on the value of the traditional setting (described below). - */ - data?: any; - /** - * A function to be used to handle the raw response data of XMLHttpRequest.This is a pre-filtering function to sanitize the response. You should return the sanitized data. The function accepts two arguments: The raw data returned from the server and the 'dataType' parameter. - */ - dataFilter? (data: any, ty: any): any; - /** - * The type of data that you're expecting back from the server. If none is specified, jQuery will try to infer it based on the MIME type of the response (an XML MIME type will yield XML, in 1.4 JSON will yield a JavaScript object, in 1.4 script will execute the script, and anything else will be returned as a string). - */ - dataType?: string; - /** - * A function to be called if the request fails. The function receives three arguments: The jqXHR (in jQuery 1.4.x, XMLHttpRequest) object, a string describing the type of error that occurred and an optional exception object, if one occurred. Possible values for the second argument (besides null) are "timeout", "error", "abort", and "parsererror". When an HTTP error occurs, errorThrown receives the textual portion of the HTTP status, such as "Not Found" or "Internal Server Error." As of jQuery 1.5, the error setting can accept an array of functions. Each function will be called in turn. Note: This handler is not called for cross-domain script and cross-domain JSONP requests. This is an Ajax Event. - */ - error? (jqXHR: JQueryXHR, textStatus: string, errorThrown: string): any; - /** - * Whether to trigger global Ajax event handlers for this request. The default is true. Set to false to prevent the global handlers like ajaxStart or ajaxStop from being triggered. This can be used to control various Ajax Events. - */ - global?: boolean; - /** - * An object of additional header key/value pairs to send along with requests using the XMLHttpRequest transport. The header X-Requested-With: XMLHttpRequest is always added, but its default XMLHttpRequest value can be changed here. Values in the headers setting can also be overwritten from within the beforeSend function. (version added: 1.5) - */ - headers?: { [key: string]: any; }; - /** - * Allow the request to be successful only if the response has changed since the last request. This is done by checking the Last-Modified header. Default value is false, ignoring the header. In jQuery 1.4 this technique also checks the 'etag' specified by the server to catch unmodified data. - */ - ifModified?: boolean; - /** - * Allow the current environment to be recognized as "local," (e.g. the filesystem), even if jQuery does not recognize it as such by default. The following protocols are currently recognized as local: file, *-extension, and widget. If the isLocal setting needs modification, it is recommended to do so once in the $.ajaxSetup() method. (version added: 1.5.1) - */ - isLocal?: boolean; - /** - * Override the callback function name in a jsonp request. This value will be used instead of 'callback' in the 'callback=?' part of the query string in the url. So {jsonp:'onJSONPLoad'} would result in 'onJSONPLoad=?' passed to the server. As of jQuery 1.5, setting the jsonp option to false prevents jQuery from adding the "?callback" string to the URL or attempting to use "=?" for transformation. In this case, you should also explicitly set the jsonpCallback setting. For example, { jsonp: false, jsonpCallback: "callbackName" } - */ - jsonp?: any; - /** - * Specify the callback function name for a JSONP request. This value will be used instead of the random name automatically generated by jQuery. It is preferable to let jQuery generate a unique name as it'll make it easier to manage the requests and provide callbacks and error handling. You may want to specify the callback when you want to enable better browser caching of GET requests. As of jQuery 1.5, you can also use a function for this setting, in which case the value of jsonpCallback is set to the return value of that function. - */ - jsonpCallback?: any; - /** - * The HTTP method to use for the request (e.g. "POST", "GET", "PUT"). (version added: 1.9.0) - */ - method?: string; - /** - * A mime type to override the XHR mime type. (version added: 1.5.1) - */ - mimeType?: string; - /** - * A password to be used with XMLHttpRequest in response to an HTTP access authentication request. - */ - password?: string; - /** - * By default, data passed in to the data option as an object (technically, anything other than a string) will be processed and transformed into a query string, fitting to the default content-type "application/x-www-form-urlencoded". If you want to send a DOMDocument, or other non-processed data, set this option to false. - */ - processData?: boolean; - /** - * Only applies when the "script" transport is used (e.g., cross-domain requests with "jsonp" or "script" dataType and "GET" type). Sets the charset attribute on the script tag used in the request. Used when the character set on the local page is not the same as the one on the remote script. - */ - scriptCharset?: string; - /** - * An object of numeric HTTP codes and functions to be called when the response has the corresponding code. f the request is successful, the status code functions take the same parameters as the success callback; if it results in an error (including 3xx redirect), they take the same parameters as the error callback. (version added: 1.5) - */ - statusCode?: { [key: string]: any; }; - /** - * A function to be called if the request succeeds. The function gets passed three arguments: The data returned from the server, formatted according to the dataType parameter; a string describing the status; and the jqXHR (in jQuery 1.4.x, XMLHttpRequest) object. As of jQuery 1.5, the success setting can accept an array of functions. Each function will be called in turn. This is an Ajax Event. - */ - success? (data: any, textStatus: string, jqXHR: JQueryXHR): any; - /** - * Set a timeout (in milliseconds) for the request. This will override any global timeout set with $.ajaxSetup(). The timeout period starts at the point the $.ajax call is made; if several other requests are in progress and the browser has no connections available, it is possible for a request to time out before it can be sent. In jQuery 1.4.x and below, the XMLHttpRequest object will be in an invalid state if the request times out; accessing any object members may throw an exception. In Firefox 3.0+ only, script and JSONP requests cannot be cancelled by a timeout; the script will run even if it arrives after the timeout period. - */ - timeout?: number; - /** - * Set this to true if you wish to use the traditional style of param serialization. - */ - traditional?: boolean; - /** - * The type of request to make ("POST" or "GET"), default is "GET". Note: Other HTTP request methods, such as PUT and DELETE, can also be used here, but they are not supported by all browsers. - */ - type?: string; - /** - * A string containing the URL to which the request is sent. - */ - url?: string; - /** - * A username to be used with XMLHttpRequest in response to an HTTP access authentication request. - */ - username?: string; - /** - * Callback for creating the XMLHttpRequest object. Defaults to the ActiveXObject when available (IE), the XMLHttpRequest otherwise. Override to provide your own implementation for XMLHttpRequest or enhancements to the factory. - */ - xhr?: any; - /** - * An object of fieldName-fieldValue pairs to set on the native XHR object. For example, you can use it to set withCredentials to true for cross-domain requests if needed. In jQuery 1.5, the withCredentials property was not propagated to the native XHR and thus CORS requests requiring it would ignore this flag. For this reason, we recommend using jQuery 1.5.1+ should you require the use of it. (version added: 1.5.1) - */ - xhrFields?: { [key: string]: any; }; -} - -/** - * Interface for the jqXHR object - */ -interface JQueryXHR extends XMLHttpRequest, JQueryPromise { - /** - * The .overrideMimeType() method may be used in the beforeSend() callback function, for example, to modify the response content-type header. As of jQuery 1.5.1, the jqXHR object also contains the overrideMimeType() method (it was available in jQuery 1.4.x, as well, but was temporarily removed in jQuery 1.5). - */ - overrideMimeType(mimeType: string): any; - /** - * Cancel the request. - * - * @param statusText A string passed as the textStatus parameter for the done callback. Default value: "canceled" - */ - abort(statusText?: string): void; - /** - * Incorporates the functionality of the .done() and .fail() methods, allowing (as of jQuery 1.8) the underlying Promise to be manipulated. Refer to deferred.then() for implementation details. - */ - then(doneCallback: (data: any, textStatus: string, jqXHR: JQueryXHR) => R, failCallback?: (jqXHR: JQueryXHR, textStatus: string, errorThrown: any) => void): JQueryPromise; - /** - * Property containing the parsed response if the response Content-Type is json - */ - responseJSON?: any; - /** - * A function to be called if the request fails. - */ - error(xhr: JQueryXHR, textStatus: string, errorThrown: string): void; -} - -/** - * Interface for the JQuery callback - */ -interface JQueryCallback { - /** - * Add a callback or a collection of callbacks to a callback list. - * - * @param callbacks A function, or array of functions, that are to be added to the callback list. - */ - add(callbacks: Function): JQueryCallback; - /** - * Add a callback or a collection of callbacks to a callback list. - * - * @param callbacks A function, or array of functions, that are to be added to the callback list. - */ - add(callbacks: Function[]): JQueryCallback; - - /** - * Disable a callback list from doing anything more. - */ - disable(): JQueryCallback; - - /** - * Determine if the callbacks list has been disabled. - */ - disabled(): boolean; - - /** - * Remove all of the callbacks from a list. - */ - empty(): JQueryCallback; - - /** - * Call all of the callbacks with the given arguments - * - * @param arguments The argument or list of arguments to pass back to the callback list. - */ - fire(...arguments: any[]): JQueryCallback; - - /** - * Determine if the callbacks have already been called at least once. - */ - fired(): boolean; - - /** - * Call all callbacks in a list with the given context and arguments. - * - * @param context A reference to the context in which the callbacks in the list should be fired. - * @param arguments An argument, or array of arguments, to pass to the callbacks in the list. - */ - fireWith(context?: any, args?: any[]): JQueryCallback; - - /** - * Determine whether a supplied callback is in a list - * - * @param callback The callback to search for. - */ - has(callback: Function): boolean; - - /** - * Lock a callback list in its current state. - */ - lock(): JQueryCallback; - - /** - * Determine if the callbacks list has been locked. - */ - locked(): boolean; - - /** - * Remove a callback or a collection of callbacks from a callback list. - * - * @param callbacks A function, or array of functions, that are to be removed from the callback list. - */ - remove(callbacks: Function): JQueryCallback; - /** - * Remove a callback or a collection of callbacks from a callback list. - * - * @param callbacks A function, or array of functions, that are to be removed from the callback list. - */ - remove(callbacks: Function[]): JQueryCallback; -} - -/** - * Allows jQuery Promises to interop with non-jQuery promises - */ -interface JQueryGenericPromise { - /** - * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. - * - * @param doneFilter A function that is called when the Deferred is resolved. - * @param failFilter An optional function that is called when the Deferred is rejected. - */ - then(doneFilter: (value?: T, ...values: any[]) => U|JQueryPromise, failFilter?: (...reasons: any[]) => any, progressFilter?: (...progression: any[]) => any): JQueryPromise; - - /** - * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. - * - * @param doneFilter A function that is called when the Deferred is resolved. - * @param failFilter An optional function that is called when the Deferred is rejected. - */ - then(doneFilter: (value?: T, ...values: any[]) => void, failFilter?: (...reasons: any[]) => any, progressFilter?: (...progression: any[]) => any): JQueryPromise; -} - -/** - * Interface for the JQuery promise/deferred callbacks - */ -interface JQueryPromiseCallback { - (value?: T, ...args: any[]): void; -} - -interface JQueryPromiseOperator { - (callback1: JQueryPromiseCallback|JQueryPromiseCallback[], ...callbacksN: Array|JQueryPromiseCallback[]>): JQueryPromise; -} - -/** - * Interface for the JQuery promise, part of callbacks - */ -interface JQueryPromise extends JQueryGenericPromise { - /** - * Determine the current state of a Deferred object. - */ - state(): string; - /** - * Add handlers to be called when the Deferred object is either resolved or rejected. - * - * @param alwaysCallbacks1 A function, or array of functions, that is called when the Deferred is resolved or rejected. - * @param alwaysCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved or rejected. - */ - always(alwaysCallback1?: JQueryPromiseCallback|JQueryPromiseCallback[], ...alwaysCallbacksN: Array|JQueryPromiseCallback[]>): JQueryPromise; - /** - * Add handlers to be called when the Deferred object is resolved. - * - * @param doneCallbacks1 A function, or array of functions, that are called when the Deferred is resolved. - * @param doneCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved. - */ - done(doneCallback1?: JQueryPromiseCallback|JQueryPromiseCallback[], ...doneCallbackN: Array|JQueryPromiseCallback[]>): JQueryPromise; - /** - * Add handlers to be called when the Deferred object is rejected. - * - * @param failCallbacks1 A function, or array of functions, that are called when the Deferred is rejected. - * @param failCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is rejected. - */ - fail(failCallback1?: JQueryPromiseCallback|JQueryPromiseCallback[], ...failCallbacksN: Array|JQueryPromiseCallback[]>): JQueryPromise; - /** - * Add handlers to be called when the Deferred object generates progress notifications. - * - * @param progressCallbacks A function, or array of functions, to be called when the Deferred generates progress notifications. - */ - progress(progressCallback1?: JQueryPromiseCallback|JQueryPromiseCallback[], ...progressCallbackN: Array|JQueryPromiseCallback[]>): JQueryPromise; - - // Deprecated - given no typings - pipe(doneFilter?: (x: any) => any, failFilter?: (x: any) => any, progressFilter?: (x: any) => any): JQueryPromise; -} - -/** - * Interface for the JQuery deferred, part of callbacks - */ -interface JQueryDeferred extends JQueryGenericPromise { - /** - * Determine the current state of a Deferred object. - */ - state(): string; - /** - * Add handlers to be called when the Deferred object is either resolved or rejected. - * - * @param alwaysCallbacks1 A function, or array of functions, that is called when the Deferred is resolved or rejected. - * @param alwaysCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved or rejected. - */ - always(alwaysCallback1?: JQueryPromiseCallback|JQueryPromiseCallback[], ...alwaysCallbacksN: Array|JQueryPromiseCallback[]>): JQueryDeferred; - /** - * Add handlers to be called when the Deferred object is resolved. - * - * @param doneCallbacks1 A function, or array of functions, that are called when the Deferred is resolved. - * @param doneCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved. - */ - done(doneCallback1?: JQueryPromiseCallback|JQueryPromiseCallback[], ...doneCallbackN: Array|JQueryPromiseCallback[]>): JQueryDeferred; - /** - * Add handlers to be called when the Deferred object is rejected. - * - * @param failCallbacks1 A function, or array of functions, that are called when the Deferred is rejected. - * @param failCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is rejected. - */ - fail(failCallback1?: JQueryPromiseCallback|JQueryPromiseCallback[], ...failCallbacksN: Array|JQueryPromiseCallback[]>): JQueryDeferred; - /** - * Add handlers to be called when the Deferred object generates progress notifications. - * - * @param progressCallbacks A function, or array of functions, to be called when the Deferred generates progress notifications. - */ - progress(progressCallback1?: JQueryPromiseCallback|JQueryPromiseCallback[], ...progressCallbackN: Array|JQueryPromiseCallback[]>): JQueryDeferred; - - /** - * Call the progressCallbacks on a Deferred object with the given args. - * - * @param args Optional arguments that are passed to the progressCallbacks. - */ - notify(value?: any, ...args: any[]): JQueryDeferred; - - /** - * Call the progressCallbacks on a Deferred object with the given context and args. - * - * @param context Context passed to the progressCallbacks as the this object. - * @param args Optional arguments that are passed to the progressCallbacks. - */ - notifyWith(context: any, value?: any[]): JQueryDeferred; - - /** - * Reject a Deferred object and call any failCallbacks with the given args. - * - * @param args Optional arguments that are passed to the failCallbacks. - */ - reject(value?: any, ...args: any[]): JQueryDeferred; - /** - * Reject a Deferred object and call any failCallbacks with the given context and args. - * - * @param context Context passed to the failCallbacks as the this object. - * @param args An optional array of arguments that are passed to the failCallbacks. - */ - rejectWith(context: any, value?: any[]): JQueryDeferred; - - /** - * Resolve a Deferred object and call any doneCallbacks with the given args. - * - * @param value First argument passed to doneCallbacks. - * @param args Optional subsequent arguments that are passed to the doneCallbacks. - */ - resolve(value?: T, ...args: any[]): JQueryDeferred; - - /** - * Resolve a Deferred object and call any doneCallbacks with the given context and args. - * - * @param context Context passed to the doneCallbacks as the this object. - * @param args An optional array of arguments that are passed to the doneCallbacks. - */ - resolveWith(context: any, value?: T[]): JQueryDeferred; - - /** - * Return a Deferred's Promise object. - * - * @param target Object onto which the promise methods have to be attached - */ - promise(target?: any): JQueryPromise; - - // Deprecated - given no typings - pipe(doneFilter?: (x: any) => any, failFilter?: (x: any) => any, progressFilter?: (x: any) => any): JQueryPromise; -} - -/** - * Interface of the JQuery extension of the W3C event object - */ -interface BaseJQueryEventObject extends Event { - currentTarget: Element; - data: any; - delegateTarget: Element; - isDefaultPrevented(): boolean; - isImmediatePropagationStopped(): boolean; - isPropagationStopped(): boolean; - namespace: string; - originalEvent: Event; - preventDefault(): any; - relatedTarget: Element; - result: any; - stopImmediatePropagation(): void; - stopPropagation(): void; - target: Element; - pageX: number; - pageY: number; - which: number; - metaKey: boolean; -} - -interface JQueryInputEventObject extends BaseJQueryEventObject { - altKey: boolean; - ctrlKey: boolean; - metaKey: boolean; - shiftKey: boolean; -} - -interface JQueryMouseEventObject extends JQueryInputEventObject { - button: number; - clientX: number; - clientY: number; - offsetX: number; - offsetY: number; - pageX: number; - pageY: number; - screenX: number; - screenY: number; -} - -interface JQueryKeyEventObject extends JQueryInputEventObject { - char: any; - charCode: number; - key: any; - keyCode: number; -} - -interface JQueryEventObject extends BaseJQueryEventObject, JQueryInputEventObject, JQueryMouseEventObject, JQueryKeyEventObject{ -} - -/* - Collection of properties of the current browser -*/ - -interface JQuerySupport { - ajax?: boolean; - boxModel?: boolean; - changeBubbles?: boolean; - checkClone?: boolean; - checkOn?: boolean; - cors?: boolean; - cssFloat?: boolean; - hrefNormalized?: boolean; - htmlSerialize?: boolean; - leadingWhitespace?: boolean; - noCloneChecked?: boolean; - noCloneEvent?: boolean; - opacity?: boolean; - optDisabled?: boolean; - optSelected?: boolean; - scriptEval? (): boolean; - style?: boolean; - submitBubbles?: boolean; - tbody?: boolean; -} - -interface JQueryParam { - /** - * Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request. - * - * @param obj An array or object to serialize. - */ - (obj: any): string; - - /** - * Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request. - * - * @param obj An array or object to serialize. - * @param traditional A Boolean indicating whether to perform a traditional "shallow" serialization. - */ - (obj: any, traditional: boolean): string; -} - -/** - * The interface used to construct jQuery events (with $.Event). It is - * defined separately instead of inline in JQueryStatic to allow - * overriding the construction function with specific strings - * returning specific event objects. - */ -interface JQueryEventConstructor { - (name: string, eventProperties?: any): JQueryEventObject; - new (name: string, eventProperties?: any): JQueryEventObject; -} - -/** - * The interface used to specify coordinates. - */ -interface JQueryCoordinates { - left: number; - top: number; -} - -/** - * Elements in the array returned by serializeArray() - */ -interface JQuerySerializeArrayElement { - name: string; - value: string; -} - -interface JQueryAnimationOptions { - /** - * A string or number determining how long the animation will run. - */ - duration?: any; - /** - * A string indicating which easing function to use for the transition. - */ - easing?: string; - /** - * A function to call once the animation is complete. - */ - complete?: Function; - /** - * A function to be called for each animated property of each animated element. This function provides an opportunity to modify the Tween object to change the value of the property before it is set. - */ - step?: (now: number, tween: any) => any; - /** - * A function to be called after each step of the animation, only once per animated element regardless of the number of animated properties. (version added: 1.8) - */ - progress?: (animation: JQueryPromise, progress: number, remainingMs: number) => any; - /** - * A function to call when the animation begins. (version added: 1.8) - */ - start?: (animation: JQueryPromise) => any; - /** - * A function to be called when the animation completes (its Promise object is resolved). (version added: 1.8) - */ - done?: (animation: JQueryPromise, jumpedToEnd: boolean) => any; - /** - * A function to be called when the animation fails to complete (its Promise object is rejected). (version added: 1.8) - */ - fail?: (animation: JQueryPromise, jumpedToEnd: boolean) => any; - /** - * A function to be called when the animation completes or stops without completing (its Promise object is either resolved or rejected). (version added: 1.8) - */ - always?: (animation: JQueryPromise, jumpedToEnd: boolean) => any; - /** - * A Boolean indicating whether to place the animation in the effects queue. If false, the animation will begin immediately. As of jQuery 1.7, the queue option can also accept a string, in which case the animation is added to the queue represented by that string. When a custom queue name is used the animation does not automatically start; you must call .dequeue("queuename") to start it. - */ - queue?: any; - /** - * A map of one or more of the CSS properties defined by the properties argument and their corresponding easing functions. (version added: 1.4) - */ - specialEasing?: Object; -} - -interface JQueryEasingFunction { - ( percent: number ): number; -} - -interface JQueryEasingFunctions { - [ name: string ]: JQueryEasingFunction; - linear: JQueryEasingFunction; - swing: JQueryEasingFunction; -} - -/** - * Static members of jQuery (those on $ and jQuery themselves) - */ -interface JQueryStatic { - - /** - * Perform an asynchronous HTTP (Ajax) request. - * - * @param settings A set of key/value pairs that configure the Ajax request. All settings are optional. A default can be set for any option with $.ajaxSetup(). - */ - ajax(settings: JQueryAjaxSettings): JQueryXHR; - /** - * Perform an asynchronous HTTP (Ajax) request. - * - * @param url A string containing the URL to which the request is sent. - * @param settings A set of key/value pairs that configure the Ajax request. All settings are optional. A default can be set for any option with $.ajaxSetup(). - */ - ajax(url: string, settings?: JQueryAjaxSettings): JQueryXHR; - - /** - * Handle custom Ajax options or modify existing options before each request is sent and before they are processed by $.ajax(). - * - * @param dataTypes An optional string containing one or more space-separated dataTypes - * @param handler A handler to set default values for future Ajax requests. - */ - ajaxPrefilter(dataTypes: string, handler: (opts: any, originalOpts: JQueryAjaxSettings, jqXHR: JQueryXHR) => any): void; - /** - * Handle custom Ajax options or modify existing options before each request is sent and before they are processed by $.ajax(). - * - * @param handler A handler to set default values for future Ajax requests. - */ - ajaxPrefilter(handler: (opts: any, originalOpts: JQueryAjaxSettings, jqXHR: JQueryXHR) => any): void; - - ajaxSettings: JQueryAjaxSettings; - - /** - * Set default values for future Ajax requests. Its use is not recommended. - * - * @param options A set of key/value pairs that configure the default Ajax request. All options are optional. - */ - ajaxSetup(options: JQueryAjaxSettings): void; - - /** - * Load data from the server using a HTTP GET request. - * - * @param url A string containing the URL to which the request is sent. - * @param success A callback function that is executed if the request succeeds. - * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html). - */ - get(url: string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR; - /** - * Load data from the server using a HTTP GET request. - * - * @param url A string containing the URL to which the request is sent. - * @param data A plain object or string that is sent to the server with the request. - * @param success A callback function that is executed if the request succeeds. - * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html). - */ - get(url: string, data?: Object|string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR; - /** - * Load data from the server using a HTTP GET request. - * - * @param settings The JQueryAjaxSettings to be used for the request - */ - get(settings : JQueryAjaxSettings): JQueryXHR; - /** - * Load JSON-encoded data from the server using a GET HTTP request. - * - * @param url A string containing the URL to which the request is sent. - * @param success A callback function that is executed if the request succeeds. - */ - getJSON(url: string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any): JQueryXHR; - /** - * Load JSON-encoded data from the server using a GET HTTP request. - * - * @param url A string containing the URL to which the request is sent. - * @param data A plain object or string that is sent to the server with the request. - * @param success A callback function that is executed if the request succeeds. - */ - getJSON(url: string, data?: Object|string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any): JQueryXHR; - /** - * Load a JavaScript file from the server using a GET HTTP request, then execute it. - * - * @param url A string containing the URL to which the request is sent. - * @param success A callback function that is executed if the request succeeds. - */ - getScript(url: string, success?: (script: string, textStatus: string, jqXHR: JQueryXHR) => any): JQueryXHR; - - /** - * Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request. - */ - param: JQueryParam; - - /** - * Load data from the server using a HTTP POST request. - * - * @param url A string containing the URL to which the request is sent. - * @param success A callback function that is executed if the request succeeds. Required if dataType is provided, but can be null in that case. - * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html). - */ - post(url: string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR; - /** - * Load data from the server using a HTTP POST request. - * - * @param url A string containing the URL to which the request is sent. - * @param data A plain object or string that is sent to the server with the request. - * @param success A callback function that is executed if the request succeeds. Required if dataType is provided, but can be null in that case. - * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html). - */ - post(url: string, data?: Object|string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR; - /** - * Load data from the server using a HTTP POST request. - * - * @param settings The JQueryAjaxSettings to be used for the request - */ - post(settings : JQueryAjaxSettings): JQueryXHR; - /** - * A multi-purpose callbacks list object that provides a powerful way to manage callback lists. - * - * @param flags An optional list of space-separated flags that change how the callback list behaves. - */ - Callbacks(flags?: string): JQueryCallback; - - /** - * Holds or releases the execution of jQuery's ready event. - * - * @param hold Indicates whether the ready hold is being requested or released - */ - holdReady(hold: boolean): void; - - /** - * Accepts a string containing a CSS selector which is then used to match a set of elements. - * - * @param selector A string containing a selector expression - * @param context A DOM Element, Document, or jQuery to use as context - */ - (selector: string, context?: Element|JQuery): JQuery; - - /** - * Accepts a string containing a CSS selector which is then used to match a set of elements. - * - * @param element A DOM element to wrap in a jQuery object. - */ - (element: Element): JQuery; - - /** - * Accepts a string containing a CSS selector which is then used to match a set of elements. - * - * @param elementArray An array containing a set of DOM elements to wrap in a jQuery object. - */ - (elementArray: Element[]): JQuery; - - /** - * Binds a function to be executed when the DOM has finished loading. - * - * @param callback A function to execute after the DOM is ready. - */ - (callback: (jQueryAlias?: JQueryStatic) => any): JQuery; - - /** - * Accepts a string containing a CSS selector which is then used to match a set of elements. - * - * @param object A plain object to wrap in a jQuery object. - */ - (object: {}): JQuery; - - /** - * Accepts a string containing a CSS selector which is then used to match a set of elements. - * - * @param object An existing jQuery object to clone. - */ - (object: JQuery): JQuery; - - /** - * Specify a function to execute when the DOM is fully loaded. - */ - (): JQuery; - - /** - * Creates DOM elements on the fly from the provided string of raw HTML. - * - * @param html A string of HTML to create on the fly. Note that this parses HTML, not XML. - * @param ownerDocument A document in which the new elements will be created. - */ - (html: string, ownerDocument?: Document): JQuery; - - /** - * Creates DOM elements on the fly from the provided string of raw HTML. - * - * @param html A string defining a single, standalone, HTML element (e.g.
or
). - * @param attributes An object of attributes, events, and methods to call on the newly-created element. - */ - (html: string, attributes: Object): JQuery; - - /** - * Relinquish jQuery's control of the $ variable. - * - * @param removeAll A Boolean indicating whether to remove all jQuery variables from the global scope (including jQuery itself). - */ - noConflict(removeAll?: boolean): JQueryStatic; - - /** - * Provides a way to execute callback functions based on one or more objects, usually Deferred objects that represent asynchronous events. - * - * @param deferreds One or more Deferred objects, or plain JavaScript objects. - */ - when(...deferreds: Array/* as JQueryDeferred */>): JQueryPromise; - - /** - * Hook directly into jQuery to override how particular CSS properties are retrieved or set, normalize CSS property naming, or create custom properties. - */ - cssHooks: { [key: string]: any; }; - cssNumber: any; - - /** - * Store arbitrary data associated with the specified element. Returns the value that was set. - * - * @param element The DOM element to associate with the data. - * @param key A string naming the piece of data to set. - * @param value The new data value. - */ - data(element: Element, key: string, value: T): T; - /** - * Returns value at named data store for the element, as set by jQuery.data(element, name, value), or the full data store for the element. - * - * @param element The DOM element to associate with the data. - * @param key A string naming the piece of data to set. - */ - data(element: Element, key: string): any; - /** - * Returns value at named data store for the element, as set by jQuery.data(element, name, value), or the full data store for the element. - * - * @param element The DOM element to associate with the data. - */ - data(element: Element): any; - - /** - * Execute the next function on the queue for the matched element. - * - * @param element A DOM element from which to remove and execute a queued function. - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - */ - dequeue(element: Element, queueName?: string): void; - - /** - * Determine whether an element has any jQuery data associated with it. - * - * @param element A DOM element to be checked for data. - */ - hasData(element: Element): boolean; - - /** - * Show the queue of functions to be executed on the matched element. - * - * @param element A DOM element to inspect for an attached queue. - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - */ - queue(element: Element, queueName?: string): any[]; - /** - * Manipulate the queue of functions to be executed on the matched element. - * - * @param element A DOM element where the array of queued functions is attached. - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - * @param newQueue An array of functions to replace the current queue contents. - */ - queue(element: Element, queueName: string, newQueue: Function[]): JQuery; - /** - * Manipulate the queue of functions to be executed on the matched element. - * - * @param element A DOM element on which to add a queued function. - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - * @param callback The new function to add to the queue. - */ - queue(element: Element, queueName: string, callback: Function): JQuery; - - /** - * Remove a previously-stored piece of data. - * - * @param element A DOM element from which to remove data. - * @param name A string naming the piece of data to remove. - */ - removeData(element: Element, name?: string): JQuery; - - /** - * A constructor function that returns a chainable utility object with methods to register multiple callbacks into callback queues, invoke callback queues, and relay the success or failure state of any synchronous or asynchronous function. - * - * @param beforeStart A function that is called just before the constructor returns. - */ - Deferred(beforeStart?: (deferred: JQueryDeferred) => any): JQueryDeferred; - - /** - * Effects - */ - - easing: JQueryEasingFunctions; - - fx: { - tick: () => void; - /** - * The rate (in milliseconds) at which animations fire. - */ - interval: number; - stop: () => void; - speeds: { slow: number; fast: number; }; - /** - * Globally disable all animations. - */ - off: boolean; - step: any; - }; - - /** - * Takes a function and returns a new one that will always have a particular context. - * - * @param fnction The function whose context will be changed. - * @param context The object to which the context (this) of the function should be set. - * @param additionalArguments Any number of arguments to be passed to the function referenced in the function argument. - */ - proxy(fnction: (...args: any[]) => any, context: Object, ...additionalArguments: any[]): any; - /** - * Takes a function and returns a new one that will always have a particular context. - * - * @param context The object to which the context (this) of the function should be set. - * @param name The name of the function whose context will be changed (should be a property of the context object). - * @param additionalArguments Any number of arguments to be passed to the function named in the name argument. - */ - proxy(context: Object, name: string, ...additionalArguments: any[]): any; - - Event: JQueryEventConstructor; - - /** - * Takes a string and throws an exception containing it. - * - * @param message The message to send out. - */ - error(message: any): JQuery; - - expr: any; - fn: any; //TODO: Decide how we want to type this - - isReady: boolean; - - // Properties - support: JQuerySupport; - - /** - * Check to see if a DOM element is a descendant of another DOM element. - * - * @param container The DOM element that may contain the other element. - * @param contained The DOM element that may be contained by (a descendant of) the other element. - */ - contains(container: Element, contained: Element): boolean; - - /** - * A generic iterator function, which can be used to seamlessly iterate over both objects and arrays. Arrays and array-like objects with a length property (such as a function's arguments object) are iterated by numeric index, from 0 to length-1. Other objects are iterated via their named properties. - * - * @param collection The object or array to iterate over. - * @param callback The function that will be executed on every object. - */ - each( - collection: T[], - callback: (indexInArray: number, valueOfElement: T) => any - ): any; - - /** - * A generic iterator function, which can be used to seamlessly iterate over both objects and arrays. Arrays and array-like objects with a length property (such as a function's arguments object) are iterated by numeric index, from 0 to length-1. Other objects are iterated via their named properties. - * - * @param collection The object or array to iterate over. - * @param callback The function that will be executed on every object. - */ - each( - collection: any, - callback: (indexInArray: any, valueOfElement: any) => any - ): any; - - /** - * Merge the contents of two or more objects together into the first object. - * - * @param target An object that will receive the new properties if additional objects are passed in or that will extend the jQuery namespace if it is the sole argument. - * @param object1 An object containing additional properties to merge in. - * @param objectN Additional objects containing properties to merge in. - */ - extend(target: any, object1?: any, ...objectN: any[]): any; - /** - * Merge the contents of two or more objects together into the first object. - * - * @param deep If true, the merge becomes recursive (aka. deep copy). - * @param target The object to extend. It will receive the new properties. - * @param object1 An object containing additional properties to merge in. - * @param objectN Additional objects containing properties to merge in. - */ - extend(deep: boolean, target: any, object1?: any, ...objectN: any[]): any; - - /** - * Execute some JavaScript code globally. - * - * @param code The JavaScript code to execute. - */ - globalEval(code: string): any; - - /** - * Finds the elements of an array which satisfy a filter function. The original array is not affected. - * - * @param array The array to search through. - * @param func The function to process each item against. The first argument to the function is the item, and the second argument is the index. The function should return a Boolean value. this will be the global window object. - * @param invert If "invert" is false, or not provided, then the function returns an array consisting of all elements for which "callback" returns true. If "invert" is true, then the function returns an array consisting of all elements for which "callback" returns false. - */ - grep(array: T[], func: (elementOfArray?: T, indexInArray?: number) => boolean, invert?: boolean): T[]; - - /** - * Search for a specified value within an array and return its index (or -1 if not found). - * - * @param value The value to search for. - * @param array An array through which to search. - * @param fromIndex he index of the array at which to begin the search. The default is 0, which will search the whole array. - */ - inArray(value: T, array: T[], fromIndex?: number): number; - - /** - * Determine whether the argument is an array. - * - * @param obj Object to test whether or not it is an array. - */ - isArray(obj: any): boolean; - /** - * Check to see if an object is empty (contains no enumerable properties). - * - * @param obj The object that will be checked to see if it's empty. - */ - isEmptyObject(obj: any): boolean; - /** - * Determine if the argument passed is a Javascript function object. - * - * @param obj Object to test whether or not it is a function. - */ - isFunction(obj: any): boolean; - /** - * Determines whether its argument is a number. - * - * @param obj The value to be tested. - */ - isNumeric(value: any): boolean; - /** - * Check to see if an object is a plain object (created using "{}" or "new Object"). - * - * @param obj The object that will be checked to see if it's a plain object. - */ - isPlainObject(obj: any): boolean; - /** - * Determine whether the argument is a window. - * - * @param obj Object to test whether or not it is a window. - */ - isWindow(obj: any): boolean; - /** - * Check to see if a DOM node is within an XML document (or is an XML document). - * - * @param node he DOM node that will be checked to see if it's in an XML document. - */ - isXMLDoc(node: Node): boolean; - - /** - * Convert an array-like object into a true JavaScript array. - * - * @param obj Any object to turn into a native Array. - */ - makeArray(obj: any): any[]; - - /** - * Translate all items in an array or object to new array of items. - * - * @param array The Array to translate. - * @param callback The function to process each item against. The first argument to the function is the array item, the second argument is the index in array The function can return any value. Within the function, this refers to the global (window) object. - */ - map(array: T[], callback: (elementOfArray?: T, indexInArray?: number) => U): U[]; - /** - * Translate all items in an array or object to new array of items. - * - * @param arrayOrObject The Array or Object to translate. - * @param callback The function to process each item against. The first argument to the function is the value; the second argument is the index or key of the array or object property. The function can return any value to add to the array. A returned array will be flattened into the resulting array. Within the function, this refers to the global (window) object. - */ - map(arrayOrObject: any, callback: (value?: any, indexOrKey?: any) => any): any; - - /** - * Merge the contents of two arrays together into the first array. - * - * @param first The first array to merge, the elements of second added. - * @param second The second array to merge into the first, unaltered. - */ - merge(first: T[], second: T[]): T[]; - - /** - * An empty function. - */ - noop(): any; - - /** - * Return a number representing the current time. - */ - now(): number; - - /** - * Takes a well-formed JSON string and returns the resulting JavaScript object. - * - * @param json The JSON string to parse. - */ - parseJSON(json: string): any; - - /** - * Parses a string into an XML document. - * - * @param data a well-formed XML string to be parsed - */ - parseXML(data: string): XMLDocument; - - /** - * Remove the whitespace from the beginning and end of a string. - * - * @param str Remove the whitespace from the beginning and end of a string. - */ - trim(str: string): string; - - /** - * Determine the internal JavaScript [[Class]] of an object. - * - * @param obj Object to get the internal JavaScript [[Class]] of. - */ - type(obj: any): string; - - /** - * Sorts an array of DOM elements, in place, with the duplicates removed. Note that this only works on arrays of DOM elements, not strings or numbers. - * - * @param array The Array of DOM elements. - */ - unique(array: Element[]): Element[]; - - /** - * Parses a string into an array of DOM nodes. - * - * @param data HTML string to be parsed - * @param context DOM element to serve as the context in which the HTML fragment will be created - * @param keepScripts A Boolean indicating whether to include scripts passed in the HTML string - */ - parseHTML(data: string, context?: HTMLElement, keepScripts?: boolean): any[]; - - /** - * Parses a string into an array of DOM nodes. - * - * @param data HTML string to be parsed - * @param context DOM element to serve as the context in which the HTML fragment will be created - * @param keepScripts A Boolean indicating whether to include scripts passed in the HTML string - */ - parseHTML(data: string, context?: Document, keepScripts?: boolean): any[]; -} - -/** - * The jQuery instance members - */ -interface JQuery { - /** - * Register a handler to be called when Ajax requests complete. This is an AjaxEvent. - * - * @param handler The function to be invoked. - */ - ajaxComplete(handler: (event: JQueryEventObject, XMLHttpRequest: XMLHttpRequest, ajaxOptions: any) => any): JQuery; - /** - * Register a handler to be called when Ajax requests complete with an error. This is an Ajax Event. - * - * @param handler The function to be invoked. - */ - ajaxError(handler: (event: JQueryEventObject, jqXHR: JQueryXHR, ajaxSettings: JQueryAjaxSettings, thrownError: any) => any): JQuery; - /** - * Attach a function to be executed before an Ajax request is sent. This is an Ajax Event. - * - * @param handler The function to be invoked. - */ - ajaxSend(handler: (event: JQueryEventObject, jqXHR: JQueryXHR, ajaxOptions: JQueryAjaxSettings) => any): JQuery; - /** - * Register a handler to be called when the first Ajax request begins. This is an Ajax Event. - * - * @param handler The function to be invoked. - */ - ajaxStart(handler: () => any): JQuery; - /** - * Register a handler to be called when all Ajax requests have completed. This is an Ajax Event. - * - * @param handler The function to be invoked. - */ - ajaxStop(handler: () => any): JQuery; - /** - * Attach a function to be executed whenever an Ajax request completes successfully. This is an Ajax Event. - * - * @param handler The function to be invoked. - */ - ajaxSuccess(handler: (event: JQueryEventObject, XMLHttpRequest: XMLHttpRequest, ajaxOptions: JQueryAjaxSettings) => any): JQuery; - - /** - * Load data from the server and place the returned HTML into the matched element. - * - * @param url A string containing the URL to which the request is sent. - * @param data A plain object or string that is sent to the server with the request. - * @param complete A callback function that is executed when the request completes. - */ - load(url: string, data?: string|Object, complete?: (responseText: string, textStatus: string, XMLHttpRequest: XMLHttpRequest) => any): JQuery; - - /** - * Encode a set of form elements as a string for submission. - */ - serialize(): string; - /** - * Encode a set of form elements as an array of names and values. - */ - serializeArray(): JQuerySerializeArrayElement[]; - - /** - * Adds the specified class(es) to each of the set of matched elements. - * - * @param className One or more space-separated classes to be added to the class attribute of each matched element. - */ - addClass(className: string): JQuery; - /** - * Adds the specified class(es) to each of the set of matched elements. - * - * @param function A function returning one or more space-separated class names to be added to the existing class name(s). Receives the index position of the element in the set and the existing class name(s) as arguments. Within the function, this refers to the current element in the set. - */ - addClass(func: (index: number, className: string) => string): JQuery; - - /** - * Add the previous set of elements on the stack to the current set, optionally filtered by a selector. - */ - addBack(selector?: string): JQuery; - - /** - * Get the value of an attribute for the first element in the set of matched elements. - * - * @param attributeName The name of the attribute to get. - */ - attr(attributeName: string): string; - /** - * Set one or more attributes for the set of matched elements. - * - * @param attributeName The name of the attribute to set. - * @param value A value to set for the attribute. - */ - attr(attributeName: string, value: string|number): JQuery; - /** - * Set one or more attributes for the set of matched elements. - * - * @param attributeName The name of the attribute to set. - * @param func A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old attribute value as arguments. - */ - attr(attributeName: string, func: (index: number, attr: string) => string|number): JQuery; - /** - * Set one or more attributes for the set of matched elements. - * - * @param attributes An object of attribute-value pairs to set. - */ - attr(attributes: Object): JQuery; - - /** - * Determine whether any of the matched elements are assigned the given class. - * - * @param className The class name to search for. - */ - hasClass(className: string): boolean; - - /** - * Get the HTML contents of the first element in the set of matched elements. - */ - html(): string; - /** - * Set the HTML contents of each element in the set of matched elements. - * - * @param htmlString A string of HTML to set as the content of each matched element. - */ - html(htmlString: string): JQuery; - /** - * Set the HTML contents of each element in the set of matched elements. - * - * @param func A function returning the HTML content to set. Receives the index position of the element in the set and the old HTML value as arguments. jQuery empties the element before calling the function; use the oldhtml argument to reference the previous content. Within the function, this refers to the current element in the set. - */ - html(func: (index: number, oldhtml: string) => string): JQuery; - /** - * Set the HTML contents of each element in the set of matched elements. - * - * @param func A function returning the HTML content to set. Receives the index position of the element in the set and the old HTML value as arguments. jQuery empties the element before calling the function; use the oldhtml argument to reference the previous content. Within the function, this refers to the current element in the set. - */ - - /** - * Get the value of a property for the first element in the set of matched elements. - * - * @param propertyName The name of the property to get. - */ - prop(propertyName: string): any; - /** - * Set one or more properties for the set of matched elements. - * - * @param propertyName The name of the property to set. - * @param value A value to set for the property. - */ - prop(propertyName: string, value: string|number|boolean): JQuery; - /** - * Set one or more properties for the set of matched elements. - * - * @param properties An object of property-value pairs to set. - */ - prop(properties: Object): JQuery; - /** - * Set one or more properties for the set of matched elements. - * - * @param propertyName The name of the property to set. - * @param func A function returning the value to set. Receives the index position of the element in the set and the old property value as arguments. Within the function, the keyword this refers to the current element. - */ - prop(propertyName: string, func: (index: number, oldPropertyValue: any) => any): JQuery; - - /** - * Remove an attribute from each element in the set of matched elements. - * - * @param attributeName An attribute to remove; as of version 1.7, it can be a space-separated list of attributes. - */ - removeAttr(attributeName: string): JQuery; - - /** - * Remove a single class, multiple classes, or all classes from each element in the set of matched elements. - * - * @param className One or more space-separated classes to be removed from the class attribute of each matched element. - */ - removeClass(className?: string): JQuery; - /** - * Remove a single class, multiple classes, or all classes from each element in the set of matched elements. - * - * @param function A function returning one or more space-separated class names to be removed. Receives the index position of the element in the set and the old class value as arguments. - */ - removeClass(func: (index: number, className: string) => string): JQuery; - - /** - * Remove a property for the set of matched elements. - * - * @param propertyName The name of the property to remove. - */ - removeProp(propertyName: string): JQuery; - - /** - * Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument. - * - * @param className One or more class names (separated by spaces) to be toggled for each element in the matched set. - * @param swtch A Boolean (not just truthy/falsy) value to determine whether the class should be added or removed. - */ - toggleClass(className: string, swtch?: boolean): JQuery; - /** - * Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument. - * - * @param swtch A boolean value to determine whether the class should be added or removed. - */ - toggleClass(swtch?: boolean): JQuery; - /** - * Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument. - * - * @param func A function that returns class names to be toggled in the class attribute of each element in the matched set. Receives the index position of the element in the set, the old class value, and the switch as arguments. - * @param swtch A boolean value to determine whether the class should be added or removed. - */ - toggleClass(func: (index: number, className: string, swtch: boolean) => string, swtch?: boolean): JQuery; - - /** - * Get the current value of the first element in the set of matched elements. - */ - val(): any; - /** - * Set the value of each element in the set of matched elements. - * - * @param value A string of text, an array of strings or number corresponding to the value of each matched element to set as selected/checked. - */ - val(value: string|string[]|number): JQuery; - /** - * Set the value of each element in the set of matched elements. - * - * @param func A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments. - */ - val(func: (index: number, value: string) => string): JQuery; - - - /** - * Get the value of style properties for the first element in the set of matched elements. - * - * @param propertyName A CSS property. - */ - css(propertyName: string): string; - /** - * Set one or more CSS properties for the set of matched elements. - * - * @param propertyName A CSS property name. - * @param value A value to set for the property. - */ - css(propertyName: string, value: string|number): JQuery; - /** - * Set one or more CSS properties for the set of matched elements. - * - * @param propertyName A CSS property name. - * @param value A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments. - */ - css(propertyName: string, value: (index: number, value: string) => string|number): JQuery; - /** - * Set one or more CSS properties for the set of matched elements. - * - * @param properties An object of property-value pairs to set. - */ - css(properties: Object): JQuery; - - /** - * Get the current computed height for the first element in the set of matched elements. - */ - height(): number; - /** - * Set the CSS height of every matched element. - * - * @param value An integer representing the number of pixels, or an integer with an optional unit of measure appended (as a string). - */ - height(value: number|string): JQuery; - /** - * Set the CSS height of every matched element. - * - * @param func A function returning the height to set. Receives the index position of the element in the set and the old height as arguments. Within the function, this refers to the current element in the set. - */ - height(func: (index: number, height: number) => number|string): JQuery; - - /** - * Get the current computed height for the first element in the set of matched elements, including padding but not border. - */ - innerHeight(): number; - - /** - * Sets the inner height on elements in the set of matched elements, including padding but not border. - * - * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string). - */ - innerHeight(height: number|string): JQuery; - - /** - * Get the current computed width for the first element in the set of matched elements, including padding but not border. - */ - innerWidth(): number; - - /** - * Sets the inner width on elements in the set of matched elements, including padding but not border. - * - * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string). - */ - innerWidth(width: number|string): JQuery; - - /** - * Get the current coordinates of the first element in the set of matched elements, relative to the document. - */ - offset(): JQueryCoordinates; - /** - * An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements. - * - * @param coordinates An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements. - */ - offset(coordinates: JQueryCoordinates): JQuery; - /** - * An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements. - * - * @param func A function to return the coordinates to set. Receives the index of the element in the collection as the first argument and the current coordinates as the second argument. The function should return an object with the new top and left properties. - */ - offset(func: (index: number, coords: JQueryCoordinates) => JQueryCoordinates): JQuery; - - /** - * Get the current computed height for the first element in the set of matched elements, including padding, border, and optionally margin. Returns an integer (without "px") representation of the value or null if called on an empty set of elements. - * - * @param includeMargin A Boolean indicating whether to include the element's margin in the calculation. - */ - outerHeight(includeMargin?: boolean): number; - - /** - * Sets the outer height on elements in the set of matched elements, including padding and border. - * - * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string). - */ - outerHeight(height: number|string): JQuery; - - /** - * Get the current computed width for the first element in the set of matched elements, including padding and border. - * - * @param includeMargin A Boolean indicating whether to include the element's margin in the calculation. - */ - outerWidth(includeMargin?: boolean): number; - - /** - * Sets the outer width on elements in the set of matched elements, including padding and border. - * - * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string). - */ - outerWidth(width: number|string): JQuery; - - /** - * Get the current coordinates of the first element in the set of matched elements, relative to the offset parent. - */ - position(): JQueryCoordinates; - - /** - * Get the current horizontal position of the scroll bar for the first element in the set of matched elements or set the horizontal position of the scroll bar for every matched element. - */ - scrollLeft(): number; - /** - * Set the current horizontal position of the scroll bar for each of the set of matched elements. - * - * @param value An integer indicating the new position to set the scroll bar to. - */ - scrollLeft(value: number): JQuery; - - /** - * Get the current vertical position of the scroll bar for the first element in the set of matched elements or set the vertical position of the scroll bar for every matched element. - */ - scrollTop(): number; - /** - * Set the current vertical position of the scroll bar for each of the set of matched elements. - * - * @param value An integer indicating the new position to set the scroll bar to. - */ - scrollTop(value: number): JQuery; - - /** - * Get the current computed width for the first element in the set of matched elements. - */ - width(): number; - /** - * Set the CSS width of each element in the set of matched elements. - * - * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string). - */ - width(value: number|string): JQuery; - /** - * Set the CSS width of each element in the set of matched elements. - * - * @param func A function returning the width to set. Receives the index position of the element in the set and the old width as arguments. Within the function, this refers to the current element in the set. - */ - width(func: (index: number, width: number) => number|string): JQuery; - - /** - * Remove from the queue all items that have not yet been run. - * - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - */ - clearQueue(queueName?: string): JQuery; - - /** - * Store arbitrary data associated with the matched elements. - * - * @param key A string naming the piece of data to set. - * @param value The new data value; it can be any Javascript type including Array or Object. - */ - data(key: string, value: any): JQuery; - /** - * Return the value at the named data store for the first element in the jQuery collection, as set by data(name, value) or by an HTML5 data-* attribute. - * - * @param key Name of the data stored. - */ - data(key: string): any; - /** - * Store arbitrary data associated with the matched elements. - * - * @param obj An object of key-value pairs of data to update. - */ - data(obj: { [key: string]: any; }): JQuery; - /** - * Return the value at the named data store for the first element in the jQuery collection, as set by data(name, value) or by an HTML5 data-* attribute. - */ - data(): any; - - /** - * Execute the next function on the queue for the matched elements. - * - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - */ - dequeue(queueName?: string): JQuery; - - /** - * Remove a previously-stored piece of data. - * - * @param name A string naming the piece of data to delete or space-separated string naming the pieces of data to delete. - */ - removeData(name: string): JQuery; - /** - * Remove a previously-stored piece of data. - * - * @param list An array of strings naming the pieces of data to delete. - */ - removeData(list: string[]): JQuery; - /** - * Remove all previously-stored piece of data. - */ - removeData(): JQuery; - - /** - * Return a Promise object to observe when all actions of a certain type bound to the collection, queued or not, have finished. - * - * @param type The type of queue that needs to be observed. (default: fx) - * @param target Object onto which the promise methods have to be attached - */ - promise(type?: string, target?: Object): JQueryPromise; - - /** - * Perform a custom animation of a set of CSS properties. - * - * @param properties An object of CSS properties and values that the animation will move toward. - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - animate(properties: Object, duration?: string|number, complete?: Function): JQuery; - /** - * Perform a custom animation of a set of CSS properties. - * - * @param properties An object of CSS properties and values that the animation will move toward. - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. (default: swing) - * @param complete A function to call once the animation is complete. - */ - animate(properties: Object, duration?: string|number, easing?: string, complete?: Function): JQuery; - /** - * Perform a custom animation of a set of CSS properties. - * - * @param properties An object of CSS properties and values that the animation will move toward. - * @param options A map of additional options to pass to the method. - */ - animate(properties: Object, options: JQueryAnimationOptions): JQuery; - - /** - * Set a timer to delay execution of subsequent items in the queue. - * - * @param duration An integer indicating the number of milliseconds to delay execution of the next item in the queue. - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - */ - delay(duration: number, queueName?: string): JQuery; - - /** - * Display the matched elements by fading them to opaque. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - fadeIn(duration?: number|string, complete?: Function): JQuery; - /** - * Display the matched elements by fading them to opaque. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - fadeIn(duration?: number|string, easing?: string, complete?: Function): JQuery; - /** - * Display the matched elements by fading them to opaque. - * - * @param options A map of additional options to pass to the method. - */ - fadeIn(options: JQueryAnimationOptions): JQuery; - - /** - * Hide the matched elements by fading them to transparent. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - fadeOut(duration?: number|string, complete?: Function): JQuery; - /** - * Hide the matched elements by fading them to transparent. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - fadeOut(duration?: number|string, easing?: string, complete?: Function): JQuery; - /** - * Hide the matched elements by fading them to transparent. - * - * @param options A map of additional options to pass to the method. - */ - fadeOut(options: JQueryAnimationOptions): JQuery; - - /** - * Adjust the opacity of the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param opacity A number between 0 and 1 denoting the target opacity. - * @param complete A function to call once the animation is complete. - */ - fadeTo(duration: string|number, opacity: number, complete?: Function): JQuery; - /** - * Adjust the opacity of the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param opacity A number between 0 and 1 denoting the target opacity. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - fadeTo(duration: string|number, opacity: number, easing?: string, complete?: Function): JQuery; - - /** - * Display or hide the matched elements by animating their opacity. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - fadeToggle(duration?: number|string, complete?: Function): JQuery; - /** - * Display or hide the matched elements by animating their opacity. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - fadeToggle(duration?: number|string, easing?: string, complete?: Function): JQuery; - /** - * Display or hide the matched elements by animating their opacity. - * - * @param options A map of additional options to pass to the method. - */ - fadeToggle(options: JQueryAnimationOptions): JQuery; - - /** - * Stop the currently-running animation, remove all queued animations, and complete all animations for the matched elements. - * - * @param queue The name of the queue in which to stop animations. - */ - finish(queue?: string): JQuery; - - /** - * Hide the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - hide(duration?: number|string, complete?: Function): JQuery; - /** - * Hide the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - hide(duration?: number|string, easing?: string, complete?: Function): JQuery; - /** - * Hide the matched elements. - * - * @param options A map of additional options to pass to the method. - */ - hide(options: JQueryAnimationOptions): JQuery; - - /** - * Display the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - show(duration?: number|string, complete?: Function): JQuery; - /** - * Display the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - show(duration?: number|string, easing?: string, complete?: Function): JQuery; - /** - * Display the matched elements. - * - * @param options A map of additional options to pass to the method. - */ - show(options: JQueryAnimationOptions): JQuery; - - /** - * Display the matched elements with a sliding motion. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - slideDown(duration?: number|string, complete?: Function): JQuery; - /** - * Display the matched elements with a sliding motion. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - slideDown(duration?: number|string, easing?: string, complete?: Function): JQuery; - /** - * Display the matched elements with a sliding motion. - * - * @param options A map of additional options to pass to the method. - */ - slideDown(options: JQueryAnimationOptions): JQuery; - - /** - * Display or hide the matched elements with a sliding motion. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - slideToggle(duration?: number|string, complete?: Function): JQuery; - /** - * Display or hide the matched elements with a sliding motion. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - slideToggle(duration?: number|string, easing?: string, complete?: Function): JQuery; - /** - * Display or hide the matched elements with a sliding motion. - * - * @param options A map of additional options to pass to the method. - */ - slideToggle(options: JQueryAnimationOptions): JQuery; - - /** - * Hide the matched elements with a sliding motion. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - slideUp(duration?: number|string, complete?: Function): JQuery; - /** - * Hide the matched elements with a sliding motion. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - slideUp(duration?: number|string, easing?: string, complete?: Function): JQuery; - /** - * Hide the matched elements with a sliding motion. - * - * @param options A map of additional options to pass to the method. - */ - slideUp(options: JQueryAnimationOptions): JQuery; - - /** - * Stop the currently-running animation on the matched elements. - * - * @param clearQueue A Boolean indicating whether to remove queued animation as well. Defaults to false. - * @param jumpToEnd A Boolean indicating whether to complete the current animation immediately. Defaults to false. - */ - stop(clearQueue?: boolean, jumpToEnd?: boolean): JQuery; - /** - * Stop the currently-running animation on the matched elements. - * - * @param queue The name of the queue in which to stop animations. - * @param clearQueue A Boolean indicating whether to remove queued animation as well. Defaults to false. - * @param jumpToEnd A Boolean indicating whether to complete the current animation immediately. Defaults to false. - */ - stop(queue?: string, clearQueue?: boolean, jumpToEnd?: boolean): JQuery; - - /** - * Display or hide the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - toggle(duration?: number|string, complete?: Function): JQuery; - /** - * Display or hide the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - toggle(duration?: number|string, easing?: string, complete?: Function): JQuery; - /** - * Display or hide the matched elements. - * - * @param options A map of additional options to pass to the method. - */ - toggle(options: JQueryAnimationOptions): JQuery; - /** - * Display or hide the matched elements. - * - * @param showOrHide A Boolean indicating whether to show or hide the elements. - */ - toggle(showOrHide: boolean): JQuery; - - /** - * Attach a handler to an event for the elements. - * - * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names. - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - bind(eventType: string, eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Attach a handler to an event for the elements. - * - * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names. - * @param handler A function to execute each time the event is triggered. - */ - bind(eventType: string, handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Attach a handler to an event for the elements. - * - * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names. - * @param eventData An object containing data that will be passed to the event handler. - * @param preventBubble Setting the third argument to false will attach a function that prevents the default action from occurring and stops the event from bubbling. The default is true. - */ - bind(eventType: string, eventData: any, preventBubble: boolean): JQuery; - /** - * Attach a handler to an event for the elements. - * - * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names. - * @param preventBubble Setting the third argument to false will attach a function that prevents the default action from occurring and stops the event from bubbling. The default is true. - */ - bind(eventType: string, preventBubble: boolean): JQuery; - /** - * Attach a handler to an event for the elements. - * - * @param events An object containing one or more DOM event types and functions to execute for them. - */ - bind(events: any): JQuery; - - /** - * Trigger the "blur" event on an element - */ - blur(): JQuery; - /** - * Bind an event handler to the "blur" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - */ - blur(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "blur" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - blur(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "change" event on an element. - */ - change(): JQuery; - /** - * Bind an event handler to the "change" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - */ - change(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "change" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - change(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "click" event on an element. - */ - click(): JQuery; - /** - * Bind an event handler to the "click" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - */ - click(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "click" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - click(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "contextmenu" event on an element. - */ - contextmenu(): JQuery; - /** - * Bind an event handler to the "contextmenu" JavaScript event. - * - * @param handler A function to execute when the event is triggered. - */ - contextmenu(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - /** - * Bind an event handler to the "contextmenu" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - */ - contextmenu(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - - /** - * Trigger the "dblclick" event on an element. - */ - dblclick(): JQuery; - /** - * Bind an event handler to the "dblclick" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - */ - dblclick(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "dblclick" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - dblclick(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; - - delegate(selector: any, eventType: string, handler: (eventObject: JQueryEventObject) => any): JQuery; - delegate(selector: any, eventType: string, eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "focus" event on an element. - */ - focus(): JQuery; - /** - * Bind an event handler to the "focus" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - */ - focus(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "focus" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - focus(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "focusin" event on an element. - */ - focusin(): JQuery; - /** - * Bind an event handler to the "focusin" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - */ - focusin(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "focusin" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - focusin(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "focusout" event on an element. - */ - focusout(): JQuery; - /** - * Bind an event handler to the "focusout" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - */ - focusout(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "focusout" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - focusout(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Bind two handlers to the matched elements, to be executed when the mouse pointer enters and leaves the elements. - * - * @param handlerIn A function to execute when the mouse pointer enters the element. - * @param handlerOut A function to execute when the mouse pointer leaves the element. - */ - hover(handlerIn: (eventObject: JQueryEventObject) => any, handlerOut: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind a single handler to the matched elements, to be executed when the mouse pointer enters or leaves the elements. - * - * @param handlerInOut A function to execute when the mouse pointer enters or leaves the element. - */ - hover(handlerInOut: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "keydown" event on an element. - */ - keydown(): JQuery; - /** - * Bind an event handler to the "keydown" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - */ - keydown(handler: (eventObject: JQueryKeyEventObject) => any): JQuery; - /** - * Bind an event handler to the "keydown" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - keydown(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery; - - /** - * Trigger the "keypress" event on an element. - */ - keypress(): JQuery; - /** - * Bind an event handler to the "keypress" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - */ - keypress(handler: (eventObject: JQueryKeyEventObject) => any): JQuery; - /** - * Bind an event handler to the "keypress" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - keypress(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery; - - /** - * Trigger the "keyup" event on an element. - */ - keyup(): JQuery; - /** - * Bind an event handler to the "keyup" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - */ - keyup(handler: (eventObject: JQueryKeyEventObject) => any): JQuery; - /** - * Bind an event handler to the "keyup" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - keyup(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery; - - /** - * Bind an event handler to the "load" JavaScript event. - * - * @param handler A function to execute when the event is triggered. - */ - load(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "load" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - */ - load(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "mousedown" event on an element. - */ - mousedown(): JQuery; - /** - * Bind an event handler to the "mousedown" JavaScript event. - * - * @param handler A function to execute when the event is triggered. - */ - mousedown(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - /** - * Bind an event handler to the "mousedown" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - */ - mousedown(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - - /** - * Trigger the "mouseenter" event on an element. - */ - mouseenter(): JQuery; - /** - * Bind an event handler to be fired when the mouse enters an element. - * - * @param handler A function to execute when the event is triggered. - */ - mouseenter(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - /** - * Bind an event handler to be fired when the mouse enters an element. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - */ - mouseenter(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - - /** - * Trigger the "mouseleave" event on an element. - */ - mouseleave(): JQuery; - /** - * Bind an event handler to be fired when the mouse leaves an element. - * - * @param handler A function to execute when the event is triggered. - */ - mouseleave(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - /** - * Bind an event handler to be fired when the mouse leaves an element. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - */ - mouseleave(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - - /** - * Trigger the "mousemove" event on an element. - */ - mousemove(): JQuery; - /** - * Bind an event handler to the "mousemove" JavaScript event. - * - * @param handler A function to execute when the event is triggered. - */ - mousemove(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - /** - * Bind an event handler to the "mousemove" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - */ - mousemove(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - - /** - * Trigger the "mouseout" event on an element. - */ - mouseout(): JQuery; - /** - * Bind an event handler to the "mouseout" JavaScript event. - * - * @param handler A function to execute when the event is triggered. - */ - mouseout(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - /** - * Bind an event handler to the "mouseout" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - */ - mouseout(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - - /** - * Trigger the "mouseover" event on an element. - */ - mouseover(): JQuery; - /** - * Bind an event handler to the "mouseover" JavaScript event. - * - * @param handler A function to execute when the event is triggered. - */ - mouseover(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - /** - * Bind an event handler to the "mouseover" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - */ - mouseover(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - - /** - * Trigger the "mouseup" event on an element. - */ - mouseup(): JQuery; - /** - * Bind an event handler to the "mouseup" JavaScript event. - * - * @param handler A function to execute when the event is triggered. - */ - mouseup(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - /** - * Bind an event handler to the "mouseup" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - */ - mouseup(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - - /** - * Remove an event handler. - */ - off(): JQuery; - /** - * Remove an event handler. - * - * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin". - * @param selector A selector which should match the one originally passed to .on() when attaching event handlers. - * @param handler A handler function previously attached for the event(s), or the special value false. - */ - off(events: string, selector?: string, handler?: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Remove an event handler. - * - * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin". - * @param handler A handler function previously attached for the event(s), or the special value false. Takes handler with extra args that can be attached with on(). - */ - off(events: string, handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery; - /** - * Remove an event handler. - * - * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin". - * @param handler A handler function previously attached for the event(s), or the special value false. - */ - off(events: string, handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Remove an event handler. - * - * @param events An object where the string keys represent one or more space-separated event types and optional namespaces, and the values represent handler functions previously attached for the event(s). - * @param selector A selector which should match the one originally passed to .on() when attaching event handlers. - */ - off(events: { [key: string]: any; }, selector?: string): JQuery; - - /** - * Attach an event handler function for one or more events to the selected elements. - * - * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". - * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. Rest parameter args is for optional parameters passed to jQuery.trigger(). Note that the actual parameters on the event handler function must be marked as optional (? syntax). - */ - on(events: string, handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery; - /** - * Attach an event handler function for one or more events to the selected elements. - * - * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". - * @param data Data to be passed to the handler in event.data when an event is triggered. - * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. - */ - on(events: string, data : any, handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery; - /** - * Attach an event handler function for one or more events to the selected elements. - * - * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". - * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element. - * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. - */ - on(events: string, selector: string, handler: (eventObject: JQueryEventObject, ...eventData: any[]) => any): JQuery; - /** - * Attach an event handler function for one or more events to the selected elements. - * - * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". - * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element. - * @param data Data to be passed to the handler in event.data when an event is triggered. - * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. - */ - on(events: string, selector: string, data: any, handler: (eventObject: JQueryEventObject, ...eventData: any[]) => any): JQuery; - /** - * Attach an event handler function for one or more events to the selected elements. - * - * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s). - * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If the selector is null or omitted, the handler is always called when it reaches the selected element. - * @param data Data to be passed to the handler in event.data when an event occurs. - */ - on(events: { [key: string]: any; }, selector?: string, data?: any): JQuery; - /** - * Attach an event handler function for one or more events to the selected elements. - * - * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s). - * @param data Data to be passed to the handler in event.data when an event occurs. - */ - on(events: { [key: string]: any; }, data?: any): JQuery; - - /** - * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. - * - * @param events A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names. - * @param handler A function to execute at the time the event is triggered. - */ - one(events: string, handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. - * - * @param events A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names. - * @param data An object containing data that will be passed to the event handler. - * @param handler A function to execute at the time the event is triggered. - */ - one(events: string, data: Object, handler: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. - * - * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". - * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element. - * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. - */ - one(events: string, selector: string, handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. - * - * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". - * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element. - * @param data Data to be passed to the handler in event.data when an event is triggered. - * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. - */ - one(events: string, selector: string, data: any, handler: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. - * - * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s). - * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If the selector is null or omitted, the handler is always called when it reaches the selected element. - * @param data Data to be passed to the handler in event.data when an event occurs. - */ - one(events: { [key: string]: any; }, selector?: string, data?: any): JQuery; - - /** - * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. - * - * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s). - * @param data Data to be passed to the handler in event.data when an event occurs. - */ - one(events: { [key: string]: any; }, data?: any): JQuery; - - - /** - * Specify a function to execute when the DOM is fully loaded. - * - * @param handler A function to execute after the DOM is ready. - */ - ready(handler: (jQueryAlias?: JQueryStatic) => any): JQuery; - - /** - * Trigger the "resize" event on an element. - */ - resize(): JQuery; - /** - * Bind an event handler to the "resize" JavaScript event. - * - * @param handler A function to execute each time the event is triggered. - */ - resize(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "resize" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - resize(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "scroll" event on an element. - */ - scroll(): JQuery; - /** - * Bind an event handler to the "scroll" JavaScript event. - * - * @param handler A function to execute each time the event is triggered. - */ - scroll(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "scroll" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - scroll(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "select" event on an element. - */ - select(): JQuery; - /** - * Bind an event handler to the "select" JavaScript event. - * - * @param handler A function to execute each time the event is triggered. - */ - select(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "select" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - select(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "submit" event on an element. - */ - submit(): JQuery; - /** - * Bind an event handler to the "submit" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - */ - submit(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "submit" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - submit(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Execute all handlers and behaviors attached to the matched elements for the given event type. - * - * @param eventType A string containing a JavaScript event type, such as click or submit. - * @param extraParameters Additional parameters to pass along to the event handler. - */ - trigger(eventType: string, extraParameters?: any[]|Object): JQuery; - /** - * Execute all handlers and behaviors attached to the matched elements for the given event type. - * - * @param event A jQuery.Event object. - * @param extraParameters Additional parameters to pass along to the event handler. - */ - trigger(event: JQueryEventObject, extraParameters?: any[]|Object): JQuery; - - /** - * Execute all handlers attached to an element for an event. - * - * @param eventType A string containing a JavaScript event type, such as click or submit. - * @param extraParameters An array of additional parameters to pass along to the event handler. - */ - triggerHandler(eventType: string, ...extraParameters: any[]): Object; - - /** - * Execute all handlers attached to an element for an event. - * - * @param event A jQuery.Event object. - * @param extraParameters An array of additional parameters to pass along to the event handler. - */ - triggerHandler(event: JQueryEventObject, ...extraParameters: any[]): Object; - - /** - * Remove a previously-attached event handler from the elements. - * - * @param eventType A string containing a JavaScript event type, such as click or submit. - * @param handler The function that is to be no longer executed. - */ - unbind(eventType?: string, handler?: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Remove a previously-attached event handler from the elements. - * - * @param eventType A string containing a JavaScript event type, such as click or submit. - * @param fls Unbinds the corresponding 'return false' function that was bound using .bind( eventType, false ). - */ - unbind(eventType: string, fls: boolean): JQuery; - /** - * Remove a previously-attached event handler from the elements. - * - * @param evt A JavaScript event object as passed to an event handler. - */ - unbind(evt: any): JQuery; - - /** - * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements. - */ - undelegate(): JQuery; - /** - * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements. - * - * @param selector A selector which will be used to filter the event results. - * @param eventType A string containing a JavaScript event type, such as "click" or "keydown" - * @param handler A function to execute at the time the event is triggered. - */ - undelegate(selector: string, eventType: string, handler?: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements. - * - * @param selector A selector which will be used to filter the event results. - * @param events An object of one or more event types and previously bound functions to unbind from them. - */ - undelegate(selector: string, events: Object): JQuery; - /** - * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements. - * - * @param namespace A string containing a namespace to unbind all events from. - */ - undelegate(namespace: string): JQuery; - - /** - * Bind an event handler to the "unload" JavaScript event. (DEPRECATED from v1.8) - * - * @param handler A function to execute when the event is triggered. - */ - unload(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "unload" JavaScript event. (DEPRECATED from v1.8) - * - * @param eventData A plain object of data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - */ - unload(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * The DOM node context originally passed to jQuery(); if none was passed then context will likely be the document. (DEPRECATED from v1.10) - */ - context: Element; - - jquery: string; - - /** - * Bind an event handler to the "error" JavaScript event. (DEPRECATED from v1.8) - * - * @param handler A function to execute when the event is triggered. - */ - error(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "error" JavaScript event. (DEPRECATED from v1.8) - * - * @param eventData A plain object of data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - */ - error(eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Add a collection of DOM elements onto the jQuery stack. - * - * @param elements An array of elements to push onto the stack and make into a new jQuery object. - */ - pushStack(elements: any[]): JQuery; - /** - * Add a collection of DOM elements onto the jQuery stack. - * - * @param elements An array of elements to push onto the stack and make into a new jQuery object. - * @param name The name of a jQuery method that generated the array of elements. - * @param arguments The arguments that were passed in to the jQuery method (for serialization). - */ - pushStack(elements: any[], name: string, arguments: any[]): JQuery; - - /** - * Insert content, specified by the parameter, after each element in the set of matched elements. - * - * param content1 HTML string, DOM element, DocumentFragment, array of elements, or jQuery object to insert after each element in the set of matched elements. - * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert after each element in the set of matched elements. - */ - after(content1: JQuery|any[]|Element|DocumentFragment|Text|string, ...content2: any[]): JQuery; - /** - * Insert content, specified by the parameter, after each element in the set of matched elements. - * - * param func A function that returns an HTML string, DOM element(s), or jQuery object to insert after each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set. - */ - after(func: (index: number, html: string) => string|Element|JQuery): JQuery; - - /** - * Insert content, specified by the parameter, to the end of each element in the set of matched elements. - * - * param content1 DOM element, DocumentFragment, array of elements, HTML string, or jQuery object to insert at the end of each element in the set of matched elements. - * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the end of each element in the set of matched elements. - */ - append(content1: JQuery|any[]|Element|DocumentFragment|Text|string, ...content2: any[]): JQuery; - /** - * Insert content, specified by the parameter, to the end of each element in the set of matched elements. - * - * param func A function that returns an HTML string, DOM element(s), or jQuery object to insert at the end of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set. - */ - append(func: (index: number, html: string) => string|Element|JQuery): JQuery; - - /** - * Insert every element in the set of matched elements to the end of the target. - * - * @param target A selector, element, HTML string, array of elements, or jQuery object; the matched set of elements will be inserted at the end of the element(s) specified by this parameter. - */ - appendTo(target: JQuery|any[]|Element|string): JQuery; - - /** - * Insert content, specified by the parameter, before each element in the set of matched elements. - * - * param content1 HTML string, DOM element, DocumentFragment, array of elements, or jQuery object to insert before each element in the set of matched elements. - * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert before each element in the set of matched elements. - */ - before(content1: JQuery|any[]|Element|DocumentFragment|Text|string, ...content2: any[]): JQuery; - /** - * Insert content, specified by the parameter, before each element in the set of matched elements. - * - * param func A function that returns an HTML string, DOM element(s), or jQuery object to insert before each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set. - */ - before(func: (index: number, html: string) => string|Element|JQuery): JQuery; - - /** - * Create a deep copy of the set of matched elements. - * - * param withDataAndEvents A Boolean indicating whether event handlers and data should be copied along with the elements. The default value is false. - * param deepWithDataAndEvents A Boolean indicating whether event handlers and data for all children of the cloned element should be copied. By default its value matches the first argument's value (which defaults to false). - */ - clone(withDataAndEvents?: boolean, deepWithDataAndEvents?: boolean): JQuery; - - /** - * Remove the set of matched elements from the DOM. - * - * param selector A selector expression that filters the set of matched elements to be removed. - */ - detach(selector?: string): JQuery; - - /** - * Remove all child nodes of the set of matched elements from the DOM. - */ - empty(): JQuery; - - /** - * Insert every element in the set of matched elements after the target. - * - * param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted after the element(s) specified by this parameter. - */ - insertAfter(target: JQuery|any[]|Element|Text|string): JQuery; - - /** - * Insert every element in the set of matched elements before the target. - * - * param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted before the element(s) specified by this parameter. - */ - insertBefore(target: JQuery|any[]|Element|Text|string): JQuery; - - /** - * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements. - * - * param content1 DOM element, DocumentFragment, array of elements, HTML string, or jQuery object to insert at the beginning of each element in the set of matched elements. - * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the beginning of each element in the set of matched elements. - */ - prepend(content1: JQuery|any[]|Element|DocumentFragment|Text|string, ...content2: any[]): JQuery; - /** - * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements. - * - * param func A function that returns an HTML string, DOM element(s), or jQuery object to insert at the beginning of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set. - */ - prepend(func: (index: number, html: string) => string|Element|JQuery): JQuery; - - /** - * Insert every element in the set of matched elements to the beginning of the target. - * - * @param target A selector, element, HTML string, array of elements, or jQuery object; the matched set of elements will be inserted at the beginning of the element(s) specified by this parameter. - */ - prependTo(target: JQuery|any[]|Element|string): JQuery; - - /** - * Remove the set of matched elements from the DOM. - * - * @param selector A selector expression that filters the set of matched elements to be removed. - */ - remove(selector?: string): JQuery; - - /** - * Replace each target element with the set of matched elements. - * - * @param target A selector string, jQuery object, DOM element, or array of elements indicating which element(s) to replace. - */ - replaceAll(target: JQuery|any[]|Element|string): JQuery; - - /** - * Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed. - * - * param newContent The content to insert. May be an HTML string, DOM element, array of DOM elements, or jQuery object. - */ - replaceWith(newContent: JQuery|any[]|Element|Text|string): JQuery; - /** - * Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed. - * - * param func A function that returns content with which to replace the set of matched elements. - */ - replaceWith(func: () => Element|JQuery): JQuery; - - /** - * Get the combined text contents of each element in the set of matched elements, including their descendants. - */ - text(): string; - /** - * Set the content of each element in the set of matched elements to the specified text. - * - * @param text The text to set as the content of each matched element. When Number or Boolean is supplied, it will be converted to a String representation. - */ - text(text: string|number|boolean): JQuery; - /** - * Set the content of each element in the set of matched elements to the specified text. - * - * @param func A function returning the text content to set. Receives the index position of the element in the set and the old text value as arguments. - */ - text(func: (index: number, text: string) => string): JQuery; - - /** - * Retrieve all the elements contained in the jQuery set, as an array. - * @name toArray - */ - toArray(): HTMLElement[]; - - /** - * Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place. - */ - unwrap(): JQuery; - - /** - * Wrap an HTML structure around each element in the set of matched elements. - * - * @param wrappingElement A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements. - */ - wrap(wrappingElement: JQuery|Element|string): JQuery; - /** - * Wrap an HTML structure around each element in the set of matched elements. - * - * @param func A callback function returning the HTML content or jQuery object to wrap around the matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set. - */ - wrap(func: (index: number) => string|JQuery): JQuery; - - /** - * Wrap an HTML structure around all elements in the set of matched elements. - * - * @param wrappingElement A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements. - */ - wrapAll(wrappingElement: JQuery|Element|string): JQuery; - wrapAll(func: (index: number) => string): JQuery; - - /** - * Wrap an HTML structure around the content of each element in the set of matched elements. - * - * @param wrappingElement An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap around the content of the matched elements. - */ - wrapInner(wrappingElement: JQuery|Element|string): JQuery; - /** - * Wrap an HTML structure around the content of each element in the set of matched elements. - * - * @param func A callback function which generates a structure to wrap around the content of the matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set. - */ - wrapInner(func: (index: number) => string): JQuery; - - /** - * Iterate over a jQuery object, executing a function for each matched element. - * - * @param func A function to execute for each matched element. - */ - each(func: (index: number, elem: Element) => any): JQuery; - - /** - * Retrieve one of the elements matched by the jQuery object. - * - * @param index A zero-based integer indicating which element to retrieve. - */ - get(index: number): HTMLElement; - /** - * Retrieve the elements matched by the jQuery object. - * @alias toArray - */ - get(): HTMLElement[]; - - /** - * Search for a given element from among the matched elements. - */ - index(): number; - /** - * Search for a given element from among the matched elements. - * - * @param selector A selector representing a jQuery collection in which to look for an element. - */ - index(selector: string|JQuery|Element): number; - - /** - * The number of elements in the jQuery object. - */ - length: number; - /** - * A selector representing selector passed to jQuery(), if any, when creating the original set. - * version deprecated: 1.7, removed: 1.9 - */ - selector: string; - [index: string]: any; - [index: number]: HTMLElement; - - /** - * Add elements to the set of matched elements. - * - * @param selector A string representing a selector expression to find additional elements to add to the set of matched elements. - * @param context The point in the document at which the selector should begin matching; similar to the context argument of the $(selector, context) method. - */ - add(selector: string, context?: Element): JQuery; - /** - * Add elements to the set of matched elements. - * - * @param elements One or more elements to add to the set of matched elements. - */ - add(...elements: Element[]): JQuery; - /** - * Add elements to the set of matched elements. - * - * @param html An HTML fragment to add to the set of matched elements. - */ - add(html: string): JQuery; - /** - * Add elements to the set of matched elements. - * - * @param obj An existing jQuery object to add to the set of matched elements. - */ - add(obj: JQuery): JQuery; - - /** - * Get the children of each element in the set of matched elements, optionally filtered by a selector. - * - * @param selector A string containing a selector expression to match elements against. - */ - children(selector?: string): JQuery; - - /** - * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree. - * - * @param selector A string containing a selector expression to match elements against. - */ - closest(selector: string): JQuery; - /** - * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree. - * - * @param selector A string containing a selector expression to match elements against. - * @param context A DOM element within which a matching element may be found. If no context is passed in then the context of the jQuery set will be used instead. - */ - closest(selector: string, context?: Element): JQuery; - /** - * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree. - * - * @param obj A jQuery object to match elements against. - */ - closest(obj: JQuery): JQuery; - /** - * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree. - * - * @param element An element to match elements against. - */ - closest(element: Element): JQuery; - - /** - * Get an array of all the elements and selectors matched against the current element up through the DOM tree. - * - * @param selectors An array or string containing a selector expression to match elements against (can also be a jQuery object). - * @param context A DOM element within which a matching element may be found. If no context is passed in then the context of the jQuery set will be used instead. - */ - closest(selectors: any, context?: Element): any[]; - - /** - * Get the children of each element in the set of matched elements, including text and comment nodes. - */ - contents(): JQuery; - - /** - * End the most recent filtering operation in the current chain and return the set of matched elements to its previous state. - */ - end(): JQuery; - - /** - * Reduce the set of matched elements to the one at the specified index. - * - * @param index An integer indicating the 0-based position of the element. OR An integer indicating the position of the element, counting backwards from the last element in the set. - * - */ - eq(index: number): JQuery; - - /** - * Reduce the set of matched elements to those that match the selector or pass the function's test. - * - * @param selector A string containing a selector expression to match the current set of elements against. - */ - filter(selector: string): JQuery; - /** - * Reduce the set of matched elements to those that match the selector or pass the function's test. - * - * @param func A function used as a test for each element in the set. this is the current DOM element. - */ - filter(func: (index: number, element: Element) => any): JQuery; - /** - * Reduce the set of matched elements to those that match the selector or pass the function's test. - * - * @param element An element to match the current set of elements against. - */ - filter(element: Element): JQuery; - /** - * Reduce the set of matched elements to those that match the selector or pass the function's test. - * - * @param obj An existing jQuery object to match the current set of elements against. - */ - filter(obj: JQuery): JQuery; - - /** - * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element. - * - * @param selector A string containing a selector expression to match elements against. - */ - find(selector: string): JQuery; - /** - * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element. - * - * @param element An element to match elements against. - */ - find(element: Element): JQuery; - /** - * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element. - * - * @param obj A jQuery object to match elements against. - */ - find(obj: JQuery): JQuery; - - /** - * Reduce the set of matched elements to the first in the set. - */ - first(): JQuery; - - /** - * Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element. - * - * @param selector A string containing a selector expression to match elements against. - */ - has(selector: string): JQuery; - /** - * Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element. - * - * @param contained A DOM element to match elements against. - */ - has(contained: Element): JQuery; - - /** - * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments. - * - * @param selector A string containing a selector expression to match elements against. - */ - is(selector: string): boolean; - /** - * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments. - * - * @param func A function used as a test for the set of elements. It accepts one argument, index, which is the element's index in the jQuery collection.Within the function, this refers to the current DOM element. - */ - is(func: (index: number, element: Element) => boolean): boolean; - /** - * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments. - * - * @param obj An existing jQuery object to match the current set of elements against. - */ - is(obj: JQuery): boolean; - /** - * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments. - * - * @param elements One or more elements to match the current set of elements against. - */ - is(elements: any): boolean; - - /** - * Reduce the set of matched elements to the final one in the set. - */ - last(): JQuery; - - /** - * Pass each element in the current matched set through a function, producing a new jQuery object containing the return values. - * - * @param callback A function object that will be invoked for each element in the current set. - */ - map(callback: (index: number, domElement: Element) => any): JQuery; - - /** - * Get the immediately following sibling of each element in the set of matched elements. If a selector is provided, it retrieves the next sibling only if it matches that selector. - * - * @param selector A string containing a selector expression to match elements against. - */ - next(selector?: string): JQuery; - - /** - * Get all following siblings of each element in the set of matched elements, optionally filtered by a selector. - * - * @param selector A string containing a selector expression to match elements against. - */ - nextAll(selector?: string): JQuery; - - /** - * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed. - * - * @param selector A string containing a selector expression to indicate where to stop matching following sibling elements. - * @param filter A string containing a selector expression to match elements against. - */ - nextUntil(selector?: string, filter?: string): JQuery; - /** - * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed. - * - * @param element A DOM node or jQuery object indicating where to stop matching following sibling elements. - * @param filter A string containing a selector expression to match elements against. - */ - nextUntil(element?: Element, filter?: string): JQuery; - /** - * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed. - * - * @param obj A DOM node or jQuery object indicating where to stop matching following sibling elements. - * @param filter A string containing a selector expression to match elements against. - */ - nextUntil(obj?: JQuery, filter?: string): JQuery; - - /** - * Remove elements from the set of matched elements. - * - * @param selector A string containing a selector expression to match elements against. - */ - not(selector: string): JQuery; - /** - * Remove elements from the set of matched elements. - * - * @param func A function used as a test for each element in the set. this is the current DOM element. - */ - not(func: (index: number, element: Element) => boolean): JQuery; - /** - * Remove elements from the set of matched elements. - * - * @param elements One or more DOM elements to remove from the matched set. - */ - not(elements: Element|Element[]): JQuery; - /** - * Remove elements from the set of matched elements. - * - * @param obj An existing jQuery object to match the current set of elements against. - */ - not(obj: JQuery): JQuery; - - /** - * Get the closest ancestor element that is positioned. - */ - offsetParent(): JQuery; - - /** - * Get the parent of each element in the current set of matched elements, optionally filtered by a selector. - * - * @param selector A string containing a selector expression to match elements against. - */ - parent(selector?: string): JQuery; - - /** - * Get the ancestors of each element in the current set of matched elements, optionally filtered by a selector. - * - * @param selector A string containing a selector expression to match elements against. - */ - parents(selector?: string): JQuery; - - /** - * Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object. - * - * @param selector A string containing a selector expression to indicate where to stop matching ancestor elements. - * @param filter A string containing a selector expression to match elements against. - */ - parentsUntil(selector?: string, filter?: string): JQuery; - /** - * Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object. - * - * @param element A DOM node or jQuery object indicating where to stop matching ancestor elements. - * @param filter A string containing a selector expression to match elements against. - */ - parentsUntil(element?: Element, filter?: string): JQuery; - /** - * Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object. - * - * @param obj A DOM node or jQuery object indicating where to stop matching ancestor elements. - * @param filter A string containing a selector expression to match elements against. - */ - parentsUntil(obj?: JQuery, filter?: string): JQuery; - - /** - * Get the immediately preceding sibling of each element in the set of matched elements, optionally filtered by a selector. - * - * @param selector A string containing a selector expression to match elements against. - */ - prev(selector?: string): JQuery; - - /** - * Get all preceding siblings of each element in the set of matched elements, optionally filtered by a selector. - * - * @param selector A string containing a selector expression to match elements against. - */ - prevAll(selector?: string): JQuery; - - /** - * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object. - * - * @param selector A string containing a selector expression to indicate where to stop matching preceding sibling elements. - * @param filter A string containing a selector expression to match elements against. - */ - prevUntil(selector?: string, filter?: string): JQuery; - /** - * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object. - * - * @param element A DOM node or jQuery object indicating where to stop matching preceding sibling elements. - * @param filter A string containing a selector expression to match elements against. - */ - prevUntil(element?: Element, filter?: string): JQuery; - /** - * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object. - * - * @param obj A DOM node or jQuery object indicating where to stop matching preceding sibling elements. - * @param filter A string containing a selector expression to match elements against. - */ - prevUntil(obj?: JQuery, filter?: string): JQuery; - - /** - * Get the siblings of each element in the set of matched elements, optionally filtered by a selector. - * - * @param selector A string containing a selector expression to match elements against. - */ - siblings(selector?: string): JQuery; - - /** - * Reduce the set of matched elements to a subset specified by a range of indices. - * - * @param start An integer indicating the 0-based position at which the elements begin to be selected. If negative, it indicates an offset from the end of the set. - * @param end An integer indicating the 0-based position at which the elements stop being selected. If negative, it indicates an offset from the end of the set. If omitted, the range continues until the end of the set. - */ - slice(start: number, end?: number): JQuery; - - /** - * Show the queue of functions to be executed on the matched elements. - * - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - */ - queue(queueName?: string): any[]; - /** - * Manipulate the queue of functions to be executed, once for each matched element. - * - * @param newQueue An array of functions to replace the current queue contents. - */ - queue(newQueue: Function[]): JQuery; - /** - * Manipulate the queue of functions to be executed, once for each matched element. - * - * @param callback The new function to add to the queue, with a function to call that will dequeue the next item. - */ - queue(callback: Function): JQuery; - /** - * Manipulate the queue of functions to be executed, once for each matched element. - * - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - * @param newQueue An array of functions to replace the current queue contents. - */ - queue(queueName: string, newQueue: Function[]): JQuery; - /** - * Manipulate the queue of functions to be executed, once for each matched element. - * - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - * @param callback The new function to add to the queue, with a function to call that will dequeue the next item. - */ - queue(queueName: string, callback: Function): JQuery; -} -declare module "jquery" { - export = $; -} -declare var jQuery: JQueryStatic; -declare var $: JQueryStatic; diff --git a/templates/KnockoutSpa/typings/js-signals/js-signals.d.ts b/templates/KnockoutSpa/typings/js-signals/js-signals.d.ts deleted file mode 100644 index c396bf49..00000000 --- a/templates/KnockoutSpa/typings/js-signals/js-signals.d.ts +++ /dev/null @@ -1,110 +0,0 @@ -// Type definitions for JS-Signals -// Project: http://millermedeiros.github.io/js-signals/ -// Definitions by: Diullei Gomes -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -declare var signals: SignalWrapper; - -declare module "signals" { - export = signals; -} - -interface SignalWrapper { - Signal: Signal -} - -interface SignalBinding { - active: boolean; - context: any; - params: any; - detach(): Function; - execute(paramsArr?:any[]): any; - getListener(): Function; - getSignal(): Signal; - isBound(): boolean; - isOnce(): boolean; -} - -interface Signal { - /** - * Custom event broadcaster - *
- inspired by Robert Penner's AS3 Signals. - * @name Signal - * @author Miller Medeiros - * @constructor - */ - new(): Signal; - - /** - * If Signal is active and should broadcast events. - */ - active: boolean; - - /** - * If Signal should keep record of previously dispatched parameters and automatically - * execute listener during add()/addOnce() if Signal was already dispatched before. - */ - memorize: boolean; - - /** - * Signals Version Number - */ - VERSION: string; - - /** - * Add a listener to the signal. - * - * @param listener Signal handler function. - * @param listenercontext Context on which listener will be executed (object that should represent the `this` variable inside listener function). - * @param priority The priority level of the event listener. Listeners with higher priority will be executed before listeners with lower priority. Listeners with same priority level will be executed at the same order as they were added. (default = 0) - */ - add(listener: Function, listenerContext?: any, priority?: Number): SignalBinding; - - /** - * Add listener to the signal that should be removed after first execution (will be executed only once). - * - * @param listener Signal handler function. - * @param listenercontext Context on which listener will be executed (object that should represent the `this` variable inside listener function). - * @param priority The priority level of the event listener. Listeners with higher priority will be executed before listeners with lower priority. Listeners with same priority level will be executed at the same order as they were added. (default = 0) - */ - addOnce(listener: Function, listenerContext?: any, priority?: Number): SignalBinding; - - /** - * Dispatch/Broadcast Signal to all listeners added to the queue. - * - * @param params Parameters that should be passed to each handler. - */ - dispatch(...params: any[]): void; - - /** - * Remove all bindings from signal and destroy any reference to external objects (destroy Signal object). - */ - dispose(): void; - - /** - * Forget memorized arguments. - */ - forget(): void; - - /** - * Returns a number of listeners attached to the Signal. - */ - getNumListeners(): number; - - /** - * Stop propagation of the event, blocking the dispatch to next listeners on the queue. - */ - halt(): void; - - /** - * Check if listener was attached to Signal. - */ - has(listener: Function, context?: any): boolean; - - /** - * Remove a single listener from the dispatch queue. - */ - remove(listener: Function, context?: any): Function; - - removeAll(): void; -} diff --git a/templates/KnockoutSpa/typings/knockout/knockout.d.ts b/templates/KnockoutSpa/typings/knockout/knockout.d.ts deleted file mode 100644 index 8ccbaa75..00000000 --- a/templates/KnockoutSpa/typings/knockout/knockout.d.ts +++ /dev/null @@ -1,631 +0,0 @@ -// Type definitions for Knockout v3.2.0 -// Project: http://knockoutjs.com -// Definitions by: Boris Yankov , Igor Oleinikov , Clément Bourgeois -// Definitions: https://github.com/borisyankov/DefinitelyTyped - - -interface KnockoutSubscribableFunctions { - [key: string]: KnockoutBindingHandler; - - notifySubscribers(valueToWrite?: T, event?: string): void; -} - -interface KnockoutComputedFunctions { - [key: string]: KnockoutBindingHandler; -} - -interface KnockoutObservableFunctions { - [key: string]: KnockoutBindingHandler; - - equalityComparer(a: any, b: any): boolean; -} - -interface KnockoutObservableArrayFunctions { - // General Array functions - indexOf(searchElement: T, fromIndex?: number): number; - slice(start: number, end?: number): T[]; - splice(start: number): T[]; - splice(start: number, deleteCount: number, ...items: T[]): T[]; - pop(): T; - push(...items: T[]): void; - shift(): T; - unshift(...items: T[]): number; - reverse(): KnockoutObservableArray; - sort(): KnockoutObservableArray; - sort(compareFunction: (left: T, right: T) => number): KnockoutObservableArray; - - // Ko specific - [key: string]: KnockoutBindingHandler; - - replace(oldItem: T, newItem: T): void; - - remove(item: T): T[]; - remove(removeFunction: (item: T) => boolean): T[]; - removeAll(items: T[]): T[]; - removeAll(): T[]; - - destroy(item: T): void; - destroy(destroyFunction: (item: T) => boolean): void; - destroyAll(items: T[]): void; - destroyAll(): void; -} - -interface KnockoutSubscribableStatic { - fn: KnockoutSubscribableFunctions; - - new (): KnockoutSubscribable; -} - -interface KnockoutSubscription { - dispose(): void; -} - -interface KnockoutSubscribable extends KnockoutSubscribableFunctions { - subscribe(callback: (newValue: T) => void, target?: any, event?: string): KnockoutSubscription; - subscribe(callback: (newValue: TEvent) => void, target: any, event: string): KnockoutSubscription; - extend(requestedExtenders: { [key: string]: any; }): KnockoutSubscribable; - getSubscriptionsCount(): number; -} - -interface KnockoutComputedStatic { - fn: KnockoutComputedFunctions; - - (): KnockoutComputed; - (func: () => T, context?: any, options?: any): KnockoutComputed; - (def: KnockoutComputedDefine, context?: any): KnockoutComputed; -} - -interface KnockoutComputed extends KnockoutObservable, KnockoutComputedFunctions { - fn: KnockoutComputedFunctions; - - dispose(): void; - isActive(): boolean; - getDependenciesCount(): number; - extend(requestedExtenders: { [key: string]: any; }): KnockoutComputed; -} - -interface KnockoutObservableArrayStatic { - fn: KnockoutObservableArrayFunctions; - - (value?: T[]): KnockoutObservableArray; -} - -interface KnockoutObservableArray extends KnockoutObservable, KnockoutObservableArrayFunctions { - extend(requestedExtenders: { [key: string]: any; }): KnockoutObservableArray; -} - -interface KnockoutObservableStatic { - fn: KnockoutObservableFunctions; - - (value?: T): KnockoutObservable; -} - -interface KnockoutObservable extends KnockoutSubscribable, KnockoutObservableFunctions { - (): T; - (value: T): void; - - peek(): T; - valueHasMutated?:{(): void;}; - valueWillMutate?:{(): void;}; - extend(requestedExtenders: { [key: string]: any; }): KnockoutObservable; -} - -interface KnockoutComputedDefine { - read(): T; - write? (value: T): void; - disposeWhenNodeIsRemoved?: Node; - disposeWhen? (): boolean; - owner?: any; - deferEvaluation?: boolean; - pure?: boolean; -} - -interface KnockoutBindingContext { - $parent: any; - $parents: any[]; - $root: any; - $data: any; - $rawData: any | KnockoutObservable; - $index?: KnockoutObservable; - $parentContext?: KnockoutBindingContext; - $component: any; - $componentTemplateNodes: Node[]; - - extend(properties: any): any; - createChildContext(dataItemOrAccessor: any, dataItemAlias?: any, extendCallback?: Function): any; -} - -interface KnockoutAllBindingsAccessor { - (): any; - get(name: string): any; - has(name: string): boolean; -} - -interface KnockoutBindingHandler { - after?: Array; - init?: (element: any, valueAccessor: () => any, allBindingsAccessor?: KnockoutAllBindingsAccessor, viewModel?: any, bindingContext?: KnockoutBindingContext) => void | { controlsDescendantBindings: boolean; }; - update?: (element: any, valueAccessor: () => any, allBindingsAccessor?: KnockoutAllBindingsAccessor, viewModel?: any, bindingContext?: KnockoutBindingContext) => void; - options?: any; - preprocess?: (value: string, name: string, addBindingCallback?: (name: string, value: string) => void) => string; -} - -interface KnockoutBindingHandlers { - [bindingHandler: string]: KnockoutBindingHandler; - - // Controlling text and appearance - visible: KnockoutBindingHandler; - text: KnockoutBindingHandler; - html: KnockoutBindingHandler; - css: KnockoutBindingHandler; - style: KnockoutBindingHandler; - attr: KnockoutBindingHandler; - - // Control Flow - foreach: KnockoutBindingHandler; - if: KnockoutBindingHandler; - ifnot: KnockoutBindingHandler; - with: KnockoutBindingHandler; - - // Working with form fields - click: KnockoutBindingHandler; - event: KnockoutBindingHandler; - submit: KnockoutBindingHandler; - enable: KnockoutBindingHandler; - disable: KnockoutBindingHandler; - value: KnockoutBindingHandler; - textInput: KnockoutBindingHandler; - hasfocus: KnockoutBindingHandler; - checked: KnockoutBindingHandler; - options: KnockoutBindingHandler; - selectedOptions: KnockoutBindingHandler; - uniqueName: KnockoutBindingHandler; - - // Rendering templates - template: KnockoutBindingHandler; - - // Components (new for v3.2) - component: KnockoutBindingHandler; -} - -interface KnockoutMemoization { - memoize(callback: () => string): string; - unmemoize(memoId: string, callbackParams: any[]): boolean; - unmemoizeDomNodeAndDescendants(domNode: any, extraCallbackParamsArray: any[]): boolean; - parseMemoText(memoText: string): string; -} - -interface KnockoutVirtualElement {} - -interface KnockoutVirtualElements { - allowedBindings: { [bindingName: string]: boolean; }; - emptyNode(node: KnockoutVirtualElement ): void; - firstChild(node: KnockoutVirtualElement ): KnockoutVirtualElement; - insertAfter( container: KnockoutVirtualElement, nodeToInsert: Node, insertAfter: Node ): void; - nextSibling(node: KnockoutVirtualElement): Node; - prepend(node: KnockoutVirtualElement, toInsert: Node ): void; - setDomNodeChildren(node: KnockoutVirtualElement, newChildren: { length: number;[index: number]: Node; } ): void; - childNodes(node: KnockoutVirtualElement ): Node[]; -} - -interface KnockoutExtenders { - throttle(target: any, timeout: number): KnockoutComputed; - notify(target: any, notifyWhen: string): any; - - rateLimit(target: any, timeout: number): any; - rateLimit(target: any, options: { timeout: number; method?: string; }): any; - - trackArrayChanges(target: any): any; -} - -// -// NOTE TO MAINTAINERS AND CONTRIBUTORS : pay attention to only include symbols that are -// publicly exported in the minified version of ko, without that you can give the false -// impression that some functions will be available in production builds. -// -interface KnockoutUtils { - ////////////////////////////////// - // utils.domData.js - ////////////////////////////////// - - domData: { - get (node: Element, key: string): any; - - set (node: Element, key: string, value: any): void; - - getAll(node: Element, createIfNotFound: boolean): any; - - clear(node: Element): boolean; - }; - - ////////////////////////////////// - // utils.domNodeDisposal.js - ////////////////////////////////// - - domNodeDisposal: { - addDisposeCallback(node: Element, callback: Function): void; - - removeDisposeCallback(node: Element, callback: Function): void; - - cleanNode(node: Node): Element; - - removeNode(node: Node): void; - }; - - addOrRemoveItem(array: T[] | KnockoutObservable, value: T, included: T): void; - - arrayFilter(array: T[], predicate: (item: T) => boolean): T[]; - - arrayFirst(array: T[], predicate: (item: T) => boolean, predicateOwner?: any): T; - - arrayForEach(array: T[], action: (item: T, index: number) => void): void; - - arrayGetDistinctValues(array: T[]): T[]; - - arrayIndexOf(array: T[], item: T): number; - - arrayMap(array: T[], mapping: (item: T) => U): U[]; - - arrayPushAll(array: T[] | KnockoutObservableArray, valuesToPush: T[]): T[]; - - arrayRemoveItem(array: any[], itemToRemove: any): void; - - compareArrays(a: T[], b: T[]): Array>; - - extend(target: Object, source: Object): Object; - - fieldsIncludedWithJsonPost: any[]; - - getFormFields(form: any, fieldName: string): any[]; - - objectForEach(obj: any, action: (key: any, value: any) => void): void; - - parseHtmlFragment(html: string): any[]; - - parseJson(jsonString: string): any; - - postJson(urlOrForm: any, data: any, options: any): void; - - peekObservable(value: KnockoutObservable): T; - - range(min: any, max: any): any; - - registerEventHandler(element: any, eventType: any, handler: Function): void; - - setHtml(node: Element, html: () => string): void; - - setHtml(node: Element, html: string): void; - - setTextContent(element: any, textContent: string | KnockoutObservable): void; - - stringifyJson(data: any, replacer?: Function, space?: string): string; - - toggleDomNodeCssClass(node: any, className: string, shouldHaveClass: boolean): void; - - triggerEvent(element: any, eventType: any): void; - - unwrapObservable(value: KnockoutObservable | T): T; - - // NOT PART OF THE MINIFIED API SURFACE (ONLY IN knockout-{version}.debug.js) https://github.com/SteveSanderson/knockout/issues/670 - // forceRefresh(node: any): void; - // ieVersion: number; - // isIe6: boolean; - // isIe7: boolean; - // jQueryHtmlParse(html: string): any[]; - // makeArray(arrayLikeObject: any): any[]; - // moveCleanedNodesToContainerElement(nodes: any[]): HTMLElement; - // replaceDomNodes(nodeToReplaceOrNodeArray: any, newNodesArray: any[]): void; - // setDomNodeChildren(domNode: any, childNodes: any[]): void; - // setElementName(element: any, name: string): void; - // setOptionNodeSelectionState(optionNode: any, isSelected: boolean): void; - // simpleHtmlParse(html: string): any[]; - // stringStartsWith(str: string, startsWith: string): boolean; - // stringTokenize(str: string, delimiter: string): string[]; - // stringTrim(str: string): string; - // tagNameLower(element: any): string; -} - -interface KnockoutArrayChange { - status: string; - value: T; - index: number; - moved?: number; -} - -////////////////////////////////// -// templateSources.js -////////////////////////////////// - -interface KnockoutTemplateSourcesDomElement { - text(): any; - text(value: any): void; - - data(key: string): any; - data(key: string, value: any): any; -} - -interface KnockoutTemplateAnonymous extends KnockoutTemplateSourcesDomElement { - nodes(): any; - nodes(value: any): void; -} - -interface KnockoutTemplateSources { - - domElement: { - prototype: KnockoutTemplateSourcesDomElement - new (element: Element): KnockoutTemplateSourcesDomElement - }; - - anonymousTemplate: { - prototype: KnockoutTemplateAnonymous; - new (element: Element): KnockoutTemplateAnonymous; - }; -} - -////////////////////////////////// -// nativeTemplateEngine.js -////////////////////////////////// - -interface KnockoutNativeTemplateEngine { - - renderTemplateSource(templateSource: Object, bindingContext?: KnockoutBindingContext, options?: Object): any[]; -} - -////////////////////////////////// -// templateEngine.js -////////////////////////////////// - -interface KnockoutTemplateEngine extends KnockoutNativeTemplateEngine { - - createJavaScriptEvaluatorBlock(script: string): string; - - makeTemplateSource(template: any, templateDocument?: Document): any; - - renderTemplate(template: any, bindingContext: KnockoutBindingContext, options: Object, templateDocument: Document): any; - - isTemplateRewritten(template: any, templateDocument: Document): boolean; - - rewriteTemplate(template: any, rewriterCallback: Function, templateDocument: Document): void; -} - -///////////////////////////////// - -interface KnockoutStatic { - utils: KnockoutUtils; - memoization: KnockoutMemoization; - - bindingHandlers: KnockoutBindingHandlers; - getBindingHandler(handler: string): KnockoutBindingHandler; - - virtualElements: KnockoutVirtualElements; - extenders: KnockoutExtenders; - - applyBindings(viewModelOrBindingContext?: any, rootNode?: any): void; - applyBindingsToDescendants(viewModelOrBindingContext: any, rootNode: any): void; - applyBindingAccessorsToNode(node: Node, bindings: (bindingContext: KnockoutBindingContext, node: Node) => {}, bindingContext: KnockoutBindingContext): void; - applyBindingAccessorsToNode(node: Node, bindings: {}, bindingContext: KnockoutBindingContext): void; - applyBindingAccessorsToNode(node: Node, bindings: (bindingContext: KnockoutBindingContext, node: Node) => {}, viewModel: any): void; - applyBindingAccessorsToNode(node: Node, bindings: {}, viewModel: any): void; - applyBindingsToNode(node: Node, bindings: any, viewModelOrBindingContext?: any): any; - - subscribable: KnockoutSubscribableStatic; - observable: KnockoutObservableStatic; - - computed: KnockoutComputedStatic; - pureComputed(evaluatorFunction: () => T, context?: any): KnockoutComputed; - pureComputed(options: KnockoutComputedDefine, context?: any): KnockoutComputed; - - observableArray: KnockoutObservableArrayStatic; - - contextFor(node: any): any; - isSubscribable(instance: any): boolean; - toJSON(viewModel: any, replacer?: Function, space?: any): string; - toJS(viewModel: any): any; - isObservable(instance: any): boolean; - isWriteableObservable(instance: any): boolean; - isComputed(instance: any): boolean; - dataFor(node: any): any; - removeNode(node: Element): void; - cleanNode(node: Element): Element; - renderTemplate(template: Function, viewModel: any, options?: any, target?: any, renderMode?: any): any; - renderTemplate(template: string, viewModel: any, options?: any, target?: any, renderMode?: any): any; - unwrap(value: KnockoutObservable | T): T; - - computedContext: KnockoutComputedContext; - - ////////////////////////////////// - // templateSources.js - ////////////////////////////////// - - templateSources: KnockoutTemplateSources; - - ////////////////////////////////// - // templateEngine.js - ////////////////////////////////// - - templateEngine: { - - prototype: KnockoutTemplateEngine; - - new (): KnockoutTemplateEngine; - }; - - ////////////////////////////////// - // templateRewriting.js - ////////////////////////////////// - - templateRewriting: { - - ensureTemplateIsRewritten(template: Node, templateEngine: KnockoutTemplateEngine, templateDocument: Document): any; - ensureTemplateIsRewritten(template: string, templateEngine: KnockoutTemplateEngine, templateDocument: Document): any; - - memoizeBindingAttributeSyntax(htmlString: string, templateEngine: KnockoutTemplateEngine): any; - - applyMemoizedBindingsToNextSibling(bindings: any, nodeName: string): string; - }; - - ////////////////////////////////// - // nativeTemplateEngine.js - ////////////////////////////////// - - nativeTemplateEngine: { - - prototype: KnockoutNativeTemplateEngine; - - new (): KnockoutNativeTemplateEngine; - - instance: KnockoutNativeTemplateEngine; - }; - - ////////////////////////////////// - // jqueryTmplTemplateEngine.js - ////////////////////////////////// - - jqueryTmplTemplateEngine: { - - prototype: KnockoutTemplateEngine; - - renderTemplateSource(templateSource: Object, bindingContext: KnockoutBindingContext, options: Object): Node[]; - - createJavaScriptEvaluatorBlock(script: string): string; - - addTemplate(templateName: string, templateMarkup: string): void; - }; - - ////////////////////////////////// - // templating.js - ////////////////////////////////// - - setTemplateEngine(templateEngine: KnockoutNativeTemplateEngine): void; - - renderTemplate(template: Function, dataOrBindingContext: KnockoutBindingContext, options: Object, targetNodeOrNodeArray: Node, renderMode: string): any; - renderTemplate(template: any, dataOrBindingContext: KnockoutBindingContext, options: Object, targetNodeOrNodeArray: Node, renderMode: string): any; - renderTemplate(template: Function, dataOrBindingContext: any, options: Object, targetNodeOrNodeArray: Node, renderMode: string): any; - renderTemplate(template: any, dataOrBindingContext: any, options: Object, targetNodeOrNodeArray: Node, renderMode: string): any; - renderTemplate(template: Function, dataOrBindingContext: KnockoutBindingContext, options: Object, targetNodeOrNodeArray: Node[], renderMode: string): any; - renderTemplate(template: any, dataOrBindingContext: KnockoutBindingContext, options: Object, targetNodeOrNodeArray: Node[], renderMode: string): any; - renderTemplate(template: Function, dataOrBindingContext: any, options: Object, targetNodeOrNodeArray: Node[], renderMode: string): any; - renderTemplate(template: any, dataOrBindingContext: any, options: Object, targetNodeOrNodeArray: Node[], renderMode: string): any; - - renderTemplateForEach(template: Function, arrayOrObservableArray: any[], options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any; - renderTemplateForEach(template: any, arrayOrObservableArray: any[], options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any; - renderTemplateForEach(template: Function, arrayOrObservableArray: KnockoutObservable, options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any; - renderTemplateForEach(template: any, arrayOrObservableArray: KnockoutObservable, options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any; - - expressionRewriting: { - bindingRewriteValidators: any; - parseObjectLiteral: { (objectLiteralString: string): any[] } - }; - - ///////////////////////////////// - - bindingProvider: { - instance: KnockoutBindingProvider; - new (): KnockoutBindingProvider; - } - - ///////////////////////////////// - // selectExtensions.js - ///////////////////////////////// - - selectExtensions: { - - readValue(element: HTMLElement): any; - - writeValue(element: HTMLElement, value: any): void; - }; - - components: KnockoutComponents; -} - -interface KnockoutBindingProvider { - nodeHasBindings(node: Node): boolean; - getBindings(node: Node, bindingContext: KnockoutBindingContext): {}; - getBindingAccessors?(node: Node, bindingContext: KnockoutBindingContext): { [key: string]: string; }; -} - -interface KnockoutComputedContext { - getDependenciesCount(): number; - isInitial: () => boolean; - isSleeping: boolean; -} - -// -// refactored types into a namespace to reduce global pollution -// and used Union Types to simplify overloads (requires TypeScript 1.4) -// -declare module KnockoutComponentTypes { - - interface Config { - viewModel?: ViewModelFunction | ViewModelSharedInstance | ViewModelFactoryFunction | AMDModule; - template: string | Node[]| DocumentFragment | TemplateElement | AMDModule; - synchronous?: boolean; - } - - interface ComponentConfig { - viewModel?: ViewModelFunction | ViewModelSharedInstance | ViewModelFactoryFunction | AMDModule; - template: any; - createViewModel?: any; - } - - interface EmptyConfig { - } - - // common AMD type - interface AMDModule { - require: string; - } - - // viewmodel types - interface ViewModelFunction { - (params?: any): any; - } - - interface ViewModelSharedInstance { - instance: any; - } - - interface ViewModelFactoryFunction { - createViewModel: (params?: any, componentInfo?: ComponentInfo) => any; - } - - interface ComponentInfo { - element: Node; - templateNodes: Node[]; - } - - interface TemplateElement { - element: string | Node; - } - - interface Loader { - getConfig? (componentName: string, callback: (result: ComponentConfig) => void): void; - loadComponent? (componentName: string, config: ComponentConfig, callback: (result: Definition) => void): void; - loadTemplate? (componentName: string, templateConfig: any, callback: (result: Node[]) => void): void; - loadViewModel? (componentName: string, viewModelConfig: any, callback: (result: any) => void): void; - suppressLoaderExceptions?: boolean; - } - - interface Definition { - template: Node[]; - createViewModel? (params: any, options: { element: Node; }): any; - } -} - -interface KnockoutComponents { - // overloads for register method: - register(componentName: string, config: KnockoutComponentTypes.Config | KnockoutComponentTypes.EmptyConfig): void; - - isRegistered(componentName: string): boolean; - unregister(componentName: string): void; - get(componentName: string, callback: (definition: KnockoutComponentTypes.Definition) => void): void; - clearCachedDefinition(componentName: string): void - defaultLoader: KnockoutComponentTypes.Loader; - loaders: KnockoutComponentTypes.Loader[]; - getComponentNameForNode(node: Node): string; -} - -declare var ko: KnockoutStatic; - -declare module "knockout" { - export = ko; -} diff --git a/templates/KnockoutSpa/typings/react-router/history.d.ts b/templates/KnockoutSpa/typings/react-router/history.d.ts deleted file mode 100644 index e22dbb75..00000000 --- a/templates/KnockoutSpa/typings/react-router/history.d.ts +++ /dev/null @@ -1,233 +0,0 @@ -// Type definitions for history v2.0.0 -// Project: https://github.com/rackt/history -// Definitions by: Sergey Buturlakin , Nathan Brown -// Definitions: https://github.com/borisyankov/DefinitelyTyped - - -declare namespace HistoryModule { - - // types based on https://github.com/rackt/history/blob/master/docs/Terms.md - - type Action = string - - type BeforeUnloadHook = () => string | boolean - - type CreateHistory = (options?: HistoryOptions) => T - - type CreateHistoryEnhancer = (createHistory: CreateHistory) => CreateHistory - - interface History { - listenBefore(hook: TransitionHook): () => void - listen(listener: LocationListener): () => void - transitionTo(location: Location): void - push(path: LocationDescriptor): void - replace(path: LocationDescriptor): void - go(n: number): void - goBack(): void - goForward(): void - createKey(): LocationKey - createPath(path: LocationDescriptor): Path - createHref(path: LocationDescriptor): Href - createLocation(path?: LocationDescriptor, action?: Action, key?: LocationKey): Location - - /** @deprecated use a location descriptor instead */ - createLocation(path?: Path, state?: LocationState, action?: Action, key?: LocationKey): Location - /** @deprecated use location.key to save state instead */ - pushState(state: LocationState, path: Path): void - /** @deprecated use location.key to save state instead */ - replaceState(state: LocationState, path: Path): void - /** @deprecated use location.key to save state instead */ - setState(state: LocationState): void - /** @deprecated use listenBefore instead */ - registerTransitionHook(hook: TransitionHook): void - /** @deprecated use the callback returned from listenBefore instead */ - unregisterTransitionHook(hook: TransitionHook): void - } - - type HistoryOptions = { - getCurrentLocation?: () => Location - finishTransition?: (nextLocation: Location) => boolean - saveState?: (key: LocationKey, state: LocationState) => void - go?: (n: number) => void - getUserConfirmation?: (message: string, callback: (result: boolean) => void) => void - keyLength?: number - queryKey?: string | boolean - stringifyQuery?: (obj: any) => string - parseQueryString?: (str: string) => any - basename?: string - entries?: string | [any] - current?: number - } - - type Href = string - - type Location = { - pathname: Pathname - search: Search - query: Query - state: LocationState - action: Action - key: LocationKey - basename?: string - } - - type LocationDescriptorObject = { - pathname?: Pathname - search?: Search - query?: Query - state?: LocationState - } - - type LocationDescriptor = LocationDescriptorObject | Path - - type LocationKey = string - - type LocationListener = (location: Location) => void - - type LocationState = Object - - type Path = string // Pathname + QueryString - - type Pathname = string - - type Query = Object - - type QueryString = string - - type Search = string - - type TransitionHook = (location: Location, callback: (result: any) => void) => any - - - interface HistoryBeforeUnload { - listenBeforeUnload(hook: BeforeUnloadHook): () => void - } - - interface HistoryQueries { - pushState(state: LocationState, pathname: Pathname | Path, query?: Query): void - replaceState(state: LocationState, pathname: Pathname | Path, query?: Query): void - createPath(path: Path, query?: Query): Path - createHref(path: Path, query?: Query): Href - } - - - // Global usage, without modules, needs the small trick, because lib.d.ts - // already has `history` and `History` global definitions: - // var createHistory = ((window as any).History as HistoryModule.Module).createHistory; - interface Module { - createHistory: CreateHistory - createHashHistory: CreateHistory - createMemoryHistory: CreateHistory - createLocation(path?: Path, state?: LocationState, action?: Action, key?: LocationKey): Location - useBasename(createHistory: CreateHistory): CreateHistory - useBeforeUnload(createHistory: CreateHistory): CreateHistory - useQueries(createHistory: CreateHistory): CreateHistory - actions: { - PUSH: string - REPLACE: string - POP: string - } - } - -} - - -declare module "history/lib/createBrowserHistory" { - - export default function createBrowserHistory(options?: HistoryModule.HistoryOptions): HistoryModule.History - -} - - -declare module "history/lib/createHashHistory" { - - export default function createHashHistory(options?: HistoryModule.HistoryOptions): HistoryModule.History - -} - - -declare module "history/lib/createMemoryHistory" { - - export default function createMemoryHistory(options?: HistoryModule.HistoryOptions): HistoryModule.History - -} - - -declare module "history/lib/createLocation" { - - export default function createLocation(path?: HistoryModule.Path, state?: HistoryModule.LocationState, action?: HistoryModule.Action, key?: HistoryModule.LocationKey): HistoryModule.Location - -} - - -declare module "history/lib/useBasename" { - - export default function useBasename(createHistory: HistoryModule.CreateHistory): HistoryModule.CreateHistory - -} - - -declare module "history/lib/useBeforeUnload" { - - export default function useBeforeUnload(createHistory: HistoryModule.CreateHistory): HistoryModule.CreateHistory - -} - - -declare module "history/lib/useQueries" { - - export default function useQueries(createHistory: HistoryModule.CreateHistory): HistoryModule.CreateHistory - -} - - -declare module "history/lib/actions" { - - export const PUSH: string - - export const REPLACE: string - - export const POP: string - - export default { - PUSH, - REPLACE, - POP - } - -} - -declare module "history/lib/DOMUtils" { - export function addEventListener(node: EventTarget, event: string, listener: EventListenerOrEventListenerObject): void; - export function removeEventListener(node: EventTarget, event: string, listener: EventListenerOrEventListenerObject): void; - export function getHashPath(): string; - export function replaceHashPath(path: string): void; - export function getWindowPath(): string; - export function go(n: number): void; - export function getUserConfirmation(message: string, callback: (result: boolean) => void): void; - export function supportsHistory(): boolean; - export function supportsGoWithoutReloadUsingHash(): boolean; -} - - -declare module "history" { - - export { default as createHistory } from "history/lib/createBrowserHistory" - - export { default as createHashHistory } from "history/lib/createHashHistory" - - export { default as createMemoryHistory } from "history/lib/createMemoryHistory" - - export { default as createLocation } from "history/lib/createLocation" - - export { default as useBasename } from "history/lib/useBasename" - - export { default as useBeforeUnload } from "history/lib/useBeforeUnload" - - export { default as useQueries } from "history/lib/useQueries" - - import * as Actions from "history/lib/actions" - - export { Actions } - -} diff --git a/templates/KnockoutSpa/typings/requirejs/require.d.ts b/templates/KnockoutSpa/typings/requirejs/require.d.ts deleted file mode 100644 index e9cdb3e8..00000000 --- a/templates/KnockoutSpa/typings/requirejs/require.d.ts +++ /dev/null @@ -1,397 +0,0 @@ -// Type definitions for RequireJS 2.1.20 -// Project: http://requirejs.org/ -// Definitions by: Josh Baldwin -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/* -require-2.1.8.d.ts may be freely distributed under the MIT license. - -Copyright (c) 2013 Josh Baldwin https://github.com/jbaldwin/require.d.ts - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. -*/ - -declare module 'module' { - var mod: { - config: () => any; - id: string; - uri: string; - } - export = mod; -} - -interface RequireError extends Error { - - /** - * The error ID that maps to an ID on a web page. - **/ - requireType: string; - - /** - * Required modules. - **/ - requireModules: string[]; - - /** - * The original error, if there is one (might be null). - **/ - originalError: Error; -} - -interface RequireShim { - - /** - * List of dependencies. - **/ - deps?: string[]; - - /** - * Name the module will be exported as. - **/ - exports?: string; - - /** - * Initialize function with all dependcies passed in, - * if the function returns a value then that value is used - * as the module export value instead of the object - * found via the 'exports' string. - * @param dependencies - * @return - **/ - init?: (...dependencies: any[]) => any; -} - -interface RequireConfig { - - // The root path to use for all module lookups. - baseUrl?: string; - - // Path mappings for module names not found directly under - // baseUrl. - paths?: { [key: string]: any; }; - - - // Dictionary of Shim's. - // does not cover case of key->string[] - shim?: { [key: string]: RequireShim; }; - - /** - * For the given module prefix, instead of loading the - * module with the given ID, substitude a different - * module ID. - * - * @example - * requirejs.config({ - * map: { - * 'some/newmodule': { - * 'foo': 'foo1.2' - * }, - * 'some/oldmodule': { - * 'foo': 'foo1.0' - * } - * } - * }); - **/ - map?: { - [id: string]: { - [id: string]: string; - }; - }; - - /** - * Allows pointing multiple module IDs to a module ID that contains a bundle of modules. - * - * @example - * requirejs.config({ - * bundles: { - * 'primary': ['main', 'util', 'text', 'text!template.html'], - * 'secondary': ['text!secondary.html'] - * } - * }); - **/ - bundles?: { [key: string]: string[]; }; - - /** - * AMD configurations, use module.config() to access in - * define() functions - **/ - config?: { [id: string]: {}; }; - - /** - * Configures loading modules from CommonJS packages. - **/ - packages?: {}; - - /** - * The number of seconds to wait before giving up on loading - * a script. The default is 7 seconds. - **/ - waitSeconds?: number; - - /** - * A name to give to a loading context. This allows require.js - * to load multiple versions of modules in a page, as long as - * each top-level require call specifies a unique context string. - **/ - context?: string; - - /** - * An array of dependencies to load. - **/ - deps?: string[]; - - /** - * A function to pass to require that should be require after - * deps have been loaded. - * @param modules - **/ - callback?: (...modules: any[]) => void; - - /** - * If set to true, an error will be thrown if a script loads - * that does not call define() or have shim exports string - * value that can be checked. - **/ - enforceDefine?: boolean; - - /** - * If set to true, document.createElementNS() will be used - * to create script elements. - **/ - xhtml?: boolean; - - /** - * Extra query string arguments appended to URLs that RequireJS - * uses to fetch resources. Most useful to cache bust when - * the browser or server is not configured correctly. - * - * @example - * urlArgs: "bust= + (new Date()).getTime() - **/ - urlArgs?: string; - - /** - * Specify the value for the type="" attribute used for script - * tags inserted into the document by RequireJS. Default is - * "text/javascript". To use Firefox's JavasScript 1.8 - * features, use "text/javascript;version=1.8". - **/ - scriptType?: string; - - /** - * If set to true, skips the data-main attribute scanning done - * to start module loading. Useful if RequireJS is embedded in - * a utility library that may interact with other RequireJS - * library on the page, and the embedded version should not do - * data-main loading. - **/ - skipDataMain?: boolean; - - /** - * Allow extending requirejs to support Subresource Integrity - * (SRI). - **/ - onNodeCreated?: (node: HTMLScriptElement, config: RequireConfig, moduleName: string, url: string) => void; -} - -// todo: not sure what to do with this guy -interface RequireModule { - - /** - * - **/ - config(): {}; - -} - -/** -* -**/ -interface RequireMap { - - /** - * - **/ - prefix: string; - - /** - * - **/ - name: string; - - /** - * - **/ - parentMap: RequireMap; - - /** - * - **/ - url: string; - - /** - * - **/ - originalName: string; - - /** - * - **/ - fullName: string; -} - -interface Require { - - /** - * Configure require.js - **/ - config(config: RequireConfig): Require; - - /** - * CommonJS require call - * @param module Module to load - * @return The loaded module - */ - (module: string): any; - - /** - * Start the main app logic. - * Callback is optional. - * Can alternatively use deps and callback. - * @param modules Required modules to load. - **/ - (modules: string[]): void; - - /** - * @see Require() - * @param ready Called when required modules are ready. - **/ - (modules: string[], ready: Function): void; - - /** - * @see http://requirejs.org/docs/api.html#errbacks - * @param ready Called when required modules are ready. - **/ - (modules: string[], ready: Function, errback: Function): void; - - /** - * Generate URLs from require module - * @param module Module to URL - * @return URL string - **/ - toUrl(module: string): string; - - /** - * Returns true if the module has already been loaded and defined. - * @param module Module to check - **/ - defined(module: string): boolean; - - /** - * Returns true if the module has already been requested or is in the process of loading and should be available at some point. - * @param module Module to check - **/ - specified(module: string): boolean; - - /** - * On Error override - * @param err - **/ - onError(err: RequireError, errback?: (err: RequireError) => void): void; - - /** - * Undefine a module - * @param module Module to undefine. - **/ - undef(module: string): void; - - /** - * Semi-private function, overload in special instance of undef() - **/ - onResourceLoad(context: Object, map: RequireMap, depArray: RequireMap[]): void; -} - -interface RequireDefine { - - /** - * Define Simple Name/Value Pairs - * @param config Dictionary of Named/Value pairs for the config. - **/ - (config: { [key: string]: any; }): void; - - /** - * Define function. - * @param func: The function module. - **/ - (func: () => any): void; - - /** - * Define function with dependencies. - * @param deps List of dependencies module IDs. - * @param ready Callback function when the dependencies are loaded. - * callback param deps module dependencies - * callback return module definition - **/ - (deps: string[], ready: Function): void; - - /** - * Define module with simplified CommonJS wrapper. - * @param ready - * callback require requirejs instance - * callback exports exports object - * callback module module - * callback return module definition - **/ - (ready: (require: Require, exports: { [key: string]: any; }, module: RequireModule) => any): void; - - /** - * Define a module with a name and dependencies. - * @param name The name of the module. - * @param deps List of dependencies module IDs. - * @param ready Callback function when the dependencies are loaded. - * callback deps module dependencies - * callback return module definition - **/ - (name: string, deps: string[], ready: Function): void; - - /** - * Define a module with a name. - * @param name The name of the module. - * @param ready Callback function when the dependencies are loaded. - * callback return module definition - **/ - (name: string, ready: Function): void; - - /** - * Used to allow a clear indicator that a global define function (as needed for script src browser loading) conforms - * to the AMD API, any global define function SHOULD have a property called "amd" whose value is an object. - * This helps avoid conflict with any other existing JavaScript code that could have defined a define() function - * that does not conform to the AMD API. - * define.amd.jQuery is specific to jQuery and indicates that the loader is able to account for multiple version - * of jQuery being loaded simultaneously. - */ - amd: Object; -} - -// Ambient declarations for 'require' and 'define' -declare var requirejs: Require; -declare var require: Require; -declare var define: RequireDefine; diff --git a/templates/KnockoutSpa/typings/tsd.d.ts b/templates/KnockoutSpa/typings/tsd.d.ts deleted file mode 100644 index eb28c85e..00000000 --- a/templates/KnockoutSpa/typings/tsd.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/// -/// -/// -/// -/// -/// -/// -/// -/// diff --git a/templates/ReactReduxSpa/ClientApp/configureStore.ts b/templates/ReactReduxSpa/ClientApp/configureStore.ts index 3ce14319..625c3e31 100644 --- a/templates/ReactReduxSpa/ClientApp/configureStore.ts +++ b/templates/ReactReduxSpa/ClientApp/configureStore.ts @@ -1,14 +1,14 @@ -import { createStore, applyMiddleware, compose, combineReducers } from 'redux'; -import * as thunkModule from 'redux-thunk'; +import { Store as ReduxStore, createStore, applyMiddleware, compose, combineReducers, GenericStoreEnhancer } from 'redux'; +import thunk from 'redux-thunk'; import { routerReducer } from 'react-router-redux'; import * as Store from './store'; import { typedToPlain } from 'redux-typed'; export default function configureStore(initialState?: Store.ApplicationState) { // Build middleware. These are functions that can process the actions before they reach the store. - const thunk = (thunkModule as any).default; // Workaround for TypeScript not importing thunk module as expected const windowIfDefined = typeof window === 'undefined' ? null : window as any; - const devToolsExtension = windowIfDefined && windowIfDefined.devToolsExtension; // If devTools is installed, connect to it + // If devTools is installed, connect to it + const devToolsExtension = windowIfDefined && windowIfDefined.devToolsExtension as () => GenericStoreEnhancer; const createStoreWithMiddleware = compose( applyMiddleware(thunk, typedToPlain), devToolsExtension ? devToolsExtension() : f => f @@ -16,7 +16,7 @@ export default function configureStore(initialState?: Store.ApplicationState) { // Combine all reducers and instantiate the app-wide store instance const allReducers = buildRootReducer(Store.reducers); - const store = createStoreWithMiddleware(allReducers, initialState) as Redux.Store; + const store = createStoreWithMiddleware(allReducers, initialState) as Redux.Store; // Enable Webpack hot module replacement for reducers if (module.hot) { @@ -30,5 +30,5 @@ export default function configureStore(initialState?: Store.ApplicationState) { } function buildRootReducer(allReducers) { - return combineReducers(Object.assign({}, allReducers, { routing: routerReducer })) as Redux.Reducer; -} + return combineReducers(Object.assign({}, allReducers, { routing: routerReducer })); +} \ No newline at end of file diff --git a/templates/ReactReduxSpa/package.json b/templates/ReactReduxSpa/package.json index b162b688..81987e0f 100644 --- a/templates/ReactReduxSpa/package.json +++ b/templates/ReactReduxSpa/package.json @@ -2,8 +2,20 @@ "name": "WebApplicationBasic", "version": "0.0.0", "dependencies": { - "aspnet-prerendering": "^1.0.2", - "aspnet-webpack": "^1.0.6", + "@types/react": "^0.14.29", + "@types/react-dom": "^0.14.14", + "@types/react-redux": "^4.4.29", + "@types/react-router": "^2.0.30", + "@types/react-router-redux": "^4.0.30", + "@types/redux": "3.5.27", + "@types/redux-thunk": "^2.1.28", + "@types/source-map": "^0.1.28", + "@types/uglify-js": "^2.0.27", + "@types/webpack": "^1.12.35", + "@types/webpack-env": "^1.12.1", + "@types/whatwg-fetch": "0.0.28", + "aspnet-prerendering": "^1.0.7", + "aspnet-webpack": "^1.0.17", "aspnet-webpack-react": "^1.0.2", "babel-core": "^6.5.2", "babel-loader": "^6.2.3", @@ -11,26 +23,26 @@ "babel-preset-react": "^6.5.0", "bootstrap": "^3.3.6", "css-loader": "^0.23.1", - "domain-task": "^2.0.0", + "domain-task": "^2.0.1", "event-source-polyfill": "^0.0.7", "extract-text-webpack-plugin": "^1.0.1", "file-loader": "^0.8.5", "jquery": "^2.2.1", - "react": "^15.0.1", - "react-dom": "^15.0.1", - "react-redux": "^4.4.4", - "react-router": "^2.1.1", - "react-router-redux": "^4.0.2", - "redux": "^3.4.0", - "redux-thunk": "^2.0.1", + "react": "^15.3.2", + "react-dom": "^15.3.2", + "react-redux": "^4.4.5", + "react-router": "^2.8.1", + "react-router-redux": "^4.0.6", + "redux": "^3.6.0", + "redux-thunk": "^2.1.0", "redux-typed": "^1.0.0", "style-loader": "^0.13.0", "ts-loader": "^0.8.1", - "typescript": "^1.8.2", + "typescript": "2.0.3", "url-loader": "^0.5.7", - "webpack": "^1.12.14", + "webpack": "^1.13.2", "webpack-node-externals": "^1.4.3", - "webpack-hot-middleware": "^2.10.0", + "webpack-hot-middleware": "^2.12.2", "webpack-merge": "^0.14.1" } } diff --git a/templates/ReactReduxSpa/tsconfig.json b/templates/ReactReduxSpa/tsconfig.json index c5ae2118..8c341ca2 100644 --- a/templates/ReactReduxSpa/tsconfig.json +++ b/templates/ReactReduxSpa/tsconfig.json @@ -5,7 +5,11 @@ "jsx": "preserve", "experimentalDecorators": true, "sourceMap": true, - "skipDefaultLibCheck": true + "skipDefaultLibCheck": true, + "lib": ["es6", "dom"], + "types": [ "react", "react-dom", "react-redux", "react-router", "react-router-redux", + "redux", "redux-thunk", "source-map", "uglify-js", "webpack", "webpack-env", + "whatwg-fetch" ] }, "exclude": [ "bin", diff --git a/templates/ReactReduxSpa/tsd.json b/templates/ReactReduxSpa/tsd.json deleted file mode 100644 index 6015daa5..00000000 --- a/templates/ReactReduxSpa/tsd.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "version": "v4", - "repo": "borisyankov/DefinitelyTyped", - "ref": "master", - "path": "typings", - "bundle": "typings/tsd.d.ts", - "installed": { - "react/react.d.ts": { - "commit": "9f0f926a12026287b5a4a229e5672c01e7549313" - }, - "react-router/react-router.d.ts": { - "commit": "9f0f926a12026287b5a4a229e5672c01e7549313" - }, - "react/react-dom.d.ts": { - "commit": "dade4414712ce84e3c63393f1aae407e9e7e6af7" - }, - "react-router/history.d.ts": { - "commit": "9f0f926a12026287b5a4a229e5672c01e7549313" - }, - "whatwg-fetch/whatwg-fetch.d.ts": { - "commit": "dade4414712ce84e3c63393f1aae407e9e7e6af7" - }, - "react-redux/react-redux.d.ts": { - "commit": "9f0f926a12026287b5a4a229e5672c01e7549313" - }, - "redux/redux.d.ts": { - "commit": "9f0f926a12026287b5a4a229e5672c01e7549313" - }, - "react-router-redux/react-router-redux.d.ts": { - "commit": "9f0f926a12026287b5a4a229e5672c01e7549313" - }, - "redux-thunk/redux-thunk.d.ts": { - "commit": "9f0f926a12026287b5a4a229e5672c01e7549313" - }, - "uglify-js/uglify-js.d.ts": { - "commit": "9f0f926a12026287b5a4a229e5672c01e7549313" - }, - "source-map/source-map.d.ts": { - "commit": "9f0f926a12026287b5a4a229e5672c01e7549313" - }, - "webpack/webpack-env.d.ts": { - "commit": "9f0f926a12026287b5a4a229e5672c01e7549313" - } - } -} diff --git a/templates/ReactReduxSpa/typings/react-redux/react-redux.d.ts b/templates/ReactReduxSpa/typings/react-redux/react-redux.d.ts deleted file mode 100644 index 9c46fd10..00000000 --- a/templates/ReactReduxSpa/typings/react-redux/react-redux.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -// Type definitions for react-redux 4.4.0 -// Project: https://github.com/rackt/react-redux -// Definitions by: Qubo -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// -/// - -declare module "react-redux" { - import { ComponentClass, Component, StatelessComponent } from 'react'; - import { Store, Dispatch, ActionCreator } from 'redux'; - - export interface ComponentConstructDecorator

{ - |StatelessComponent

)>(component: TComponentConstruct): TComponentConstruct - } - - /** - * Connects a React component to a Redux store. - * @param mapStateToProps - * @param mapDispatchToProps - * @param mergeProps - * @param options - */ - export function connect

(mapStateToProps?: MapStateToProps, - mapDispatchToProps?: MapDispatchToPropsFunction|MapDispatchToPropsObject, - mergeProps?: MergeProps, - options?: Options): ComponentConstructDecorator

; - - interface MapStateToProps { - (state: any, ownProps?: any): any; - } - - interface MapDispatchToPropsFunction { - (dispatch: Dispatch, ownProps?: any): any; - } - - interface MapDispatchToPropsObject { - [name: string]: ActionCreator; - } - - interface MergeProps { - (stateProps: any, dispatchProps: any, ownProps: any): any; - } - - interface Options { - /** - * If true, implements shouldComponentUpdate and shallowly compares the result of mergeProps, - * preventing unnecessary updates, assuming that the component is a “pure” component - * and does not rely on any input or state other than its props and the selected Redux store’s state. - * Defaults to true. - * @default true - */ - pure: boolean; - } - - export interface Property { - /** - * The single Redux store in your application. - */ - store?: Store; - children?: Function; - } - - /** - * Makes the Redux store available to the connect() calls in the component hierarchy below. - */ - export class Provider extends Component { } -} diff --git a/templates/ReactReduxSpa/typings/react-router-redux/react-router-redux.d.ts b/templates/ReactReduxSpa/typings/react-router-redux/react-router-redux.d.ts deleted file mode 100644 index 168161a1..00000000 --- a/templates/ReactReduxSpa/typings/react-router-redux/react-router-redux.d.ts +++ /dev/null @@ -1,62 +0,0 @@ -// Type definitions for react-router-redux v4.0.0 -// Project: https://github.com/rackt/react-router-redux -// Definitions by: Isman Usoh , Noah Shipley , Dimitri Rosenberg -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// -/// - -declare namespace ReactRouterRedux { - import R = Redux; - import H = HistoryModule; - - const CALL_HISTORY_METHOD: string; - const LOCATION_CHANGE: string; - - const push: PushAction; - const replace: ReplaceAction; - const go: GoAction; - const goBack: GoForwardAction; - const goForward: GoBackAction; - const routerActions: RouteActions; - - type LocationDescriptor = H.Location | H.Path; - type PushAction = (nextLocation: LocationDescriptor) => RouterAction; - type ReplaceAction = (nextLocation: LocationDescriptor) => RouterAction; - type GoAction = (n: number) => RouterAction; - type GoForwardAction = () => RouterAction; - type GoBackAction = () => RouterAction; - - type RouterAction = { - type: string - payload?: any - } - - interface RouteActions { - push: PushAction; - replace: ReplaceAction; - go: GoAction; - goForward: GoForwardAction; - goBack: GoBackAction; - } - interface ReactRouterReduxHistory extends H.History { - unsubscribe(): void; - } - - interface DefaultSelectLocationState extends Function { - (state: any): any; - } - - interface SyncHistoryWithStoreOptions { - selectLocationState?: DefaultSelectLocationState; - adjustUrlOnReplay?: boolean; - } - - function routerReducer(state?: any, options?: any): R.Reducer; - function syncHistoryWithStore(history: H.History, store: R.Store, options?: SyncHistoryWithStoreOptions): ReactRouterReduxHistory; - function routerMiddleware(history: H.History): R.Middleware; -} - -declare module "react-router-redux" { - export = ReactRouterRedux; -} diff --git a/templates/ReactReduxSpa/typings/react-router/history.d.ts b/templates/ReactReduxSpa/typings/react-router/history.d.ts deleted file mode 100644 index e22dbb75..00000000 --- a/templates/ReactReduxSpa/typings/react-router/history.d.ts +++ /dev/null @@ -1,233 +0,0 @@ -// Type definitions for history v2.0.0 -// Project: https://github.com/rackt/history -// Definitions by: Sergey Buturlakin , Nathan Brown -// Definitions: https://github.com/borisyankov/DefinitelyTyped - - -declare namespace HistoryModule { - - // types based on https://github.com/rackt/history/blob/master/docs/Terms.md - - type Action = string - - type BeforeUnloadHook = () => string | boolean - - type CreateHistory = (options?: HistoryOptions) => T - - type CreateHistoryEnhancer = (createHistory: CreateHistory) => CreateHistory - - interface History { - listenBefore(hook: TransitionHook): () => void - listen(listener: LocationListener): () => void - transitionTo(location: Location): void - push(path: LocationDescriptor): void - replace(path: LocationDescriptor): void - go(n: number): void - goBack(): void - goForward(): void - createKey(): LocationKey - createPath(path: LocationDescriptor): Path - createHref(path: LocationDescriptor): Href - createLocation(path?: LocationDescriptor, action?: Action, key?: LocationKey): Location - - /** @deprecated use a location descriptor instead */ - createLocation(path?: Path, state?: LocationState, action?: Action, key?: LocationKey): Location - /** @deprecated use location.key to save state instead */ - pushState(state: LocationState, path: Path): void - /** @deprecated use location.key to save state instead */ - replaceState(state: LocationState, path: Path): void - /** @deprecated use location.key to save state instead */ - setState(state: LocationState): void - /** @deprecated use listenBefore instead */ - registerTransitionHook(hook: TransitionHook): void - /** @deprecated use the callback returned from listenBefore instead */ - unregisterTransitionHook(hook: TransitionHook): void - } - - type HistoryOptions = { - getCurrentLocation?: () => Location - finishTransition?: (nextLocation: Location) => boolean - saveState?: (key: LocationKey, state: LocationState) => void - go?: (n: number) => void - getUserConfirmation?: (message: string, callback: (result: boolean) => void) => void - keyLength?: number - queryKey?: string | boolean - stringifyQuery?: (obj: any) => string - parseQueryString?: (str: string) => any - basename?: string - entries?: string | [any] - current?: number - } - - type Href = string - - type Location = { - pathname: Pathname - search: Search - query: Query - state: LocationState - action: Action - key: LocationKey - basename?: string - } - - type LocationDescriptorObject = { - pathname?: Pathname - search?: Search - query?: Query - state?: LocationState - } - - type LocationDescriptor = LocationDescriptorObject | Path - - type LocationKey = string - - type LocationListener = (location: Location) => void - - type LocationState = Object - - type Path = string // Pathname + QueryString - - type Pathname = string - - type Query = Object - - type QueryString = string - - type Search = string - - type TransitionHook = (location: Location, callback: (result: any) => void) => any - - - interface HistoryBeforeUnload { - listenBeforeUnload(hook: BeforeUnloadHook): () => void - } - - interface HistoryQueries { - pushState(state: LocationState, pathname: Pathname | Path, query?: Query): void - replaceState(state: LocationState, pathname: Pathname | Path, query?: Query): void - createPath(path: Path, query?: Query): Path - createHref(path: Path, query?: Query): Href - } - - - // Global usage, without modules, needs the small trick, because lib.d.ts - // already has `history` and `History` global definitions: - // var createHistory = ((window as any).History as HistoryModule.Module).createHistory; - interface Module { - createHistory: CreateHistory - createHashHistory: CreateHistory - createMemoryHistory: CreateHistory - createLocation(path?: Path, state?: LocationState, action?: Action, key?: LocationKey): Location - useBasename(createHistory: CreateHistory): CreateHistory - useBeforeUnload(createHistory: CreateHistory): CreateHistory - useQueries(createHistory: CreateHistory): CreateHistory - actions: { - PUSH: string - REPLACE: string - POP: string - } - } - -} - - -declare module "history/lib/createBrowserHistory" { - - export default function createBrowserHistory(options?: HistoryModule.HistoryOptions): HistoryModule.History - -} - - -declare module "history/lib/createHashHistory" { - - export default function createHashHistory(options?: HistoryModule.HistoryOptions): HistoryModule.History - -} - - -declare module "history/lib/createMemoryHistory" { - - export default function createMemoryHistory(options?: HistoryModule.HistoryOptions): HistoryModule.History - -} - - -declare module "history/lib/createLocation" { - - export default function createLocation(path?: HistoryModule.Path, state?: HistoryModule.LocationState, action?: HistoryModule.Action, key?: HistoryModule.LocationKey): HistoryModule.Location - -} - - -declare module "history/lib/useBasename" { - - export default function useBasename(createHistory: HistoryModule.CreateHistory): HistoryModule.CreateHistory - -} - - -declare module "history/lib/useBeforeUnload" { - - export default function useBeforeUnload(createHistory: HistoryModule.CreateHistory): HistoryModule.CreateHistory - -} - - -declare module "history/lib/useQueries" { - - export default function useQueries(createHistory: HistoryModule.CreateHistory): HistoryModule.CreateHistory - -} - - -declare module "history/lib/actions" { - - export const PUSH: string - - export const REPLACE: string - - export const POP: string - - export default { - PUSH, - REPLACE, - POP - } - -} - -declare module "history/lib/DOMUtils" { - export function addEventListener(node: EventTarget, event: string, listener: EventListenerOrEventListenerObject): void; - export function removeEventListener(node: EventTarget, event: string, listener: EventListenerOrEventListenerObject): void; - export function getHashPath(): string; - export function replaceHashPath(path: string): void; - export function getWindowPath(): string; - export function go(n: number): void; - export function getUserConfirmation(message: string, callback: (result: boolean) => void): void; - export function supportsHistory(): boolean; - export function supportsGoWithoutReloadUsingHash(): boolean; -} - - -declare module "history" { - - export { default as createHistory } from "history/lib/createBrowserHistory" - - export { default as createHashHistory } from "history/lib/createHashHistory" - - export { default as createMemoryHistory } from "history/lib/createMemoryHistory" - - export { default as createLocation } from "history/lib/createLocation" - - export { default as useBasename } from "history/lib/useBasename" - - export { default as useBeforeUnload } from "history/lib/useBeforeUnload" - - export { default as useQueries } from "history/lib/useQueries" - - import * as Actions from "history/lib/actions" - - export { Actions } - -} diff --git a/templates/ReactReduxSpa/typings/react-router/react-router.d.ts b/templates/ReactReduxSpa/typings/react-router/react-router.d.ts deleted file mode 100644 index e87622e9..00000000 --- a/templates/ReactReduxSpa/typings/react-router/react-router.d.ts +++ /dev/null @@ -1,480 +0,0 @@ -// Type definitions for react-router v2.0.0 -// Project: https://github.com/rackt/react-router -// Definitions by: Sergey Buturlakin , Yuichi Murata , Václav Ostrožlík , Nathan Brown -// Definitions: https://github.com/borisyankov/DefinitelyTyped - - -/// -/// - - -declare namespace ReactRouter { - - import React = __React - - import H = HistoryModule - - // types based on https://github.com/rackt/react-router/blob/master/docs/Glossary.md - - type Component = React.ReactType - - type EnterHook = (nextState: RouterState, replaceState: RedirectFunction, callback?: Function) => any - - type LeaveHook = () => any - - type Params = Object - - type ParseQueryString = (queryString: H.QueryString) => H.Query - - type RedirectFunction = (state: H.LocationState, pathname: H.Pathname | H.Path, query?: H.Query) => void - - type RouteComponent = Component - - // use the following interface in an app code to get access to route param values, history, location... - // interface MyComponentProps extends ReactRouter.RouteComponentProps<{}, { id: number }> {} - // somewhere in MyComponent - // ... - // let id = this.props.routeParams.id - // ... - // this.props.history. ... - // ... - interface RouteComponentProps { - history?: History - location?: H.Location - params?: P - route?: PlainRoute - routeParams?: R - routes?: PlainRoute[] - children?: React.ReactElement - } - - type RouteComponents = { [key: string]: RouteComponent } - - type RouteConfig = React.ReactNode | PlainRoute | PlainRoute[] - - type RouteHook = (nextLocation?: H.Location) => any - - type RoutePattern = string - - type StringifyQuery = (queryObject: H.Query) => H.QueryString - - type RouterListener = (error: Error, nextState: RouterState) => void - - interface RouterState { - location: H.Location - routes: PlainRoute[] - params: Params - components: RouteComponent[] - } - - - interface HistoryBase extends H.History { - routes: PlainRoute[] - parseQueryString?: ParseQueryString - stringifyQuery?: StringifyQuery - } - - type History = HistoryBase & H.HistoryQueries & HistoryRoutes - const browserHistory: History; - const hashHistory: History; - - /* components */ - - interface RouterProps extends React.Props { - history?: H.History - routes?: RouteConfig // alias for children - createElement?: (component: RouteComponent, props: Object) => any - onError?: (error: any) => any - onUpdate?: () => any - parseQueryString?: ParseQueryString - stringifyQuery?: StringifyQuery - } - interface Router extends React.ComponentClass {} - interface RouterElement extends React.ReactElement {} - const Router: Router - - - interface LinkProps extends React.HTMLAttributes, React.Props { - activeStyle?: React.CSSProperties - activeClassName?: string - onlyActiveOnIndex?: boolean - to: RoutePattern - query?: H.Query - state?: H.LocationState - } - interface Link extends React.ComponentClass {} - interface LinkElement extends React.ReactElement {} - const Link: Link - - - const IndexLink: Link - - - interface RouterContextProps extends React.Props { - history?: H.History - router: Router - createElement: (component: RouteComponent, props: Object) => any - location: H.Location - routes: RouteConfig - params: Params - components?: RouteComponent[] - } - interface RouterContext extends React.ComponentClass {} - interface RouterContextElement extends React.ReactElement { - history?: H.History - location: H.Location - router?: Router - } - const RouterContext: RouterContext - - - /* components (configuration) */ - - interface RouteProps extends React.Props { - path?: RoutePattern - component?: RouteComponent - components?: RouteComponents - getComponent?: (location: H.Location, cb: (error: any, component?: RouteComponent) => void) => void - getComponents?: (location: H.Location, cb: (error: any, components?: RouteComponents) => void) => void - onEnter?: EnterHook - onLeave?: LeaveHook - getIndexRoute?: (location: H.Location, cb: (error: any, indexRoute: RouteConfig) => void) => void - getChildRoutes?: (location: H.Location, cb: (error: any, childRoutes: RouteConfig) => void) => void - } - interface Route extends React.ComponentClass {} - interface RouteElement extends React.ReactElement {} - const Route: Route - - - interface PlainRoute { - path?: RoutePattern - component?: RouteComponent - components?: RouteComponents - getComponent?: (location: H.Location, cb: (error: any, component?: RouteComponent) => void) => void - getComponents?: (location: H.Location, cb: (error: any, components?: RouteComponents) => void) => void - onEnter?: EnterHook - onLeave?: LeaveHook - indexRoute?: PlainRoute - getIndexRoute?: (location: H.Location, cb: (error: any, indexRoute: RouteConfig) => void) => void - childRoutes?: PlainRoute[] - getChildRoutes?: (location: H.Location, cb: (error: any, childRoutes: RouteConfig) => void) => void - } - - - interface RedirectProps extends React.Props { - path?: RoutePattern - from?: RoutePattern // alias for path - to: RoutePattern - query?: H.Query - state?: H.LocationState - } - interface Redirect extends React.ComponentClass {} - interface RedirectElement extends React.ReactElement {} - const Redirect: Redirect - - - interface IndexRouteProps extends React.Props { - component?: RouteComponent - components?: RouteComponents - getComponent?: (location: H.Location, cb: (error: any, component?: RouteComponent) => void) => void - getComponents?: (location: H.Location, cb: (error: any, components?: RouteComponents) => void) => void - onEnter?: EnterHook - onLeave?: LeaveHook - } - interface IndexRoute extends React.ComponentClass {} - interface IndexRouteElement extends React.ReactElement {} - const IndexRoute: IndexRoute - - - interface IndexRedirectProps extends React.Props { - to: RoutePattern - query?: H.Query - state?: H.LocationState - } - interface IndexRedirect extends React.ComponentClass {} - interface IndexRedirectElement extends React.ReactElement {} - const IndexRedirect: IndexRedirect - - interface RouterOnContext extends H.History { - setRouteLeaveHook(route: PlainRoute, hook?: RouteHook): () => void; - isActive(pathOrLoc: H.LocationDescriptor, indexOnly?: boolean): boolean; - } - - /* mixins */ - - interface HistoryMixin { - history: History - } - const History: React.Mixin - - - interface LifecycleMixin { - routerWillLeave(nextLocation: H.Location): string | boolean - } - const Lifecycle: React.Mixin - - - const RouteContext: React.Mixin - - - /* utils */ - - interface HistoryRoutes { - listen(listener: RouterListener): Function - listenBeforeLeavingRoute(route: PlainRoute, hook: RouteHook): void - match(location: H.Location, callback: (error: any, nextState: RouterState, nextLocation: H.Location) => void): void - isActive(pathname: H.Pathname, query?: H.Query, indexOnly?: boolean): boolean - setRouteLeaveHook(route: PlainRoute, callback: RouteHook): void - } - - function useRoutes(createHistory: HistoryModule.CreateHistory): HistoryModule.CreateHistory - - - function createRoutes(routes: RouteConfig): PlainRoute[] - - - interface MatchArgs { - routes?: RouteConfig - history?: H.History - location?: H.Location - parseQueryString?: ParseQueryString - stringifyQuery?: StringifyQuery - } - interface MatchState extends RouterState { - history: History - } - function match(args: MatchArgs, cb: (error: any, nextLocation: H.Location, nextState: MatchState) => void): void - -} - - -declare module "react-router/lib/Router" { - - export default ReactRouter.Router - -} - - -declare module "react-router/lib/Link" { - - export default ReactRouter.Link - -} - - -declare module "react-router/lib/IndexLink" { - - export default ReactRouter.IndexLink - -} - - -declare module "react-router/lib/IndexRedirect" { - - export default ReactRouter.IndexRedirect - -} - - -declare module "react-router/lib/IndexRoute" { - - export default ReactRouter.IndexRoute - -} - - -declare module "react-router/lib/Redirect" { - - export default ReactRouter.Redirect - -} - - -declare module "react-router/lib/Route" { - - export default ReactRouter.Route - -} - - -declare module "react-router/lib/History" { - - export default ReactRouter.History - -} - - -declare module "react-router/lib/Lifecycle" { - - export default ReactRouter.Lifecycle - -} - - -declare module "react-router/lib/RouteContext" { - - export default ReactRouter.RouteContext - -} - - -declare module "react-router/lib/useRoutes" { - - export default ReactRouter.useRoutes - -} - -declare module "react-router/lib/PatternUtils" { - - export function formatPattern(pattern: string, params: {}): string; - -} - -declare module "react-router/lib/RouteUtils" { - - type E = __React.ReactElement - - export function isReactChildren(object: E | E[]): boolean - - export function createRouteFromReactElement(element: E): ReactRouter.PlainRoute - - export function createRoutesFromReactChildren(children: E | E[], parentRoute: ReactRouter.PlainRoute): ReactRouter.PlainRoute[] - - export import createRoutes = ReactRouter.createRoutes - -} - - -declare module "react-router/lib/RouterContext" { - - export default ReactRouter.RouterContext - -} - - -declare module "react-router/lib/PropTypes" { - - import React = __React - - export function falsy(props: any, propName: string, componentName: string): Error; - - export const history: React.Requireable - - export const location: React.Requireable - - export const component: React.Requireable - - export const components: React.Requireable - - export const route: React.Requireable - - export const routes: React.Requireable - - export default { - falsy, - history, - location, - component, - components, - route - } - -} - -declare module "react-router/lib/browserHistory" { - export default ReactRouter.browserHistory; -} - -declare module "react-router/lib/hashHistory" { - export default ReactRouter.hashHistory; -} - -declare module "react-router/lib/match" { - - export default ReactRouter.match - -} - - -declare module "react-router" { - - import Router from "react-router/lib/Router" - - import Link from "react-router/lib/Link" - - import IndexLink from "react-router/lib/IndexLink" - - import IndexRedirect from "react-router/lib/IndexRedirect" - - import IndexRoute from "react-router/lib/IndexRoute" - - import Redirect from "react-router/lib/Redirect" - - import Route from "react-router/lib/Route" - - import History from "react-router/lib/History" - - import Lifecycle from "react-router/lib/Lifecycle" - - import RouteContext from "react-router/lib/RouteContext" - - import browserHistory from "react-router/lib/browserHistory" - - import hashHistory from "react-router/lib/hashHistory" - - import useRoutes from "react-router/lib/useRoutes" - - import { createRoutes } from "react-router/lib/RouteUtils" - - import { formatPattern } from "react-router/lib/PatternUtils" - - import RouterContext from "react-router/lib/RouterContext" - - import PropTypes from "react-router/lib/PropTypes" - - import match from "react-router/lib/match" - - // PlainRoute is defined in the API documented at: - // https://github.com/rackt/react-router/blob/master/docs/API.md - // but not included in any of the .../lib modules above. - export type PlainRoute = ReactRouter.PlainRoute - - // The following definitions are also very useful to export - // because by using these types lots of potential type errors - // can be exposed: - export type EnterHook = ReactRouter.EnterHook - export type LeaveHook = ReactRouter.LeaveHook - export type ParseQueryString = ReactRouter.ParseQueryString - export type RedirectFunction = ReactRouter.RedirectFunction - export type RouteComponentProps = ReactRouter.RouteComponentProps; - export type RouteHook = ReactRouter.RouteHook - export type StringifyQuery = ReactRouter.StringifyQuery - export type RouterListener = ReactRouter.RouterListener - export type RouterState = ReactRouter.RouterState - export type HistoryBase = ReactRouter.HistoryBase - export type RouterOnContext = ReactRouter.RouterOnContext - - export { - Router, - Link, - IndexLink, - IndexRedirect, - IndexRoute, - Redirect, - Route, - History, - browserHistory, - hashHistory, - Lifecycle, - RouteContext, - useRoutes, - createRoutes, - formatPattern, - RouterContext, - PropTypes, - match - } - - export default Router - -} diff --git a/templates/ReactReduxSpa/typings/react/react-dom.d.ts b/templates/ReactReduxSpa/typings/react/react-dom.d.ts deleted file mode 100644 index 80a0c604..00000000 --- a/templates/ReactReduxSpa/typings/react/react-dom.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -// Type definitions for React v0.14 (react-dom) -// Project: http://facebook.github.io/react/ -// Definitions by: Asana , AssureSign , Microsoft -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// - -declare namespace __React { - namespace __DOM { - function findDOMNode(instance: ReactInstance): E; - function findDOMNode(instance: ReactInstance): Element; - - function render

( - element: DOMElement

, - container: Element, - callback?: (element: Element) => any): Element; - function render( - element: ClassicElement

, - container: Element, - callback?: (component: ClassicComponent) => any): ClassicComponent; - function render( - element: ReactElement

, - container: Element, - callback?: (component: Component) => any): Component; - - function unmountComponentAtNode(container: Element): boolean; - - var version: string; - - function unstable_batchedUpdates(callback: (a: A, b: B) => any, a: A, b: B): void; - function unstable_batchedUpdates(callback: (a: A) => any, a: A): void; - function unstable_batchedUpdates(callback: () => any): void; - - function unstable_renderSubtreeIntoContainer

( - parentComponent: Component, - nextElement: DOMElement

, - container: Element, - callback?: (element: Element) => any): Element; - function unstable_renderSubtreeIntoContainer( - parentComponent: Component, - nextElement: ClassicElement

, - container: Element, - callback?: (component: ClassicComponent) => any): ClassicComponent; - function unstable_renderSubtreeIntoContainer( - parentComponent: Component, - nextElement: ReactElement

, - container: Element, - callback?: (component: Component) => any): Component; - } - - namespace __DOMServer { - function renderToString(element: ReactElement): string; - function renderToStaticMarkup(element: ReactElement): string; - var version: string; - } -} - -declare module "react-dom" { - import DOM = __React.__DOM; - export = DOM; -} - -declare module "react-dom/server" { - import DOMServer = __React.__DOMServer; - export = DOMServer; -} diff --git a/templates/ReactReduxSpa/typings/react/react.d.ts b/templates/ReactReduxSpa/typings/react/react.d.ts deleted file mode 100644 index f4369e4a..00000000 --- a/templates/ReactReduxSpa/typings/react/react.d.ts +++ /dev/null @@ -1,2405 +0,0 @@ -// Type definitions for React v0.14 -// Project: http://facebook.github.io/react/ -// Definitions by: Asana , AssureSign , Microsoft -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -declare namespace __React { - - // - // React Elements - // ---------------------------------------------------------------------- - - type ReactType = string | ComponentClass | StatelessComponent; - type Key = string | number; - type Ref = string | ((instance: T) => any); - - interface ReactElement

> { - type: string | ComponentClass

| StatelessComponent

; - props: P; - key: Key; - ref: Ref | Element>; - } - - interface ClassicElement

extends ReactElement

{ - type: ClassicComponentClass

; - ref: Ref>; - } - - interface DOMElement

> extends ReactElement

{ - type: string; - ref: Ref; - } - - interface ReactHTMLElement extends DOMElement> { - ref: Ref; - } - - interface ReactSVGElement extends DOMElement { - ref: Ref; - } - - // - // Factories - // ---------------------------------------------------------------------- - - interface Factory

{ - (props?: P, ...children: ReactNode[]): ReactElement

; - } - - interface ClassicFactory

extends Factory

{ - (props?: P, ...children: ReactNode[]): ClassicElement

; - } - - interface DOMFactory

> extends Factory

{ - (props?: P, ...children: ReactNode[]): DOMElement

; - } - - type HTMLFactory = DOMFactory>; - type SVGFactory = DOMFactory; - - // - // React Nodes - // http://facebook.github.io/react/docs/glossary.html - // ---------------------------------------------------------------------- - - type ReactText = string | number; - type ReactChild = ReactElement | ReactText; - - // Should be Array but type aliases cannot be recursive - type ReactFragment = {} | Array; - type ReactNode = ReactChild | ReactFragment | boolean; - - // - // Top Level API - // ---------------------------------------------------------------------- - - function createClass(spec: ComponentSpec): ClassicComponentClass

; - - function createFactory

(type: string): DOMFactory

; - function createFactory

(type: ClassicComponentClass

): ClassicFactory

; - function createFactory

(type: ComponentClass

| StatelessComponent

): Factory

; - - function createElement

( - type: string, - props?: P, - ...children: ReactNode[]): DOMElement

; - function createElement

( - type: ClassicComponentClass

, - props?: P, - ...children: ReactNode[]): ClassicElement

; - function createElement

( - type: ComponentClass

| StatelessComponent

, - props?: P, - ...children: ReactNode[]): ReactElement

; - - function cloneElement( - element: ReactHTMLElement, - props?: HTMLProps, - ...children: ReactNode[]): ReactHTMLElement; - function cloneElement( - element: ReactSVGElement, - props?: SVGProps, - ...children: ReactNode[]): ReactSVGElement; - function cloneElement

( - element: ClassicElement

, - props?: Q, - ...children: ReactNode[]): ClassicElement

; - function cloneElement

( - element: ReactElement

, - props?: Q, - ...children: ReactNode[]): ReactElement

; - - function isValidElement(object: {}): boolean; - - var DOM: ReactDOM; - var PropTypes: ReactPropTypes; - var Children: ReactChildren; - - // - // Component API - // ---------------------------------------------------------------------- - - type ReactInstance = Component | Element; - - // Base component for plain JS classes - class Component implements ComponentLifecycle { - constructor(props?: P, context?: any); - setState(f: (prevState: S, props: P) => S, callback?: () => any): void; - setState(state: S, callback?: () => any): void; - forceUpdate(callBack?: () => any): void; - render(): JSX.Element; - props: P; - state: S; - context: {}; - refs: { - [key: string]: ReactInstance - }; - } - - interface ClassicComponent extends Component { - replaceState(nextState: S, callback?: () => any): void; - isMounted(): boolean; - getInitialState?(): S; - } - - interface ChildContextProvider { - getChildContext(): CC; - } - - // - // Class Interfaces - // ---------------------------------------------------------------------- - - interface StatelessComponent

{ - (props?: P, context?: any): ReactElement; - propTypes?: ValidationMap

; - contextTypes?: ValidationMap; - defaultProps?: P; - displayName?: string; - } - - interface ComponentClass

{ - new(props?: P, context?: any): Component; - propTypes?: ValidationMap

; - contextTypes?: ValidationMap; - childContextTypes?: ValidationMap; - defaultProps?: P; - } - - interface ClassicComponentClass

extends ComponentClass

{ - new(props?: P, context?: any): ClassicComponent; - getDefaultProps?(): P; - displayName?: string; - } - - // - // Component Specs and Lifecycle - // ---------------------------------------------------------------------- - - interface ComponentLifecycle { - componentWillMount?(): void; - componentDidMount?(): void; - componentWillReceiveProps?(nextProps: P, nextContext: any): void; - shouldComponentUpdate?(nextProps: P, nextState: S, nextContext: any): boolean; - componentWillUpdate?(nextProps: P, nextState: S, nextContext: any): void; - componentDidUpdate?(prevProps: P, prevState: S, prevContext: any): void; - componentWillUnmount?(): void; - } - - interface Mixin extends ComponentLifecycle { - mixins?: Mixin; - statics?: { - [key: string]: any; - }; - - displayName?: string; - propTypes?: ValidationMap; - contextTypes?: ValidationMap; - childContextTypes?: ValidationMap; - - getDefaultProps?(): P; - getInitialState?(): S; - } - - interface ComponentSpec extends Mixin { - render(): ReactElement; - - [propertyName: string]: any; - } - - // - // Event System - // ---------------------------------------------------------------------- - - interface SyntheticEvent { - bubbles: boolean; - cancelable: boolean; - currentTarget: EventTarget; - defaultPrevented: boolean; - eventPhase: number; - isTrusted: boolean; - nativeEvent: Event; - preventDefault(): void; - stopPropagation(): void; - target: EventTarget; - timeStamp: Date; - type: string; - } - - interface ClipboardEvent extends SyntheticEvent { - clipboardData: DataTransfer; - } - - interface CompositionEvent extends SyntheticEvent { - data: string; - } - - interface DragEvent extends SyntheticEvent { - dataTransfer: DataTransfer; - } - - interface FocusEvent extends SyntheticEvent { - relatedTarget: EventTarget; - } - - interface FormEvent extends SyntheticEvent { - } - - interface KeyboardEvent extends SyntheticEvent { - altKey: boolean; - charCode: number; - ctrlKey: boolean; - getModifierState(key: string): boolean; - key: string; - keyCode: number; - locale: string; - location: number; - metaKey: boolean; - repeat: boolean; - shiftKey: boolean; - which: number; - } - - interface MouseEvent extends SyntheticEvent { - altKey: boolean; - button: number; - buttons: number; - clientX: number; - clientY: number; - ctrlKey: boolean; - getModifierState(key: string): boolean; - metaKey: boolean; - pageX: number; - pageY: number; - relatedTarget: EventTarget; - screenX: number; - screenY: number; - shiftKey: boolean; - } - - interface TouchEvent extends SyntheticEvent { - altKey: boolean; - changedTouches: TouchList; - ctrlKey: boolean; - getModifierState(key: string): boolean; - metaKey: boolean; - shiftKey: boolean; - targetTouches: TouchList; - touches: TouchList; - } - - interface UIEvent extends SyntheticEvent { - detail: number; - view: AbstractView; - } - - interface WheelEvent extends SyntheticEvent { - deltaMode: number; - deltaX: number; - deltaY: number; - deltaZ: number; - } - - // - // Event Handler Types - // ---------------------------------------------------------------------- - - interface EventHandler { - (event: E): void; - } - - type ReactEventHandler = EventHandler; - - type ClipboardEventHandler = EventHandler; - type CompositionEventHandler = EventHandler; - type DragEventHandler = EventHandler; - type FocusEventHandler = EventHandler; - type FormEventHandler = EventHandler; - type KeyboardEventHandler = EventHandler; - type MouseEventHandler = EventHandler; - type TouchEventHandler = EventHandler; - type UIEventHandler = EventHandler; - type WheelEventHandler = EventHandler; - - // - // Props / DOM Attributes - // ---------------------------------------------------------------------- - - interface Props { - children?: ReactNode; - key?: Key; - ref?: Ref; - } - - interface HTMLProps extends HTMLAttributes, Props { - } - - interface SVGProps extends SVGAttributes, Props { - } - - interface DOMAttributes { - dangerouslySetInnerHTML?: { - __html: string; - }; - - // Clipboard Events - onCopy?: ClipboardEventHandler; - onCut?: ClipboardEventHandler; - onPaste?: ClipboardEventHandler; - - // Composition Events - onCompositionEnd?: CompositionEventHandler; - onCompositionStart?: CompositionEventHandler; - onCompositionUpdate?: CompositionEventHandler; - - // Focus Events - onFocus?: FocusEventHandler; - onBlur?: FocusEventHandler; - - // Form Events - onChange?: FormEventHandler; - onInput?: FormEventHandler; - onSubmit?: FormEventHandler; - - // Image Events - onLoad?: ReactEventHandler; - onError?: ReactEventHandler; // also a Media Event - - // Keyboard Events - onKeyDown?: KeyboardEventHandler; - onKeyPress?: KeyboardEventHandler; - onKeyUp?: KeyboardEventHandler; - - // Media Events - onAbort?: ReactEventHandler; - onCanPlay?: ReactEventHandler; - onCanPlayThrough?: ReactEventHandler; - onDurationChange?: ReactEventHandler; - onEmptied?: ReactEventHandler; - onEncrypted?: ReactEventHandler; - onEnded?: ReactEventHandler; - onLoadedData?: ReactEventHandler; - onLoadedMetadata?: ReactEventHandler; - onLoadStart?: ReactEventHandler; - onPause?: ReactEventHandler; - onPlay?: ReactEventHandler; - onPlaying?: ReactEventHandler; - onProgress?: ReactEventHandler; - onRateChange?: ReactEventHandler; - onSeeked?: ReactEventHandler; - onSeeking?: ReactEventHandler; - onStalled?: ReactEventHandler; - onSuspend?: ReactEventHandler; - onTimeUpdate?: ReactEventHandler; - onVolumeChange?: ReactEventHandler; - onWaiting?: ReactEventHandler; - - // MouseEvents - onClick?: MouseEventHandler; - onContextMenu?: MouseEventHandler; - onDoubleClick?: MouseEventHandler; - onDrag?: DragEventHandler; - onDragEnd?: DragEventHandler; - onDragEnter?: DragEventHandler; - onDragExit?: DragEventHandler; - onDragLeave?: DragEventHandler; - onDragOver?: DragEventHandler; - onDragStart?: DragEventHandler; - onDrop?: DragEventHandler; - onMouseDown?: MouseEventHandler; - onMouseEnter?: MouseEventHandler; - onMouseLeave?: MouseEventHandler; - onMouseMove?: MouseEventHandler; - onMouseOut?: MouseEventHandler; - onMouseOver?: MouseEventHandler; - onMouseUp?: MouseEventHandler; - - // Selection Events - onSelect?: ReactEventHandler; - - // Touch Events - onTouchCancel?: TouchEventHandler; - onTouchEnd?: TouchEventHandler; - onTouchMove?: TouchEventHandler; - onTouchStart?: TouchEventHandler; - - // UI Events - onScroll?: UIEventHandler; - - // Wheel Events - onWheel?: WheelEventHandler; - } - - // This interface is not complete. Only properties accepting - // unitless numbers are listed here (see CSSProperty.js in React) - interface CSSProperties { - - /** - * Aligns a flex container's lines within the flex container when there is extra space in the cross-axis, similar to how justify-content aligns individual items within the main-axis. - */ - alignContent?: any; - - /** - * Sets the default alignment in the cross axis for all of the flex container's items, including anonymous flex items, similarly to how justify-content aligns items along the main axis. - */ - alignItems?: any; - - /** - * Allows the default alignment to be overridden for individual flex items. - */ - alignSelf?: any; - - /** - * This property allows precise alignment of elements, such as graphics, that do not have a baseline-table or lack the desired baseline in their baseline-table. With the alignment-adjust property, the position of the baseline identified by the alignment-baseline can be explicitly determined. It also determines precisely the alignment point for each glyph within a textual element. - */ - alignmentAdjust?: any; - - alignmentBaseline?: any; - - /** - * Defines a length of time to elapse before an animation starts, allowing an animation to begin execution some time after it is applied. - */ - animationDelay?: any; - - /** - * Defines whether an animation should run in reverse on some or all cycles. - */ - animationDirection?: any; - - /** - * Specifies how many times an animation cycle should play. - */ - animationIterationCount?: any; - - /** - * Defines the list of animations that apply to the element. - */ - animationName?: any; - - /** - * Defines whether an animation is running or paused. - */ - animationPlayState?: any; - - /** - * Allows changing the style of any element to platform-based interface elements or vice versa. - */ - appearance?: any; - - /** - * Determines whether or not the “back” side of a transformed element is visible when facing the viewer. - */ - backfaceVisibility?: any; - - /** - * Shorthand property to set the values for one or more of: - * background-clip, background-color, background-image, - * background-origin, background-position, background-repeat, - * background-size, and background-attachment. - */ - background?: any; - - /** - * If a background-image is specified, this property determines - * whether that image's position is fixed within the viewport, - * or scrolls along with its containing block. - */ - backgroundAttachment?: "scroll" | "fixed" | "local"; - - /** - * This property describes how the element's background images should blend with each other and the element's background color. - * The value is a list of blend modes that corresponds to each background image. Each element in the list will apply to the corresponding element of background-image. If a property doesn’t have enough comma-separated values to match the number of layers, the UA must calculate its used value by repeating the list of values until there are enough. - */ - backgroundBlendMode?: any; - - /** - * Sets the background color of an element. - */ - backgroundColor?: any; - - backgroundComposite?: any; - - /** - * Applies one or more background images to an element. These can be any valid CSS image, including url() paths to image files or CSS gradients. - */ - backgroundImage?: any; - - /** - * Specifies what the background-position property is relative to. - */ - backgroundOrigin?: any; - - /** - * Sets the position of a background image. - */ - backgroundPosition?: any; - - /** - * Background-repeat defines if and how background images will be repeated after they have been sized and positioned - */ - backgroundRepeat?: any; - - /** - * Obsolete - spec retired, not implemented. - */ - baselineShift?: any; - - /** - * Non standard. Sets or retrieves the location of the Dynamic HTML (DHTML) behavior. - */ - behavior?: any; - - /** - * Shorthand property that defines the different properties of all four sides of an element's border in a single declaration. It can be used to set border-width, border-style and border-color, or a subset of these. - */ - border?: any; - - /** - * Shorthand that sets the values of border-bottom-color, - * border-bottom-style, and border-bottom-width. - */ - borderBottom?: any; - - /** - * Sets the color of the bottom border of an element. - */ - borderBottomColor?: any; - - /** - * Defines the shape of the border of the bottom-left corner. - */ - borderBottomLeftRadius?: any; - - /** - * Defines the shape of the border of the bottom-right corner. - */ - borderBottomRightRadius?: any; - - /** - * Sets the line style of the bottom border of a box. - */ - borderBottomStyle?: any; - - /** - * Sets the width of an element's bottom border. To set all four borders, use the border-width shorthand property which sets the values simultaneously for border-top-width, border-right-width, border-bottom-width, and border-left-width. - */ - borderBottomWidth?: any; - - /** - * Border-collapse can be used for collapsing the borders between table cells - */ - borderCollapse?: any; - - /** - * The CSS border-color property sets the color of an element's four borders. This property can have from one to four values, made up of the elementary properties: • border-top-color - * • border-right-color - * • border-bottom-color - * • border-left-color The default color is the currentColor of each of these values. - * If you provide one value, it sets the color for the element. Two values set the horizontal and vertical values, respectively. Providing three values sets the top, vertical, and bottom values, in that order. Four values set all for sides: top, right, bottom, and left, in that order. - */ - borderColor?: any; - - /** - * Specifies different corner clipping effects, such as scoop (inner curves), bevel (straight cuts) or notch (cut-off rectangles). Works along with border-radius to specify the size of each corner effect. - */ - borderCornerShape?: any; - - /** - * The property border-image-source is used to set the image to be used instead of the border style. If this is set to none the border-style is used instead. - */ - borderImageSource?: any; - - /** - * The border-image-width CSS property defines the offset to use for dividing the border image in nine parts, the top-left corner, central top edge, top-right-corner, central right edge, bottom-right corner, central bottom edge, bottom-left corner, and central right edge. They represent inward distance from the top, right, bottom, and left edges. - */ - borderImageWidth?: any; - - /** - * Shorthand property that defines the border-width, border-style and border-color of an element's left border in a single declaration. Note that you can use the corresponding longhand properties to set specific individual properties of the left border — border-left-width, border-left-style and border-left-color. - */ - borderLeft?: any; - - /** - * The CSS border-left-color property sets the color of an element's left border. This page explains the border-left-color value, but often you will find it more convenient to fix the border's left color as part of a shorthand set, either border-left or border-color. - * Colors can be defined several ways. For more information, see Usage. - */ - borderLeftColor?: any; - - /** - * Sets the style of an element's left border. To set all four borders, use the shorthand property, border-style. Otherwise, you can set the borders individually with border-top-style, border-right-style, border-bottom-style, border-left-style. - */ - borderLeftStyle?: any; - - /** - * Sets the width of an element's left border. To set all four borders, use the border-width shorthand property which sets the values simultaneously for border-top-width, border-right-width, border-bottom-width, and border-left-width. - */ - borderLeftWidth?: any; - - /** - * Shorthand property that defines the border-width, border-style and border-color of an element's right border in a single declaration. Note that you can use the corresponding longhand properties to set specific individual properties of the right border — border-right-width, border-right-style and border-right-color. - */ - borderRight?: any; - - /** - * Sets the color of an element's right border. This page explains the border-right-color value, but often you will find it more convenient to fix the border's right color as part of a shorthand set, either border-right or border-color. - * Colors can be defined several ways. For more information, see Usage. - */ - borderRightColor?: any; - - /** - * Sets the style of an element's right border. To set all four borders, use the shorthand property, border-style. Otherwise, you can set the borders individually with border-top-style, border-right-style, border-bottom-style, border-left-style. - */ - borderRightStyle?: any; - - /** - * Sets the width of an element's right border. To set all four borders, use the border-width shorthand property which sets the values simultaneously for border-top-width, border-right-width, border-bottom-width, and border-left-width. - */ - borderRightWidth?: any; - - /** - * Specifies the distance between the borders of adjacent cells. - */ - borderSpacing?: any; - - /** - * Sets the style of an element's four borders. This property can have from one to four values. With only one value, the value will be applied to all four borders; otherwise, this works as a shorthand property for each of border-top-style, border-right-style, border-bottom-style, border-left-style, where each border style may be assigned a separate value. - */ - borderStyle?: any; - - /** - * Shorthand property that defines the border-width, border-style and border-color of an element's top border in a single declaration. Note that you can use the corresponding longhand properties to set specific individual properties of the top border — border-top-width, border-top-style and border-top-color. - */ - borderTop?: any; - - /** - * Sets the color of an element's top border. This page explains the border-top-color value, but often you will find it more convenient to fix the border's top color as part of a shorthand set, either border-top or border-color. - * Colors can be defined several ways. For more information, see Usage. - */ - borderTopColor?: any; - - /** - * Sets the rounding of the top-left corner of the element. - */ - borderTopLeftRadius?: any; - - /** - * Sets the rounding of the top-right corner of the element. - */ - borderTopRightRadius?: any; - - /** - * Sets the style of an element's top border. To set all four borders, use the shorthand property, border-style. Otherwise, you can set the borders individually with border-top-style, border-right-style, border-bottom-style, border-left-style. - */ - borderTopStyle?: any; - - /** - * Sets the width of an element's top border. To set all four borders, use the border-width shorthand property which sets the values simultaneously for border-top-width, border-right-width, border-bottom-width, and border-left-width. - */ - borderTopWidth?: any; - - /** - * Sets the width of an element's four borders. This property can have from one to four values. This is a shorthand property for setting values simultaneously for border-top-width, border-right-width, border-bottom-width, and border-left-width. - */ - borderWidth?: any; - - /** - * This property specifies how far an absolutely positioned box's bottom margin edge is offset above the bottom edge of the box's containing block. For relatively positioned boxes, the offset is with respect to the bottom edges of the box itself (i.e., the box is given a position in the normal flow, then offset from that position according to these properties). - */ - bottom?: any; - - /** - * Obsolete. - */ - boxAlign?: any; - - /** - * Breaks a box into fragments creating new borders, padding and repeating backgrounds or lets it stay as a continuous box on a page break, column break, or, for inline elements, at a line break. - */ - boxDecorationBreak?: any; - - /** - * Deprecated - */ - boxDirection?: any; - - /** - * Do not use. This property has been replaced by the flex-wrap property. - * Gets or sets a value that specifies the direction to add successive rows or columns when the value of box-lines is set to multiple. - */ - boxLineProgression?: any; - - /** - * Do not use. This property has been replaced by the flex-wrap property. - * Gets or sets a value that specifies whether child elements wrap onto multiple lines or columns based on the space available in the object. - */ - boxLines?: any; - - /** - * Do not use. This property has been replaced by flex-order. - * Specifies the ordinal group that a child element of the object belongs to. This ordinal value identifies the display order (along the axis defined by the box-orient property) for the group. - */ - boxOrdinalGroup?: any; - - /** - * Deprecated. - */ - boxFlex?: number; - - /** - * Deprecated. - */ - boxFlexGroup?: number; - - /** - * The CSS break-after property allows you to force a break on multi-column layouts. More specifically, it allows you to force a break after an element. It allows you to determine if a break should occur, and what type of break it should be. The break-after CSS property describes how the page, column or region break behaves after the generated box. If there is no generated box, the property is ignored. - */ - breakAfter?: any; - - /** - * Control page/column/region breaks that fall above a block of content - */ - breakBefore?: any; - - /** - * Control page/column/region breaks that fall within a block of content - */ - breakInside?: any; - - /** - * The clear CSS property specifies if an element can be positioned next to or must be positioned below the floating elements that precede it in the markup. - */ - clear?: any; - - /** - * Deprecated; see clip-path. - * Lets you specify the dimensions of an absolutely positioned element that should be visible, and the element is clipped into this shape, and displayed. - */ - clip?: any; - - /** - * Clipping crops an graphic, so that only a portion of the graphic is rendered, or filled. This clip-rule property, when used with the clip-path property, defines which clip rule, or algorithm, to use when filling the different parts of a graphics. - */ - clipRule?: any; - - /** - * The color property sets the color of an element's foreground content (usually text), accepting any standard CSS color from keywords and hex values to RGB(a) and HSL(a). - */ - color?: any; - - /** - * Describes the number of columns of the element. - */ - columnCount?: number; - - /** - * Specifies how to fill columns (balanced or sequential). - */ - columnFill?: any; - - /** - * The column-gap property controls the width of the gap between columns in multi-column elements. - */ - columnGap?: any; - - /** - * Sets the width, style, and color of the rule between columns. - */ - columnRule?: any; - - /** - * Specifies the color of the rule between columns. - */ - columnRuleColor?: any; - - /** - * Specifies the width of the rule between columns. - */ - columnRuleWidth?: any; - - /** - * The column-span CSS property makes it possible for an element to span across all columns when its value is set to all. An element that spans more than one column is called a spanning element. - */ - columnSpan?: any; - - /** - * Specifies the width of columns in multi-column elements. - */ - columnWidth?: any; - - /** - * This property is a shorthand property for setting column-width and/or column-count. - */ - columns?: any; - - /** - * The counter-increment property accepts one or more names of counters (identifiers), each one optionally followed by an integer which specifies the value by which the counter should be incremented (e.g. if the value is 2, the counter increases by 2 each time it is invoked). - */ - counterIncrement?: any; - - /** - * The counter-reset property contains a list of one or more names of counters, each one optionally followed by an integer (otherwise, the integer defaults to 0.) Each time the given element is invoked, the counters specified by the property are set to the given integer. - */ - counterReset?: any; - - /** - * The cue property specifies sound files (known as an "auditory icon") to be played by speech media agents before and after presenting an element's content; if only one file is specified, it is played both before and after. The volume at which the file(s) should be played, relative to the volume of the main element, may also be specified. The icon files may also be set separately with the cue-before and cue-after properties. - */ - cue?: any; - - /** - * The cue-after property specifies a sound file (known as an "auditory icon") to be played by speech media agents after presenting an element's content; the volume at which the file should be played may also be specified. The shorthand property cue sets cue sounds for both before and after the element is presented. - */ - cueAfter?: any; - - /** - * Specifies the mouse cursor displayed when the mouse pointer is over an element. - */ - cursor?: any; - - /** - * The direction CSS property specifies the text direction/writing direction. The rtl is used for Hebrew or Arabic text, the ltr is for other languages. - */ - direction?: any; - - /** - * This property specifies the type of rendering box used for an element. It is a shorthand property for many other display properties. - */ - display?: any; - - /** - * The ‘fill’ property paints the interior of the given graphical element. The area to be painted consists of any areas inside the outline of the shape. To determine the inside of the shape, all subpaths are considered, and the interior is determined according to the rules associated with the current value of the ‘fill-rule’ property. The zero-width geometric outline of a shape is included in the area to be painted. - */ - fill?: any; - - /** - * SVG: Specifies the opacity of the color or the content the current object is filled with. - */ - fillOpacity?: number; - - /** - * The ‘fill-rule’ property indicates the algorithm which is to be used to determine what parts of the canvas are included inside the shape. For a simple, non-intersecting path, it is intuitively clear what region lies "inside"; however, for a more complex path, such as a path that intersects itself or where one subpath encloses another, the interpretation of "inside" is not so obvious. - * The ‘fill-rule’ property provides two options for how the inside of a shape is determined: - */ - fillRule?: any; - - /** - * Applies various image processing effects. This property is largely unsupported. See Compatibility section for more information. - */ - filter?: any; - - /** - * Shorthand for `flex-grow`, `flex-shrink`, and `flex-basis`. - */ - flex?: number | string; - - /** - * Obsolete, do not use. This property has been renamed to align-items. - * Specifies the alignment (perpendicular to the layout axis defined by the flex-direction property) of child elements of the object. - */ - flexAlign?: any; - - /** - * The flex-basis CSS property describes the initial main size of the flex item before any free space is distributed according to the flex factors described in the flex property (flex-grow and flex-shrink). - */ - flexBasis?: any; - - /** - * The flex-direction CSS property describes how flex items are placed in the flex container, by setting the direction of the flex container's main axis. - */ - flexDirection?: any; - - /** - * The flex-flow CSS property defines the flex container's main and cross axis. It is a shorthand property for the flex-direction and flex-wrap properties. - */ - flexFlow?: any; - - /** - * Specifies the flex grow factor of a flex item. - */ - flexGrow?: number; - - /** - * Do not use. This property has been renamed to align-self - * Specifies the alignment (perpendicular to the layout axis defined by flex-direction) of child elements of the object. - */ - flexItemAlign?: any; - - /** - * Do not use. This property has been renamed to align-content. - * Specifies how a flexbox's lines align within the flexbox when there is extra space along the axis that is perpendicular to the axis defined by the flex-direction property. - */ - flexLinePack?: any; - - /** - * Gets or sets a value that specifies the ordinal group that a flexbox element belongs to. This ordinal value identifies the display order for the group. - */ - flexOrder?: any; - - /** - * Specifies the flex shrink factor of a flex item. - */ - flexShrink?: number; - - /** - * Elements which have the style float are floated horizontally. These elements can move as far to the left or right of the containing element. All elements after the floating element will flow around it, but elements before the floating element are not impacted. If several floating elements are placed after each other, they will float next to each other as long as there is room. - */ - float?: any; - - /** - * Flows content from a named flow (specified by a corresponding flow-into) through selected elements to form a dynamic chain of layout regions. - */ - flowFrom?: any; - - /** - * The font property is shorthand that allows you to do one of two things: you can either set up six of the most mature font properties in one line, or you can set one of a choice of keywords to adopt a system font setting. - */ - font?: any; - - /** - * The font-family property allows one or more font family names and/or generic family names to be specified for usage on the selected element(s)' text. The browser then goes through the list; for each character in the selection it applies the first font family that has an available glyph for that character. - */ - fontFamily?: any; - - /** - * The font-kerning property allows contextual adjustment of inter-glyph spacing, i.e. the spaces between the characters in text. This property controls metric kerning - that utilizes adjustment data contained in the font. Optical Kerning is not supported as yet. - */ - fontKerning?: any; - - /** - * Specifies the size of the font. Used to compute em and ex units. - */ - fontSize?: number | string; - - /** - * The font-size-adjust property adjusts the font-size of the fallback fonts defined with font-family, so that the x-height is the same no matter what font is used. This preserves the readability of the text when fallback happens. - */ - fontSizeAdjust?: any; - - /** - * Allows you to expand or condense the widths for a normal, condensed, or expanded font face. - */ - fontStretch?: any; - - /** - * The font-style property allows normal, italic, or oblique faces to be selected. Italic forms are generally cursive in nature while oblique faces are typically sloped versions of the regular face. Oblique faces can be simulated by artificially sloping the glyphs of the regular face. - */ - fontStyle?: any; - - /** - * This value specifies whether the user agent is allowed to synthesize bold or oblique font faces when a font family lacks bold or italic faces. - */ - fontSynthesis?: any; - - /** - * The font-variant property enables you to select the small-caps font within a font family. - */ - fontVariant?: any; - - /** - * Fonts can provide alternate glyphs in addition to default glyph for a character. This property provides control over the selection of these alternate glyphs. - */ - fontVariantAlternates?: any; - - /** - * Specifies the weight or boldness of the font. - */ - fontWeight?: "normal" | "bold" | "lighter" | "bolder" | number; - - /** - * Lays out one or more grid items bound by 4 grid lines. Shorthand for setting grid-column-start, grid-column-end, grid-row-start, and grid-row-end in a single declaration. - */ - gridArea?: any; - - /** - * Controls a grid item's placement in a grid area, particularly grid position and a grid span. Shorthand for setting grid-column-start and grid-column-end in a single declaration. - */ - gridColumn?: any; - - /** - * Controls a grid item's placement in a grid area as well as grid position and a grid span. The grid-column-end property (with grid-row-start, grid-row-end, and grid-column-start) determines a grid item's placement by specifying the grid lines of a grid item's grid area. - */ - gridColumnEnd?: any; - - /** - * Determines a grid item's placement by specifying the starting grid lines of a grid item's grid area . A grid item's placement in a grid area consists of a grid position and a grid span. See also ( grid-row-start, grid-row-end, and grid-column-end) - */ - gridColumnStart?: any; - - /** - * Gets or sets a value that indicates which row an element within a Grid should appear in. Shorthand for setting grid-row-start and grid-row-end in a single declaration. - */ - gridRow?: any; - - /** - * Determines a grid item’s placement by specifying the block-end. A grid item's placement in a grid area consists of a grid position and a grid span. The grid-row-end property (with grid-row-start, grid-column-start, and grid-column-end) determines a grid item's placement by specifying the grid lines of a grid item's grid area. - */ - gridRowEnd?: any; - - /** - * Specifies a row position based upon an integer location, string value, or desired row size. - * css/properties/grid-row is used as short-hand for grid-row-position and grid-row-position - */ - gridRowPosition?: any; - - gridRowSpan?: any; - - /** - * Specifies named grid areas which are not associated with any particular grid item, but can be referenced from the grid-placement properties. The syntax of the grid-template-areas property also provides a visualization of the structure of the grid, making the overall layout of the grid container easier to understand. - */ - gridTemplateAreas?: any; - - /** - * Specifies (with grid-template-rows) the line names and track sizing functions of the grid. Each sizing function can be specified as a length, a percentage of the grid container’s size, a measurement of the contents occupying the column or row, or a fraction of the free space in the grid. - */ - gridTemplateColumns?: any; - - /** - * Specifies (with grid-template-columns) the line names and track sizing functions of the grid. Each sizing function can be specified as a length, a percentage of the grid container’s size, a measurement of the contents occupying the column or row, or a fraction of the free space in the grid. - */ - gridTemplateRows?: any; - - /** - * Sets the height of an element. The content area of the element height does not include the padding, border, and margin of the element. - */ - height?: any; - - /** - * Specifies the minimum number of characters in a hyphenated word - */ - hyphenateLimitChars?: any; - - /** - * Indicates the maximum number of successive hyphenated lines in an element. The ‘no-limit’ value means that there is no limit. - */ - hyphenateLimitLines?: any; - - /** - * Specifies the maximum amount of trailing whitespace (before justification) that may be left in a line before hyphenation is triggered to pull part of a word from the next line back up into the current one. - */ - hyphenateLimitZone?: any; - - /** - * Specifies whether or not words in a sentence can be split by the use of a manual or automatic hyphenation mechanism. - */ - hyphens?: any; - - imeMode?: any; - - layoutGrid?: any; - - layoutGridChar?: any; - - layoutGridLine?: any; - - layoutGridMode?: any; - - layoutGridType?: any; - - /** - * Sets the left edge of an element - */ - left?: any; - - /** - * The letter-spacing CSS property specifies the spacing behavior between text characters. - */ - letterSpacing?: any; - - /** - * Deprecated. Gets or sets line-breaking rules for text in selected languages such as Japanese, Chinese, and Korean. - */ - lineBreak?: any; - - lineClamp?: number; - - /** - * Specifies the height of an inline block level element. - */ - lineHeight?: number | string; - - /** - * Shorthand property that sets the list-style-type, list-style-position and list-style-image properties in one declaration. - */ - listStyle?: any; - - /** - * This property sets the image that will be used as the list item marker. When the image is available, it will replace the marker set with the 'list-style-type' marker. That also means that if the image is not available, it will show the style specified by list-style-property - */ - listStyleImage?: any; - - /** - * Specifies if the list-item markers should appear inside or outside the content flow. - */ - listStylePosition?: any; - - /** - * Specifies the type of list-item marker in a list. - */ - listStyleType?: any; - - /** - * The margin property is shorthand to allow you to set all four margins of an element at once. Its equivalent longhand properties are margin-top, margin-right, margin-bottom and margin-left. Negative values are also allowed. - */ - margin?: any; - - /** - * margin-bottom sets the bottom margin of an element. - */ - marginBottom?: any; - - /** - * margin-left sets the left margin of an element. - */ - marginLeft?: any; - - /** - * margin-right sets the right margin of an element. - */ - marginRight?: any; - - /** - * margin-top sets the top margin of an element. - */ - marginTop?: any; - - /** - * The marquee-direction determines the initial direction in which the marquee content moves. - */ - marqueeDirection?: any; - - /** - * The 'marquee-style' property determines a marquee's scrolling behavior. - */ - marqueeStyle?: any; - - /** - * This property is shorthand for setting mask-image, mask-mode, mask-repeat, mask-position, mask-clip, mask-origin, mask-composite and mask-size. Omitted values are set to their original properties' initial values. - */ - mask?: any; - - /** - * This property is shorthand for setting mask-border-source, mask-border-slice, mask-border-width, mask-border-outset, and mask-border-repeat. Omitted values are set to their original properties' initial values. - */ - maskBorder?: any; - - /** - * This property specifies how the images for the sides and the middle part of the mask image are scaled and tiled. The first keyword applies to the horizontal sides, the second one applies to the vertical ones. If the second keyword is absent, it is assumed to be the same as the first, similar to the CSS border-image-repeat property. - */ - maskBorderRepeat?: any; - - /** - * This property specifies inward offsets from the top, right, bottom, and left edges of the mask image, dividing it into nine regions: four corners, four edges, and a middle. The middle image part is discarded and treated as fully transparent black unless the fill keyword is present. The four values set the top, right, bottom and left offsets in that order, similar to the CSS border-image-slice property. - */ - maskBorderSlice?: any; - - /** - * Specifies an image to be used as a mask. An image that is empty, fails to download, is non-existent, or cannot be displayed is ignored and does not mask the element. - */ - maskBorderSource?: any; - - /** - * This property sets the width of the mask box image, similar to the CSS border-image-width property. - */ - maskBorderWidth?: any; - - /** - * Determines the mask painting area, which defines the area that is affected by the mask. The painted content of an element may be restricted to this area. - */ - maskClip?: any; - - /** - * For elements rendered as a single box, specifies the mask positioning area. For elements rendered as multiple boxes (e.g., inline boxes on several lines, boxes on several pages) specifies which boxes box-decoration-break operates on to determine the mask positioning area(s). - */ - maskOrigin?: any; - - /** - * This property must not be used. It is no longer included in any standard or standard track specification, nor is it implemented in any browser. It is only used when the text-align-last property is set to size. It controls allowed adjustments of font-size to fit line content. - */ - maxFontSize?: any; - - /** - * Sets the maximum height for an element. It prevents the height of the element to exceed the specified value. If min-height is specified and is greater than max-height, max-height is overridden. - */ - maxHeight?: any; - - /** - * Sets the maximum width for an element. It limits the width property to be larger than the value specified in max-width. - */ - maxWidth?: any; - - /** - * Sets the minimum height for an element. It prevents the height of the element to be smaller than the specified value. The value of min-height overrides both max-height and height. - */ - minHeight?: any; - - /** - * Sets the minimum width of an element. It limits the width property to be not smaller than the value specified in min-width. - */ - minWidth?: any; - - /** - * Specifies the transparency of an element. - */ - opacity?: number; - - /** - * Specifies the order used to lay out flex items in their flex container. - * Elements are laid out in the ascending order of the order value. - */ - order?: number; - - /** - * In paged media, this property defines the minimum number of lines in - * a block container that must be left at the bottom of the page. - */ - orphans?: number; - - /** - * The CSS outline property is a shorthand property for setting one or more of the individual outline properties outline-style, outline-width and outline-color in a single rule. In most cases the use of this shortcut is preferable and more convenient. - * Outlines differ from borders in the following ways: • Outlines do not take up space, they are drawn above the content. - * • Outlines may be non-rectangular. They are rectangular in Gecko/Firefox. Internet Explorer attempts to place the smallest contiguous outline around all elements or shapes that are indicated to have an outline. Opera draws a non-rectangular shape around a construct. - */ - outline?: any; - - /** - * The outline-color property sets the color of the outline of an element. An outline is a line that is drawn around elements, outside the border edge, to make the element stand out. - */ - outlineColor?: any; - - /** - * The outline-offset property offsets the outline and draw it beyond the border edge. - */ - outlineOffset?: any; - - /** - * The overflow property controls how extra content exceeding the bounding box of an element is rendered. It can be used in conjunction with an element that has a fixed width and height, to eliminate text-induced page distortion. - */ - overflow?: any; - - /** - * Specifies the preferred scrolling methods for elements that overflow. - */ - overflowStyle?: any; - - /** - * Controls how extra content exceeding the x-axis of the bounding box of an element is rendered. - */ - overflowX?: any; - - /** - * Controls how extra content exceeding the y-axis of the bounding box of an element is rendered. - */ - overflowY?: any; - - /** - * The padding optional CSS property sets the required padding space on one to four sides of an element. The padding area is the space between an element and its border. Negative values are not allowed but decimal values are permitted. The element size is treated as fixed, and the content of the element shifts toward the center as padding is increased. - * The padding property is a shorthand to avoid setting each side separately (padding-top, padding-right, padding-bottom, padding-left). - */ - padding?: any; - - /** - * The padding-bottom CSS property of an element sets the padding space required on the bottom of an element. The padding area is the space between the content of the element and its border. Contrary to margin-bottom values, negative values of padding-bottom are invalid. - */ - paddingBottom?: any; - - /** - * The padding-left CSS property of an element sets the padding space required on the left side of an element. The padding area is the space between the content of the element and its border. Contrary to margin-left values, negative values of padding-left are invalid. - */ - paddingLeft?: any; - - /** - * The padding-right CSS property of an element sets the padding space required on the right side of an element. The padding area is the space between the content of the element and its border. Contrary to margin-right values, negative values of padding-right are invalid. - */ - paddingRight?: any; - - /** - * The padding-top CSS property of an element sets the padding space required on the top of an element. The padding area is the space between the content of the element and its border. Contrary to margin-top values, negative values of padding-top are invalid. - */ - paddingTop?: any; - - /** - * The page-break-after property is supported in all major browsers. With CSS3, page-break-* properties are only aliases of the break-* properties. The CSS3 Fragmentation spec defines breaks for all CSS box fragmentation. - */ - pageBreakAfter?: any; - - /** - * The page-break-before property sets the page-breaking behavior before an element. With CSS3, page-break-* properties are only aliases of the break-* properties. The CSS3 Fragmentation spec defines breaks for all CSS box fragmentation. - */ - pageBreakBefore?: any; - - /** - * Sets the page-breaking behavior inside an element. With CSS3, page-break-* properties are only aliases of the break-* properties. The CSS3 Fragmentation spec defines breaks for all CSS box fragmentation. - */ - pageBreakInside?: any; - - /** - * The pause property determines how long a speech media agent should pause before and after presenting an element. It is a shorthand for the pause-before and pause-after properties. - */ - pause?: any; - - /** - * The pause-after property determines how long a speech media agent should pause after presenting an element. It may be replaced by the shorthand property pause, which sets pause time before and after. - */ - pauseAfter?: any; - - /** - * The pause-before property determines how long a speech media agent should pause before presenting an element. It may be replaced by the shorthand property pause, which sets pause time before and after. - */ - pauseBefore?: any; - - /** - * The perspective property defines how far an element is placed from the view on the z-axis, from the screen to the viewer. - * Perspective defines how an object is viewed. In graphic arts, perspective is the representation on a flat surface of what the viewer's eye would see in a 3D space. (See Wikipedia for more information about graphical perspective and for related illustrations.) - * The illusion of perspective on a flat surface, such as a computer screen, is created by projecting points on the flat surface as they would appear if the flat surface were a window through which the viewer was looking at the object. In discussion of virtual environments, this flat surface is called a projection plane. - */ - perspective?: any; - - /** - * The perspective-origin property establishes the origin for the perspective property. It effectively sets the X and Y position at which the viewer appears to be looking at the children of the element. - * When used with perspective, perspective-origin changes the appearance of an object, as if a viewer were looking at it from a different origin. An object appears differently if a viewer is looking directly at it versus looking at it from below, above, or from the side. Thus, the perspective-origin is like a vanishing point. - * The default value of perspective-origin is 50% 50%. This displays an object as if the viewer's eye were positioned directly at the center of the screen, both top-to-bottom and left-to-right. A value of 0% 0% changes the object as if the viewer was looking toward the top left angle. A value of 100% 100% changes the appearance as if viewed toward the bottom right angle. - */ - perspectiveOrigin?: any; - - /** - * The pointer-events property allows you to control whether an element can be the target for the pointing device (e.g, mouse, pen) events. - */ - pointerEvents?: any; - - /** - * The position property controls the type of positioning used by an element within its parent elements. The effect of the position property depends on a lot of factors, for example the position property of parent elements. - */ - position?: any; - - /** - * Obsolete: unsupported. - * This property determines whether or not a full-width punctuation mark character should be trimmed if it appears at the beginning of a line, so that its "ink" lines up with the first glyph in the line above and below. - */ - punctuationTrim?: any; - - /** - * Sets the type of quotation marks for embedded quotations. - */ - quotes?: any; - - /** - * Controls whether the last region in a chain displays additional 'overset' content according its default overflow property, or if it displays a fragment of content as if it were flowing into a subsequent region. - */ - regionFragment?: any; - - /** - * The rest-after property determines how long a speech media agent should pause after presenting an element's main content, before presenting that element's exit cue sound. It may be replaced by the shorthand property rest, which sets rest time before and after. - */ - restAfter?: any; - - /** - * The rest-before property determines how long a speech media agent should pause after presenting an intro cue sound for an element, before presenting that element's main content. It may be replaced by the shorthand property rest, which sets rest time before and after. - */ - restBefore?: any; - - /** - * Specifies the position an element in relation to the right side of the containing element. - */ - right?: any; - - rubyAlign?: any; - - rubyPosition?: any; - - /** - * Defines the alpha channel threshold used to extract a shape from an image. Can be thought of as a "minimum opacity" threshold; that is, a value of 0.5 means that the shape will enclose all the pixels that are more than 50% opaque. - */ - shapeImageThreshold?: any; - - /** - * A future level of CSS Shapes will define a shape-inside property, which will define a shape to wrap content within the element. See Editor's Draft and CSSWG wiki page on next-level plans - */ - shapeInside?: any; - - /** - * Adds a margin to a shape-outside. In effect, defines a new shape that is the smallest contour around all the points that are the shape-margin distance outward perpendicular to each point on the underlying shape. For points where a perpendicular direction is not defined (e.g., a triangle corner), takes all points on a circle centered at the point and with a radius of the shape-margin distance. This property accepts only non-negative values. - */ - shapeMargin?: any; - - /** - * Declares a shape around which text should be wrapped, with possible modifications from the shape-margin property. The shape defined by shape-outside and shape-margin changes the geometry of a float element's float area. - */ - shapeOutside?: any; - - /** - * The speak property determines whether or not a speech synthesizer will read aloud the contents of an element. - */ - speak?: any; - - /** - * The speak-as property determines how the speech synthesizer interprets the content: words as whole words or as a sequence of letters, numbers as a numerical value or a sequence of digits, punctuation as pauses in speech or named punctuation characters. - */ - speakAs?: any; - - /** - * SVG: Specifies the opacity of the outline on the current object. - */ - strokeOpacity?: number; - - /** - * SVG: Specifies the width of the outline on the current object. - */ - strokeWidth?: number; - - /** - * The tab-size CSS property is used to customise the width of a tab (U+0009) character. - */ - tabSize?: any; - - /** - * The 'table-layout' property controls the algorithm used to lay out the table cells, rows, and columns. - */ - tableLayout?: any; - - /** - * The text-align CSS property describes how inline content like text is aligned in its parent block element. text-align does not control the alignment of block elements itself, only their inline content. - */ - textAlign?: any; - - /** - * The text-align-last CSS property describes how the last line of a block element or a line before line break is aligned in its parent block element. - */ - textAlignLast?: any; - - /** - * The text-decoration CSS property is used to set the text formatting to underline, overline, line-through or blink. - * underline and overline decorations are positioned under the text, line-through over it. - */ - textDecoration?: any; - - /** - * Sets the color of any text decoration, such as underlines, overlines, and strike throughs. - */ - textDecorationColor?: any; - - /** - * Sets what kind of line decorations are added to an element, such as underlines, overlines, etc. - */ - textDecorationLine?: any; - - textDecorationLineThrough?: any; - - textDecorationNone?: any; - - textDecorationOverline?: any; - - /** - * Specifies what parts of an element’s content are skipped over when applying any text decoration. - */ - textDecorationSkip?: any; - - /** - * This property specifies the style of the text decoration line drawn on the specified element. The intended meaning for the values are the same as those of the border-style-properties. - */ - textDecorationStyle?: any; - - textDecorationUnderline?: any; - - /** - * The text-emphasis property will apply special emphasis marks to the elements text. Slightly similar to the text-decoration property only that this property can have affect on the line-height. It also is noted that this is shorthand for text-emphasis-style and for text-emphasis-color. - */ - textEmphasis?: any; - - /** - * The text-emphasis-color property specifies the foreground color of the emphasis marks. - */ - textEmphasisColor?: any; - - /** - * The text-emphasis-style property applies special emphasis marks to an element's text. - */ - textEmphasisStyle?: any; - - /** - * This property helps determine an inline box's block-progression dimension, derived from the text-height and font-size properties for non-replaced elements, the height or the width for replaced elements, and the stacked block-progression dimension for inline-block elements. The block-progression dimension determines the position of the padding, border and margin for the element. - */ - textHeight?: any; - - /** - * Specifies the amount of space horizontally that should be left on the first line of the text of an element. This horizontal spacing is at the beginning of the first line and is in respect to the left edge of the containing block box. - */ - textIndent?: any; - - textJustifyTrim?: any; - - textKashidaSpace?: any; - - /** - * The text-line-through property is a shorthand property for text-line-through-style, text-line-through-color and text-line-through-mode. (Considered obsolete; use text-decoration instead.) - */ - textLineThrough?: any; - - /** - * Specifies the line colors for the line-through text decoration. - * (Considered obsolete; use text-decoration-color instead.) - */ - textLineThroughColor?: any; - - /** - * Sets the mode for the line-through text decoration, determining whether the text decoration affects the space characters or not. - * (Considered obsolete; use text-decoration-skip instead.) - */ - textLineThroughMode?: any; - - /** - * Specifies the line style for line-through text decoration. - * (Considered obsolete; use text-decoration-style instead.) - */ - textLineThroughStyle?: any; - - /** - * Specifies the line width for the line-through text decoration. - */ - textLineThroughWidth?: any; - - /** - * The text-overflow shorthand CSS property determines how overflowed content that is not displayed is signaled to the users. It can be clipped, display an ellipsis ('…', U+2026 HORIZONTAL ELLIPSIS) or a Web author-defined string. It covers the two long-hand properties text-overflow-mode and text-overflow-ellipsis - */ - textOverflow?: any; - - /** - * The text-overline property is the shorthand for the text-overline-style, text-overline-width, text-overline-color, and text-overline-mode properties. - */ - textOverline?: any; - - /** - * Specifies the line color for the overline text decoration. - */ - textOverlineColor?: any; - - /** - * Sets the mode for the overline text decoration, determining whether the text decoration affects the space characters or not. - */ - textOverlineMode?: any; - - /** - * Specifies the line style for overline text decoration. - */ - textOverlineStyle?: any; - - /** - * Specifies the line width for the overline text decoration. - */ - textOverlineWidth?: any; - - /** - * The text-rendering CSS property provides information to the browser about how to optimize when rendering text. Options are: legibility, speed or geometric precision. - */ - textRendering?: any; - - /** - * Obsolete: unsupported. - */ - textScript?: any; - - /** - * The CSS text-shadow property applies one or more drop shadows to the text and of an element. Each shadow is specified as an offset from the text, along with optional color and blur radius values. - */ - textShadow?: any; - - /** - * This property transforms text for styling purposes. (It has no effect on the underlying content.) - */ - textTransform?: any; - - /** - * Unsupported. - * This property will add a underline position value to the element that has an underline defined. - */ - textUnderlinePosition?: any; - - /** - * After review this should be replaced by text-decoration should it not? - * This property will set the underline style for text with a line value for underline, overline, and line-through. - */ - textUnderlineStyle?: any; - - /** - * This property specifies how far an absolutely positioned box's top margin edge is offset below the top edge of the box's containing block. For relatively positioned boxes, the offset is with respect to the top edges of the box itself (i.e., the box is given a position in the normal flow, then offset from that position according to these properties). - */ - top?: any; - - /** - * Determines whether touch input may trigger default behavior supplied by the user agent, such as panning or zooming. - */ - touchAction?: any; - - /** - * CSS transforms allow elements styled with CSS to be transformed in two-dimensional or three-dimensional space. Using this property, elements can be translated, rotated, scaled, and skewed. The value list may consist of 2D and/or 3D transform values. - */ - transform?: any; - - /** - * This property defines the origin of the transformation axes relative to the element to which the transformation is applied. - */ - transformOrigin?: any; - - /** - * This property allows you to define the relative position of the origin of the transformation grid along the z-axis. - */ - transformOriginZ?: any; - - /** - * This property specifies how nested elements are rendered in 3D space relative to their parent. - */ - transformStyle?: any; - - /** - * The transition CSS property is a shorthand property for transition-property, transition-duration, transition-timing-function, and transition-delay. It allows to define the transition between two states of an element. - */ - transition?: any; - - /** - * Defines when the transition will start. A value of ‘0s’ means the transition will execute as soon as the property is changed. Otherwise, the value specifies an offset from the moment the property is changed, and the transition will delay execution by that offset. - */ - transitionDelay?: any; - - /** - * The 'transition-duration' property specifies the length of time a transition animation takes to complete. - */ - transitionDuration?: any; - - /** - * The 'transition-property' property specifies the name of the CSS property to which the transition is applied. - */ - transitionProperty?: any; - - /** - * Sets the pace of action within a transition - */ - transitionTimingFunction?: any; - - /** - * The unicode-bidi CSS property specifies the level of embedding with respect to the bidirectional algorithm. - */ - unicodeBidi?: any; - - /** - * unicode-range allows you to set a specific range of characters to be downloaded from a font (embedded using @font-face) and made available for use on the current page. - */ - unicodeRange?: any; - - /** - * This is for all the high level UX stuff. - */ - userFocus?: any; - - /** - * For inputing user content - */ - userInput?: any; - - /** - * The vertical-align property controls how inline elements or text are vertically aligned compared to the baseline. If this property is used on table-cells it controls the vertical alignment of content of the table cell. - */ - verticalAlign?: any; - - /** - * The visibility property specifies whether the boxes generated by an element are rendered. - */ - visibility?: any; - - /** - * The voice-balance property sets the apparent position (in stereo sound) of the synthesized voice for spoken media. - */ - voiceBalance?: any; - - /** - * The voice-duration property allows the author to explicitly set the amount of time it should take a speech synthesizer to read an element's content, for example to allow the speech to be synchronized with other media. With a value of auto (the default) the length of time it takes to read the content is determined by the content itself and the voice-rate property. - */ - voiceDuration?: any; - - /** - * The voice-family property sets the speaker's voice used by a speech media agent to read an element. The speaker may be specified as a named character (to match a voice option in the speech reading software) or as a generic description of the age and gender of the voice. Similar to the font-family property for visual media, a comma-separated list of fallback options may be given in case the speech reader does not recognize the character name or cannot synthesize the requested combination of generic properties. - */ - voiceFamily?: any; - - /** - * The voice-pitch property sets pitch or tone (high or low) for the synthesized speech when reading an element; the pitch may be specified absolutely or relative to the normal pitch for the voice-family used to read the text. - */ - voicePitch?: any; - - /** - * The voice-range property determines how much variation in pitch or tone will be created by the speech synthesize when reading an element. Emphasized text, grammatical structures and punctuation may all be rendered as changes in pitch, this property determines how strong or obvious those changes are; large ranges are associated with enthusiastic or emotional speech, while small ranges are associated with flat or mechanical speech. - */ - voiceRange?: any; - - /** - * The voice-rate property sets the speed at which the voice synthesized by a speech media agent will read content. - */ - voiceRate?: any; - - /** - * The voice-stress property sets the level of vocal emphasis to be used for synthesized speech reading the element. - */ - voiceStress?: any; - - /** - * The voice-volume property sets the volume for spoken content in speech media. It replaces the deprecated volume property. - */ - voiceVolume?: any; - - /** - * The white-space property controls whether and how white space inside the element is collapsed, and whether lines may wrap at unforced "soft wrap" opportunities. - */ - whiteSpace?: any; - - /** - * Obsolete: unsupported. - */ - whiteSpaceTreatment?: any; - - /** - * In paged media, this property defines the mimimum number of lines - * that must be left at the top of the second page. - */ - widows?: number; - - /** - * Specifies the width of the content area of an element. The content area of the element width does not include the padding, border, and margin of the element. - */ - width?: any; - - /** - * The word-break property is often used when there is long generated content that is strung together without and spaces or hyphens to beak apart. A common case of this is when there is a long URL that does not have any hyphens. This case could potentially cause the breaking of the layout as it could extend past the parent element. - */ - wordBreak?: any; - - /** - * The word-spacing CSS property specifies the spacing behavior between "words". - */ - wordSpacing?: any; - - /** - * An alias of css/properties/overflow-wrap, word-wrap defines whether to break words when the content exceeds the boundaries of its container. - */ - wordWrap?: any; - - /** - * Specifies how exclusions affect inline content within block-level elements. Elements lay out their inline content in their content area but wrap around exclusion areas. - */ - wrapFlow?: any; - - /** - * Set the value that is used to offset the inner wrap shape from other shapes. Inline content that intersects a shape with this property will be pushed by this shape's margin. - */ - wrapMargin?: any; - - /** - * Obsolete and unsupported. Do not use. - * This CSS property controls the text when it reaches the end of the block in which it is enclosed. - */ - wrapOption?: any; - - /** - * writing-mode specifies if lines of text are laid out horizontally or vertically, and the direction which lines of text and blocks progress. - */ - writingMode?: any; - - /** - * The z-index property specifies the z-order of an element and its descendants. - * When elements overlap, z-order determines which one covers the other. - */ - zIndex?: "auto" | number; - - /** - * Sets the initial zoom factor of a document defined by @viewport. - */ - zoom?: "auto" | number; - - [propertyName: string]: any; - } - - interface HTMLAttributes extends DOMAttributes { - // React-specific Attributes - defaultChecked?: boolean; - defaultValue?: string | string[]; - - // Standard HTML Attributes - accept?: string; - acceptCharset?: string; - accessKey?: string; - action?: string; - allowFullScreen?: boolean; - allowTransparency?: boolean; - alt?: string; - async?: boolean; - autoComplete?: string; - autoFocus?: boolean; - autoPlay?: boolean; - capture?: boolean; - cellPadding?: number | string; - cellSpacing?: number | string; - charSet?: string; - challenge?: string; - checked?: boolean; - classID?: string; - className?: string; - cols?: number; - colSpan?: number; - content?: string; - contentEditable?: boolean; - contextMenu?: string; - controls?: boolean; - coords?: string; - crossOrigin?: string; - data?: string; - dateTime?: string; - default?: boolean; - defer?: boolean; - dir?: string; - disabled?: boolean; - download?: any; - draggable?: boolean; - encType?: string; - form?: string; - formAction?: string; - formEncType?: string; - formMethod?: string; - formNoValidate?: boolean; - formTarget?: string; - frameBorder?: number | string; - headers?: string; - height?: number | string; - hidden?: boolean; - high?: number; - href?: string; - hrefLang?: string; - htmlFor?: string; - httpEquiv?: string; - icon?: string; - id?: string; - inputMode?: string; - integrity?: string; - is?: string; - keyParams?: string; - keyType?: string; - kind?: string; - label?: string; - lang?: string; - list?: string; - loop?: boolean; - low?: number; - manifest?: string; - marginHeight?: number; - marginWidth?: number; - max?: number | string; - maxLength?: number; - media?: string; - mediaGroup?: string; - method?: string; - min?: number | string; - minLength?: number; - multiple?: boolean; - muted?: boolean; - name?: string; - noValidate?: boolean; - open?: boolean; - optimum?: number; - pattern?: string; - placeholder?: string; - poster?: string; - preload?: string; - radioGroup?: string; - readOnly?: boolean; - rel?: string; - required?: boolean; - role?: string; - rows?: number; - rowSpan?: number; - sandbox?: string; - scope?: string; - scoped?: boolean; - scrolling?: string; - seamless?: boolean; - selected?: boolean; - shape?: string; - size?: number; - sizes?: string; - span?: number; - spellCheck?: boolean; - src?: string; - srcDoc?: string; - srcLang?: string; - srcSet?: string; - start?: number; - step?: number | string; - style?: CSSProperties; - summary?: string; - tabIndex?: number; - target?: string; - title?: string; - type?: string; - useMap?: string; - value?: string | string[]; - width?: number | string; - wmode?: string; - wrap?: string; - - // RDFa Attributes - about?: string; - datatype?: string; - inlist?: any; - prefix?: string; - property?: string; - resource?: string; - typeof?: string; - vocab?: string; - - // Non-standard Attributes - autoCapitalize?: string; - autoCorrect?: string; - autoSave?: string; - color?: string; - itemProp?: string; - itemScope?: boolean; - itemType?: string; - itemID?: string; - itemRef?: string; - results?: number; - security?: string; - unselectable?: boolean; - - // Allows aria- and data- Attributes - [key: string]: any; - } - - interface SVGAttributes extends HTMLAttributes { - clipPath?: string; - cx?: number | string; - cy?: number | string; - d?: string; - dx?: number | string; - dy?: number | string; - fill?: string; - fillOpacity?: number | string; - fontFamily?: string; - fontSize?: number | string; - fx?: number | string; - fy?: number | string; - gradientTransform?: string; - gradientUnits?: string; - markerEnd?: string; - markerMid?: string; - markerStart?: string; - offset?: number | string; - opacity?: number | string; - patternContentUnits?: string; - patternUnits?: string; - points?: string; - preserveAspectRatio?: string; - r?: number | string; - rx?: number | string; - ry?: number | string; - spreadMethod?: string; - stopColor?: string; - stopOpacity?: number | string; - stroke?: string; - strokeDasharray?: string; - strokeLinecap?: string; - strokeMiterlimit?: string; - strokeOpacity?: number | string; - strokeWidth?: number | string; - textAnchor?: string; - transform?: string; - version?: string; - viewBox?: string; - x1?: number | string; - x2?: number | string; - x?: number | string; - xlinkActuate?: string; - xlinkArcrole?: string; - xlinkHref?: string; - xlinkRole?: string; - xlinkShow?: string; - xlinkTitle?: string; - xlinkType?: string; - xmlBase?: string; - xmlLang?: string; - xmlSpace?: string; - y1?: number | string; - y2?: number | string; - y?: number | string; - } - - // - // React.DOM - // ---------------------------------------------------------------------- - - interface ReactDOM { - // HTML - a: HTMLFactory; - abbr: HTMLFactory; - address: HTMLFactory; - area: HTMLFactory; - article: HTMLFactory; - aside: HTMLFactory; - audio: HTMLFactory; - b: HTMLFactory; - base: HTMLFactory; - bdi: HTMLFactory; - bdo: HTMLFactory; - big: HTMLFactory; - blockquote: HTMLFactory; - body: HTMLFactory; - br: HTMLFactory; - button: HTMLFactory; - canvas: HTMLFactory; - caption: HTMLFactory; - cite: HTMLFactory; - code: HTMLFactory; - col: HTMLFactory; - colgroup: HTMLFactory; - data: HTMLFactory; - datalist: HTMLFactory; - dd: HTMLFactory; - del: HTMLFactory; - details: HTMLFactory; - dfn: HTMLFactory; - dialog: HTMLFactory; - div: HTMLFactory; - dl: HTMLFactory; - dt: HTMLFactory; - em: HTMLFactory; - embed: HTMLFactory; - fieldset: HTMLFactory; - figcaption: HTMLFactory; - figure: HTMLFactory; - footer: HTMLFactory; - form: HTMLFactory; - h1: HTMLFactory; - h2: HTMLFactory; - h3: HTMLFactory; - h4: HTMLFactory; - h5: HTMLFactory; - h6: HTMLFactory; - head: HTMLFactory; - header: HTMLFactory; - hgroup: HTMLFactory; - hr: HTMLFactory; - html: HTMLFactory; - i: HTMLFactory; - iframe: HTMLFactory; - img: HTMLFactory; - input: HTMLFactory; - ins: HTMLFactory; - kbd: HTMLFactory; - keygen: HTMLFactory; - label: HTMLFactory; - legend: HTMLFactory; - li: HTMLFactory; - link: HTMLFactory; - main: HTMLFactory; - map: HTMLFactory; - mark: HTMLFactory; - menu: HTMLFactory; - menuitem: HTMLFactory; - meta: HTMLFactory; - meter: HTMLFactory; - nav: HTMLFactory; - noscript: HTMLFactory; - object: HTMLFactory; - ol: HTMLFactory; - optgroup: HTMLFactory; - option: HTMLFactory; - output: HTMLFactory; - p: HTMLFactory; - param: HTMLFactory; - picture: HTMLFactory; - pre: HTMLFactory; - progress: HTMLFactory; - q: HTMLFactory; - rp: HTMLFactory; - rt: HTMLFactory; - ruby: HTMLFactory; - s: HTMLFactory; - samp: HTMLFactory; - script: HTMLFactory; - section: HTMLFactory; - select: HTMLFactory; - small: HTMLFactory; - source: HTMLFactory; - span: HTMLFactory; - strong: HTMLFactory; - style: HTMLFactory; - sub: HTMLFactory; - summary: HTMLFactory; - sup: HTMLFactory; - table: HTMLFactory; - tbody: HTMLFactory; - td: HTMLFactory; - textarea: HTMLFactory; - tfoot: HTMLFactory; - th: HTMLFactory; - thead: HTMLFactory; - time: HTMLFactory; - title: HTMLFactory; - tr: HTMLFactory; - track: HTMLFactory; - u: HTMLFactory; - ul: HTMLFactory; - "var": HTMLFactory; - video: HTMLFactory; - wbr: HTMLFactory; - - // SVG - svg: SVGFactory; - circle: SVGFactory; - defs: SVGFactory; - ellipse: SVGFactory; - g: SVGFactory; - image: SVGFactory; - line: SVGFactory; - linearGradient: SVGFactory; - mask: SVGFactory; - path: SVGFactory; - pattern: SVGFactory; - polygon: SVGFactory; - polyline: SVGFactory; - radialGradient: SVGFactory; - rect: SVGFactory; - stop: SVGFactory; - text: SVGFactory; - tspan: SVGFactory; - } - - // - // React.PropTypes - // ---------------------------------------------------------------------- - - interface Validator { - (object: T, key: string, componentName: string): Error; - } - - interface Requireable extends Validator { - isRequired: Validator; - } - - interface ValidationMap { - [key: string]: Validator; - } - - interface ReactPropTypes { - any: Requireable; - array: Requireable; - bool: Requireable; - func: Requireable; - number: Requireable; - object: Requireable; - string: Requireable; - node: Requireable; - element: Requireable; - instanceOf(expectedClass: {}): Requireable; - oneOf(types: any[]): Requireable; - oneOfType(types: Validator[]): Requireable; - arrayOf(type: Validator): Requireable; - objectOf(type: Validator): Requireable; - shape(type: ValidationMap): Requireable; - } - - // - // React.Children - // ---------------------------------------------------------------------- - - interface ReactChildren { - map(children: ReactNode, fn: (child: ReactChild, index: number) => T): T[]; - forEach(children: ReactNode, fn: (child: ReactChild, index: number) => any): void; - count(children: ReactNode): number; - only(children: ReactNode): ReactElement; - toArray(children: ReactNode): ReactChild[]; - } - - // - // Browser Interfaces - // https://github.com/nikeee/2048-typescript/blob/master/2048/js/touch.d.ts - // ---------------------------------------------------------------------- - - interface AbstractView { - styleMedia: StyleMedia; - document: Document; - } - - interface Touch { - identifier: number; - target: EventTarget; - screenX: number; - screenY: number; - clientX: number; - clientY: number; - pageX: number; - pageY: number; - } - - interface TouchList { - [index: number]: Touch; - length: number; - item(index: number): Touch; - identifiedTouch(identifier: number): Touch; - } -} - -declare module "react" { - export = __React; -} - -declare namespace JSX { - import React = __React; - - interface Element extends React.ReactElement { } - interface ElementClass extends React.Component { - render(): JSX.Element; - } - interface ElementAttributesProperty { props: {}; } - - interface IntrinsicAttributes { - key?: React.Key; - } - - interface IntrinsicClassAttributes { - ref?: React.Ref; - } - - interface IntrinsicElements { - // HTML - a: React.HTMLProps; - abbr: React.HTMLProps; - address: React.HTMLProps; - area: React.HTMLProps; - article: React.HTMLProps; - aside: React.HTMLProps; - audio: React.HTMLProps; - b: React.HTMLProps; - base: React.HTMLProps; - bdi: React.HTMLProps; - bdo: React.HTMLProps; - big: React.HTMLProps; - blockquote: React.HTMLProps; - body: React.HTMLProps; - br: React.HTMLProps; - button: React.HTMLProps; - canvas: React.HTMLProps; - caption: React.HTMLProps; - cite: React.HTMLProps; - code: React.HTMLProps; - col: React.HTMLProps; - colgroup: React.HTMLProps; - data: React.HTMLProps; - datalist: React.HTMLProps; - dd: React.HTMLProps; - del: React.HTMLProps; - details: React.HTMLProps; - dfn: React.HTMLProps; - dialog: React.HTMLProps; - div: React.HTMLProps; - dl: React.HTMLProps; - dt: React.HTMLProps; - em: React.HTMLProps; - embed: React.HTMLProps; - fieldset: React.HTMLProps; - figcaption: React.HTMLProps; - figure: React.HTMLProps; - footer: React.HTMLProps; - form: React.HTMLProps; - h1: React.HTMLProps; - h2: React.HTMLProps; - h3: React.HTMLProps; - h4: React.HTMLProps; - h5: React.HTMLProps; - h6: React.HTMLProps; - head: React.HTMLProps; - header: React.HTMLProps; - hgroup: React.HTMLProps; - hr: React.HTMLProps; - html: React.HTMLProps; - i: React.HTMLProps; - iframe: React.HTMLProps; - img: React.HTMLProps; - input: React.HTMLProps; - ins: React.HTMLProps; - kbd: React.HTMLProps; - keygen: React.HTMLProps; - label: React.HTMLProps; - legend: React.HTMLProps; - li: React.HTMLProps; - link: React.HTMLProps; - main: React.HTMLProps; - map: React.HTMLProps; - mark: React.HTMLProps; - menu: React.HTMLProps; - menuitem: React.HTMLProps; - meta: React.HTMLProps; - meter: React.HTMLProps; - nav: React.HTMLProps; - noscript: React.HTMLProps; - object: React.HTMLProps; - ol: React.HTMLProps; - optgroup: React.HTMLProps; - option: React.HTMLProps; - output: React.HTMLProps; - p: React.HTMLProps; - param: React.HTMLProps; - picture: React.HTMLProps; - pre: React.HTMLProps; - progress: React.HTMLProps; - q: React.HTMLProps; - rp: React.HTMLProps; - rt: React.HTMLProps; - ruby: React.HTMLProps; - s: React.HTMLProps; - samp: React.HTMLProps; - script: React.HTMLProps; - section: React.HTMLProps; - select: React.HTMLProps; - small: React.HTMLProps; - source: React.HTMLProps; - span: React.HTMLProps; - strong: React.HTMLProps; - style: React.HTMLProps; - sub: React.HTMLProps; - summary: React.HTMLProps; - sup: React.HTMLProps; - table: React.HTMLProps; - tbody: React.HTMLProps; - td: React.HTMLProps; - textarea: React.HTMLProps; - tfoot: React.HTMLProps; - th: React.HTMLProps; - thead: React.HTMLProps; - time: React.HTMLProps; - title: React.HTMLProps; - tr: React.HTMLProps; - track: React.HTMLProps; - u: React.HTMLProps; - ul: React.HTMLProps; - "var": React.HTMLProps; - video: React.HTMLProps; - wbr: React.HTMLProps; - - // SVG - svg: React.SVGProps; - - circle: React.SVGProps; - clipPath: React.SVGProps; - defs: React.SVGProps; - ellipse: React.SVGProps; - g: React.SVGProps; - image: React.SVGProps; - line: React.SVGProps; - linearGradient: React.SVGProps; - mask: React.SVGProps; - path: React.SVGProps; - pattern: React.SVGProps; - polygon: React.SVGProps; - polyline: React.SVGProps; - radialGradient: React.SVGProps; - rect: React.SVGProps; - stop: React.SVGProps; - text: React.SVGProps; - tspan: React.SVGProps; - } -} diff --git a/templates/ReactReduxSpa/typings/redux-thunk/redux-thunk.d.ts b/templates/ReactReduxSpa/typings/redux-thunk/redux-thunk.d.ts deleted file mode 100644 index aafaa045..00000000 --- a/templates/ReactReduxSpa/typings/redux-thunk/redux-thunk.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -// Type definitions for redux-thunk -// Project: https://github.com/gaearon/redux-thunk -// Definitions by: Qubo -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// - -declare module ReduxThunk { - export interface Thunk extends Redux.Middleware {} - export interface ThunkInterface { - (dispatch: Redux.Dispatch, getState?: () => T): any; - } -} - -declare module "redux-thunk" { - var thunk: ReduxThunk.Thunk; - export = thunk; -} diff --git a/templates/ReactReduxSpa/typings/redux/redux.d.ts b/templates/ReactReduxSpa/typings/redux/redux.d.ts deleted file mode 100644 index 44cb297c..00000000 --- a/templates/ReactReduxSpa/typings/redux/redux.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -// Type definitions for Redux v1.0.0 -// Project: https://github.com/rackt/redux -// Definitions by: William Buchwalter , Vincent Prouillet -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -declare module Redux { - - interface ActionCreator extends Function { - (...args: any[]): any; - } - - interface Reducer extends Function { - (state: any, action: any): any; - } - - interface Dispatch extends Function { - (action: any): any; - } - - interface StoreMethods { - dispatch: Dispatch; - getState(): any; - } - - - interface MiddlewareArg { - dispatch: Dispatch; - getState: Function; - } - - interface Middleware extends Function { - (obj: MiddlewareArg): Function; - } - - class Store { - getReducer(): Reducer; - replaceReducer(nextReducer: Reducer): void; - dispatch(action: any): any; - getState(): any; - subscribe(listener: Function): Function; - } - - function createStore(reducer: Reducer, initialState?: any, enhancer?: ()=>any): Store; - function bindActionCreators(actionCreators: T, dispatch: Dispatch): T; - function combineReducers(reducers: any): Reducer; - function applyMiddleware(...middlewares: Middleware[]): Function; - function compose(...functions: Function[]): T; -} - -declare module "redux" { - export = Redux; -} diff --git a/templates/ReactReduxSpa/typings/source-map/source-map.d.ts b/templates/ReactReduxSpa/typings/source-map/source-map.d.ts deleted file mode 100644 index 34aae2b6..00000000 --- a/templates/ReactReduxSpa/typings/source-map/source-map.d.ts +++ /dev/null @@ -1,90 +0,0 @@ -// Type definitions for source-map v0.1.38 -// Project: https://github.com/mozilla/source-map -// Definitions by: Morten Houston Ludvigsen -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -declare module SourceMap { - interface StartOfSourceMap { - file?: string; - sourceRoot?: string; - } - - interface RawSourceMap extends StartOfSourceMap { - version: string; - sources: Array; - names: Array; - sourcesContent?: string[]; - mappings: string; - } - - interface Position { - line: number; - column: number; - } - - interface MappedPosition extends Position { - source: string; - name?: string; - } - - interface MappingItem { - source: string; - generatedLine: number; - generatedColumn: number; - originalLine: number; - originalColumn: number; - name: string; - } - - interface Mapping { - generated: Position; - original: Position; - source: string; - name?: string; - } - - interface CodeWithSourceMap { - code: string; - map: SourceMapGenerator; - } - - class SourceMapConsumer { - public static GENERATED_ORDER: number; - public static ORIGINAL_ORDER: number; - - constructor(rawSourceMap: RawSourceMap); - public originalPositionFor(generatedPosition: Position): MappedPosition; - public generatedPositionFor(originalPosition: MappedPosition): Position; - public sourceContentFor(source: string): string; - public eachMapping(callback: (mapping: MappingItem) => void, context?: any, order?: number): void; - } - - class SourceMapGenerator { - constructor(startOfSourceMap?: StartOfSourceMap); - public static fromSourceMap(sourceMapConsumer: SourceMapConsumer): SourceMapGenerator; - public addMapping(mapping: Mapping): void; - public setSourceContent(sourceFile: string, sourceContent: string): void; - public applySourceMap(sourceMapConsumer: SourceMapConsumer, sourceFile?: string, sourceMapPath?: string): void; - public toString(): string; - } - - class SourceNode { - constructor(); - constructor(line: number, column: number, source: string); - constructor(line: number, column: number, source: string, chunk?: string, name?: string); - public static fromStringWithSourceMap(code: string, sourceMapConsumer: SourceMapConsumer, relativePath?: string): SourceNode; - public add(chunk: any): SourceNode; - public prepend(chunk: any): SourceNode; - public setSourceContent(sourceFile: string, sourceContent: string): void; - public walk(fn: (chunk: string, mapping: MappedPosition) => void): void; - public walkSourceContents(fn: (file: string, content: string) => void): void; - public join(sep: string): SourceNode; - public replaceRight(pattern: string, replacement: string): SourceNode; - public toString(): string; - public toStringWithSourceMap(startOfSourceMap?: StartOfSourceMap): CodeWithSourceMap; - } -} - -declare module 'source-map' { - export = SourceMap; -} diff --git a/templates/ReactReduxSpa/typings/tsd.d.ts b/templates/ReactReduxSpa/typings/tsd.d.ts deleted file mode 100644 index 4a4bd182..00000000 --- a/templates/ReactReduxSpa/typings/tsd.d.ts +++ /dev/null @@ -1,13 +0,0 @@ - -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// diff --git a/templates/ReactReduxSpa/typings/uglify-js/uglify-js.d.ts b/templates/ReactReduxSpa/typings/uglify-js/uglify-js.d.ts deleted file mode 100644 index b9c22bc6..00000000 --- a/templates/ReactReduxSpa/typings/uglify-js/uglify-js.d.ts +++ /dev/null @@ -1,430 +0,0 @@ -// Type definitions for UglifyJS 2 v2.6.1 -// Project: https://github.com/mishoo/UglifyJS2 -// Definitions by: Tanguy Krotoff -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// - -declare module 'uglify-js' { - import * as MOZ_SourceMap from 'source-map'; - - namespace UglifyJS { - interface Tokenizer { - /** - * The type of this token. - * Can be "num", "string", "regexp", "operator", "punc", "atom", "name", "keyword", "comment1" or "comment2". - * "comment1" and "comment2" are for single-line, respectively multi-line comments. - */ - type: string; - - /** - * The name of the file where this token originated from. Useful when compressing multiple files at once to generate the proper source map. - */ - file: string; - - /** - * The "value" of the token. - * That's additional information and depends on the token type: "num", "string" and "regexp" tokens you get their literal value. - * - For "operator" you get the operator. - * - For "punc" it's the punctuation sign (parens, comma, semicolon etc). - * - For "atom", "name" and "keyword" it's the name of the identifier - * - For comments it's the body of the comment (excluding the initial "//" and "/*". - */ - value: string; - - /** - * The line number of this token in the original code. - * 1-based index. - */ - line: number; - - /** - * The column number of this token in the original code. - * 0-based index. - */ - col: number; - - /** - * Short for "newline before", it's a boolean that tells us whether there was a newline before this node in the original source. It helps for automatic semicolon insertion. - * For multi-line comments in particular this will be set to true if there either was a newline before this comment, or * * if this comment contains a newline. - */ - nlb: boolean; - - /** - * This doesn't apply for comment tokens, but for all other token types it will be an array of comment tokens that were found before. - */ - comments_before: string[]; - } - - interface AST_Node { - // The first token of this node - start: AST_Node; - - // The last token of this node - end: AST_Node; - - transform(tt: TreeTransformer): AST_Toplevel; - } - - interface AST_Toplevel extends AST_Node { - // UglifyJS contains a scope analyzer which figures out variable/function definitions, references etc. - // You need to call it manually before compression or mangling. - // The figure_out_scope method is defined only on the AST_Toplevel node. - figure_out_scope(): void; - - // Get names that are optimized for GZip compression (names will be generated using the most frequent characters first) - compute_char_frequency(): void; - - mangle_names(): void; - - print(stream: OutputStream): void; - - print_to_string(options?: BeautifierOptions): string; - } - - interface MinifyOptions { - spidermonkey?: boolean; - outSourceMap?: string; - sourceRoot?: string; - inSourceMap?: string; - fromString?: boolean; - warnings?: boolean; - mangle?: Object; - output?: MinifyOutput, - compress?: Object; - } - - interface MinifyOutput { - code: string; - map: string; - } - - function minify(files: string | Array, options?: MinifyOptions): MinifyOutput; - - - interface ParseOptions { - // Default is false - strict?: boolean; - - // Input file name, default is null - filename?: string; - - // Default is null - toplevel?: AST_Toplevel; - } - - /** - * The parser creates a custom abstract syntax tree given a piece of JavaScript code. - * Perhaps you should read about the AST first. - */ - function parse(code: string, options?: ParseOptions): AST_Toplevel; - - - interface BeautifierOptions { - /** - * Start indentation on every line (only when `beautify`) - */ - indent_start?: number; - - /** - * Indentation level (only when `beautify`) - */ - indent_level?: number; - - /** - * Quote all keys in object literals? - */ - quote_keys?: boolean; - - /** - * Add a space after colon signs? - */ - space_colon?: boolean; - - /** - * Output ASCII-safe? (encodes Unicode characters as ASCII) - */ - ascii_only?: boolean; - - /** - * Escape " boolean; - - /** - * UglifyJS provides a TreeWalker object and every node has a walk method that given a walker will apply your visitor to each node in the tree. - * Your visitor can return a non-falsy value in order to prevent descending the current node. - */ - function TreeWalker(visitor: visitor): TreeWalker; - - - // TODO - interface TreeTransformer extends TreeWalker { - } - - /** - * The tree transformer is a special case of a tree walker. - * In fact it even inherits from TreeWalker and you can use the same methods, but initialization and visitor protocol are a bit different. - */ - function TreeTransformer(before: visitor, after: visitor): TreeTransformer; - } - - export = UglifyJS; -} diff --git a/templates/ReactReduxSpa/typings/webpack/webpack-env.d.ts b/templates/ReactReduxSpa/typings/webpack/webpack-env.d.ts deleted file mode 100644 index 04580949..00000000 --- a/templates/ReactReduxSpa/typings/webpack/webpack-env.d.ts +++ /dev/null @@ -1,232 +0,0 @@ -// Type definitions for webpack 1.12.2 (module API) -// Project: https://github.com/webpack/webpack -// Definitions by: use-strict -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/** - * Webpack module API - variables and global functions available inside modules - */ - -declare namespace __WebpackModuleApi { - interface RequireContext { - keys(): string[]; - (id: string): T; - resolve(id: string): string; - } - - interface RequireFunction { - /** - * Returns the exports from a dependency. The call is sync. No request to the server is fired. The compiler ensures that the dependency is available. - */ - (path: string): T; - /** - * Behaves similar to require.ensure, but the callback is called with the exports of each dependency in the paths array. There is no option to provide a chunk name. - */ - (paths: string[], callback: (...modules: any[]) => void): void; - /** - * Download additional dependencies on demand. The paths array lists modules that should be available. When they are, callback is called. If the callback is a function expression, dependencies in that source part are extracted and also loaded on demand. A single request is fired to the server, except if all modules are already available. - * - * This creates a chunk. The chunk can be named. If a chunk with this name already exists, the dependencies are merged into that chunk and that chunk is used. - */ - ensure: (paths: string[], callback: (require: (path: string) => T) => void, chunkName?: string) => void; - context: (path: string, deep?: boolean, filter?: RegExp) => RequireContext; - /** - * Returns the module id of a dependency. The call is sync. No request to the server is fired. The compiler ensures that the dependency is available. - * - * The module id is a number in webpack (in contrast to node.js where it is a string, the filename). - */ - resolve(path: string): number; - /** - * Like require.resolve, but doesn’t include the module into the bundle. It’s a weak dependency. - */ - resolveWeak(path: string): number; - /** - * Ensures that the dependency is available, but don’t execute it. This can be use for optimizing the position of a module in the chunks. - */ - include(path: string): void; - /** - * Multiple requires to the same module result in only one module execution and only one export. Therefore a cache in the runtime exists. Removing values from this cache cause new module execution and a new export. This is only needed in rare cases (for compatibility!). - */ - cache: { - [id: string]: any; - } - } - - interface Module { - exports: any; - require(id: string): any; - id: string; - filename: string; - loaded: boolean; - parent: any; - children: any[]; - hot: Hot; - } - type ModuleId = string|number; - - interface Hot { - /** - * Accept code updates for the specified dependencies. The callback is called when dependencies were replaced. - * @param dependencies - * @param callback - */ - accept(dependencies: string[], callback: (updatedDependencies: ModuleId[]) => void): void; - /** - * Accept code updates for the specified dependencies. The callback is called when dependencies were replaced. - * @param dependency - * @param callback - */ - accept(dependency: string, callback: () => void): void; - /** - * Accept code updates for this module without notification of parents. - * This should only be used if the module doesn’t export anything. - * The errHandler can be used to handle errors that occur while loading the updated module. - * @param errHandler - */ - accept(errHandler?: (err: Error) => void): void; - /** - * Do not accept updates for the specified dependencies. If any dependencies is updated, the code update fails with code "decline". - */ - decline(dependencies: string[]): void; - /** - * Do not accept updates for the specified dependencies. If any dependencies is updated, the code update fails with code "decline". - */ - decline(dependency: string): void; - /** - * Flag the current module as not update-able. If updated the update code would fail with code "decline". - */ - decline(): void; - /** - * Add a one time handler, which is executed when the current module code is replaced. - * Here you should destroy/remove any persistent resource you have claimed/created. - * If you want to transfer state to the new module, add it to data object. - * The data will be available at module.hot.data on the new module. - * @param callback - */ - dispose(callback: (data: T) => void): void; - /** - * Add a one time handler, which is executed when the current module code is replaced. - * Here you should destroy/remove any persistent resource you have claimed/created. - * If you want to transfer state to the new module, add it to data object. - * The data will be available at module.hot.data on the new module. - * @param callback - */ - addDisposeHandler(callback: (data: T) => void): void; - /** - * Remove a handler. - * This can useful to add a temporary dispose handler. You could i. e. replace code while in the middle of a multi-step async function. - * @param callback - */ - removeDisposeHandler(callback: (data: T) => void): void; - /** - * Throws an exceptions if status() is not idle. - * Check all currently loaded modules for updates and apply updates if found. - * If no update was found, the callback is called with null. - * If autoApply is truthy the callback will be called with all modules that were disposed. - * apply() is automatically called with autoApply as options parameter. - * If autoApply is not set the callback will be called with all modules that will be disposed on apply(). - * @param autoApply - * @param callback - */ - check(autoApply: boolean, callback: (err: Error, outdatedModules: ModuleId[]) => void): void; - /** - * Throws an exceptions if status() is not idle. - * Check all currently loaded modules for updates and apply updates if found. - * If no update was found, the callback is called with null. - * The callback will be called with all modules that will be disposed on apply(). - * @param callback - */ - check(callback: (err: Error, outdatedModules: ModuleId[]) => void): void; - /** - * If status() != "ready" it throws an error. - * Continue the update process. - * @param options - * @param callback - */ - apply(options: AcceptOptions, callback: (err: Error, outdatedModules: ModuleId[]) => void): void; - /** - * If status() != "ready" it throws an error. - * Continue the update process. - * @param callback - */ - apply(callback: (err: Error, outdatedModules: ModuleId[]) => void): void; - /** - * Return one of idle, check, watch, watch-delay, prepare, ready, dispose, apply, abort or fail. - */ - status(): string; - /** Register a callback on status change. */ - status(callback: (status: string) => void): void; - /** Register a callback on status change. */ - addStatusHandler(callback: (status: string) => void): void; - /** - * Remove a registered status change handler. - * @param callback - */ - removeStatusHandler(callback: (status: string) => void): void; - - active: boolean; - data: {}; - } - - interface AcceptOptions { - /** - * If true the update process continues even if some modules are not accepted (and would bubble to the entry point). - */ - ignoreUnaccepted?: boolean; - /** - * Indicates that apply() is automatically called by check function - */ - autoApply?: boolean; - } -} - -declare var require: __WebpackModuleApi.RequireFunction; - -/** - * The resource query of the current module. - * - * e.g. __resourceQuery === "?test" // Inside "file.js?test" - */ -declare var __resourceQuery: string; - -/** - * Equals the config options output.publicPath. - */ -declare var __webpack_public_path__: string; - -/** - * The raw require function. This expression isn’t parsed by the Parser for dependencies. - */ -declare var __webpack_require__: any; - -/** - * The internal chunk loading function - * - * @param chunkId The id for the chunk to load. - * @param callback A callback function called once the chunk is loaded. - */ -declare var __webpack_chunk_load__: (chunkId: any, callback: (require: (id: string) => any) => void) => void; - -/** - * Access to the internal object of all modules. - */ -declare var __webpack_modules__: any[]; - -/** - * Access to the hash of the compilation. - * - * Only available with the HotModuleReplacementPlugin or the ExtendedAPIPlugin - */ -declare var __webpack_hash__: any; - -/** - * Generates a require function that is not parsed by webpack. Can be used to do cool stuff with a global require function if available. - */ -declare var __non_webpack_require__: any; - -/** - * Equals the config option debug - */ -declare var DEBUG: boolean; - -declare var module: __WebpackModuleApi.Module; diff --git a/templates/ReactReduxSpa/typings/whatwg-fetch/whatwg-fetch.d.ts b/templates/ReactReduxSpa/typings/whatwg-fetch/whatwg-fetch.d.ts deleted file mode 100644 index 64dd9048..00000000 --- a/templates/ReactReduxSpa/typings/whatwg-fetch/whatwg-fetch.d.ts +++ /dev/null @@ -1,85 +0,0 @@ -// Type definitions for fetch API -// Project: https://github.com/github/fetch -// Definitions by: Ryan Graham -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -declare class Request extends Body { - constructor(input: string|Request, init?:RequestInit); - method: string; - url: string; - headers: Headers; - context: string|RequestContext; - referrer: string; - mode: string|RequestMode; - credentials: string|RequestCredentials; - cache: string|RequestCache; -} - -interface RequestInit { - method?: string; - headers?: HeaderInit|{ [index: string]: string }; - body?: BodyInit; - mode?: string|RequestMode; - credentials?: string|RequestCredentials; - cache?: string|RequestCache; -} - -declare enum RequestContext { - "audio", "beacon", "cspreport", "download", "embed", "eventsource", "favicon", "fetch", - "font", "form", "frame", "hyperlink", "iframe", "image", "imageset", "import", - "internal", "location", "manifest", "object", "ping", "plugin", "prefetch", "script", - "serviceworker", "sharedworker", "subresource", "style", "track", "video", "worker", - "xmlhttprequest", "xslt" -} -declare enum RequestMode { "same-origin", "no-cors", "cors" } -declare enum RequestCredentials { "omit", "same-origin", "include" } -declare enum RequestCache { "default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached" } - -declare class Headers { - append(name: string, value: string): void; - delete(name: string):void; - get(name: string): string; - getAll(name: string): Array; - has(name: string): boolean; - set(name: string, value: string): void; -} - -declare class Body { - bodyUsed: boolean; - arrayBuffer(): Promise; - blob(): Promise; - formData(): Promise; - json(): Promise; - json(): Promise; - text(): Promise; -} -declare class Response extends Body { - constructor(body?: BodyInit, init?: ResponseInit); - error(): Response; - redirect(url: string, status: number): Response; - type: string|ResponseType; - url: string; - status: number; - ok: boolean; - statusText: string; - headers: Headers; - clone(): Response; -} - -declare enum ResponseType { "basic", "cors", "default", "error", "opaque" } - -interface ResponseInit { - status: number; - statusText?: string; - headers?: HeaderInit; -} - -declare type HeaderInit = Headers|Array; -declare type BodyInit = Blob|FormData|string; -declare type RequestInfo = Request|string; - -interface Window { - fetch(url: string|Request, init?: RequestInit): Promise; -} - -declare var fetch: typeof window.fetch; diff --git a/templates/ReactSpa/package.json b/templates/ReactSpa/package.json index cdb6d9c0..561f7394 100644 --- a/templates/ReactSpa/package.json +++ b/templates/ReactSpa/package.json @@ -2,27 +2,32 @@ "name": "WebApplicationBasic", "version": "0.0.0", "devDependencies": { - "aspnet-webpack": "^1.0.6", + "@types/react": "^0.14.38", + "@types/react-dom": "^0.14.17", + "@types/react-router": "^2.0.37", + "@types/whatwg-fetch": "0.0.31", + "aspnet-webpack": "^1.0.17", "aspnet-webpack-react": "^1.0.2", - "babel-core": "^6.5.2", - "babel-loader": "^6.2.3", - "babel-preset-es2015": "^6.5.0", - "babel-preset-react": "^6.5.0", + "babel-core": "^6.17.0", + "babel-loader": "^6.2.5", + "babel-preset-es2015": "^6.16.0", + "babel-preset-react": "^6.16.0", "bootstrap": "^3.3.6", - "css-loader": "^0.23.1", + "css-loader": "^0.25.0", + "extendify": "^1.0.0", "event-source-polyfill": "^0.0.7", "extract-text-webpack-plugin": "^1.0.1", - "file-loader": "^0.8.5", + "file-loader": "^0.9.0", "isomorphic-fetch": "^2.2.1", "jquery": "^2.2.1", - "react": "^15.0.1", - "react-dom": "^15.0.1", - "react-router": "^2.1.1", - "style-loader": "^0.13.0", - "ts-loader": "^0.8.1", - "typescript": "^1.8.2", + "react": "^15.3.2", + "react-dom": "^15.3.2", + "react-router": "^2.8.1", + "style-loader": "^0.13.1", + "ts-loader": "^0.8.2", + "typescript": "^2.0.3", "url-loader": "^0.5.7", - "webpack": "^1.12.14", - "webpack-hot-middleware": "^2.10.0" + "webpack": "^1.13.2", + "webpack-hot-middleware": "^2.12.2" } } diff --git a/templates/ReactSpa/tsconfig.json b/templates/ReactSpa/tsconfig.json index 69ed93a9..7ff4b4e2 100644 --- a/templates/ReactSpa/tsconfig.json +++ b/templates/ReactSpa/tsconfig.json @@ -4,7 +4,8 @@ "target": "es6", "jsx": "preserve", "sourceMap": true, - "skipDefaultLibCheck": true + "skipDefaultLibCheck": true, + "types": [ "react", "react-dom", "react-router", "whatwg-fetch" ] }, "exclude": [ "bin", diff --git a/templates/ReactSpa/tsd.json b/templates/ReactSpa/tsd.json deleted file mode 100644 index b69d22fe..00000000 --- a/templates/ReactSpa/tsd.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "version": "v4", - "repo": "borisyankov/DefinitelyTyped", - "ref": "master", - "path": "typings", - "bundle": "typings/tsd.d.ts", - "installed": { - "react/react.d.ts": { - "commit": "dade4414712ce84e3c63393f1aae407e9e7e6af7" - }, - "react-router/react-router.d.ts": { - "commit": "dade4414712ce84e3c63393f1aae407e9e7e6af7" - }, - "react/react-dom.d.ts": { - "commit": "dade4414712ce84e3c63393f1aae407e9e7e6af7" - }, - "react-router/history.d.ts": { - "commit": "dade4414712ce84e3c63393f1aae407e9e7e6af7" - }, - "isomorphic-fetch/isomorphic-fetch.d.ts": { - "commit": "57ec5fbb76060329c10959d449eb1d4e70b15a65" - } - } -} diff --git a/templates/ReactSpa/typings/isomorphic-fetch/isomorphic-fetch.d.ts b/templates/ReactSpa/typings/isomorphic-fetch/isomorphic-fetch.d.ts deleted file mode 100644 index 19754db0..00000000 --- a/templates/ReactSpa/typings/isomorphic-fetch/isomorphic-fetch.d.ts +++ /dev/null @@ -1,119 +0,0 @@ -// Type definitions for isomorphic-fetch -// Project: https://github.com/matthew-andrews/isomorphic-fetch -// Definitions by: Todd Lucas -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -declare enum RequestContext { - "audio", "beacon", "cspreport", "download", "embed", "eventsource", - "favicon", "fetch", "font", "form", "frame", "hyperlink", "iframe", - "image", "imageset", "import", "internal", "location", "manifest", - "object", "ping", "plugin", "prefetch", "script", "serviceworker", - "sharedworker", "subresource", "style", "track", "video", "worker", - "xmlhttprequest", "xslt" -} -declare enum RequestMode { "same-origin", "no-cors", "cors" } -declare enum RequestCredentials { "omit", "same-origin", "include" } -declare enum RequestCache { - "default", "no-store", "reload", "no-cache", "force-cache", - "only-if-cached" -} -declare enum ResponseType { "basic", "cors", "default", "error", "opaque" } - -declare type HeaderInit = Headers | Array; -declare type BodyInit = ArrayBuffer | ArrayBufferView | Blob | FormData | string; -declare type RequestInfo = Request | string; - -interface RequestInit { - method?: string; - headers?: HeaderInit | { [index: string]: string }; - body?: BodyInit; - mode?: string | RequestMode; - credentials?: string | RequestCredentials; - cache?: string | RequestCache; -} - -interface IHeaders { - get(name: string): string; - getAll(name: string): Array; - has(name: string): boolean; -} - -declare class Headers implements IHeaders { - append(name: string, value: string): void; - delete(name: string):void; - get(name: string): string; - getAll(name: string): Array; - has(name: string): boolean; - set(name: string, value: string): void; -} - -interface IBody { - bodyUsed: boolean; - arrayBuffer(): Promise; - blob(): Promise; - formData(): Promise; - json(): Promise; - json(): Promise; - text(): Promise; -} - -declare class Body implements IBody { - bodyUsed: boolean; - arrayBuffer(): Promise; - blob(): Promise; - formData(): Promise; - json(): Promise; - json(): Promise; - text(): Promise; -} - -interface IRequest extends IBody { - method: string; - url: string; - headers: Headers; - context: string | RequestContext; - referrer: string; - mode: string | RequestMode; - credentials: string | RequestCredentials; - cache: string | RequestCache; -} - -declare class Request extends Body implements IRequest { - constructor(input: string | Request, init?: RequestInit); - method: string; - url: string; - headers: Headers; - context: string | RequestContext; - referrer: string; - mode: string | RequestMode; - credentials: string | RequestCredentials; - cache: string | RequestCache; -} - -interface IResponse extends IBody { - url: string; - status: number; - statusText: string; - ok: boolean; - headers: IHeaders; - type: string | ResponseType; - size: number; - timeout: number; - redirect(url: string, status: number): IResponse; - error(): IResponse; - clone(): IResponse; -} - -interface IFetchStatic { - Promise: any; - Headers: IHeaders - Request: IRequest; - Response: IResponse; - (url: string | IRequest, init?: RequestInit): Promise; -} - -declare var fetch: IFetchStatic; - -declare module "isomorphic-fetch" { - export = fetch; -} diff --git a/templates/ReactSpa/typings/react-router/history.d.ts b/templates/ReactSpa/typings/react-router/history.d.ts deleted file mode 100644 index 1b5c6dfa..00000000 --- a/templates/ReactSpa/typings/react-router/history.d.ts +++ /dev/null @@ -1,192 +0,0 @@ -// Type definitions for history v1.13.1 -// Project: https://github.com/rackt/history -// Definitions by: Sergey Buturlakin -// Definitions: https://github.com/borisyankov/DefinitelyTyped - - -declare namespace HistoryModule { - - // types based on https://github.com/rackt/history/blob/master/docs/Terms.md - - type Action = string - - type BeforeUnloadHook = () => string | boolean - - type CreateHistory = (options?: HistoryOptions) => T - - type CreateHistoryEnhancer = (createHistory: CreateHistory) => CreateHistory - - interface History { - listenBefore(hook: TransitionHook): Function - listen(listener: LocationListener): Function - transitionTo(location: Location): void - pushState(state: LocationState, path: Path): void - replaceState(state: LocationState, path: Path): void - push(path: Path): void - replace(path: Path): void - go(n: number): void - goBack(): void - goForward(): void - createKey(): LocationKey - createPath(path: Path): Path - createHref(path: Path): Href - createLocation(path?: Path, state?: LocationState, action?: Action, key?: LocationKey): Location - - /** @deprecated use location.key to save state instead */ - setState(state: LocationState): void - /** @deprecated use listenBefore instead */ - registerTransitionHook(hook: TransitionHook): void - /** @deprecated use the callback returned from listenBefore instead */ - unregisterTransitionHook(hook: TransitionHook): void - } - - type HistoryOptions = Object - - type Href = string - - type Location = { - pathname: Pathname - search: QueryString - query: Query - state: LocationState - action: Action - key: LocationKey - } - - type LocationKey = string - - type LocationListener = (location: Location) => void - - type LocationState = Object - - type Path = string // Pathname + QueryString - - type Pathname = string - - type Query = Object - - type QueryString = string - - type TransitionHook = (location: Location, callback: Function) => any - - - interface HistoryBeforeUnload { - listenBeforeUnload(hook: BeforeUnloadHook): Function - } - - interface HistoryQueries { - pushState(state: LocationState, pathname: Pathname | Path, query?: Query): void - replaceState(state: LocationState, pathname: Pathname | Path, query?: Query): void - createPath(path: Path, query?: Query): Path - createHref(path: Path, query?: Query): Href - } - - - // Global usage, without modules, needs the small trick, because lib.d.ts - // already has `history` and `History` global definitions: - // var createHistory = ((window as any).History as HistoryModule.Module).createHistory; - interface Module { - createHistory: CreateHistory - createHashHistory: CreateHistory - createMemoryHistory: CreateHistory - createLocation(path?: Path, state?: LocationState, action?: Action, key?: LocationKey): Location - useBasename(createHistory: CreateHistory): CreateHistory - useBeforeUnload(createHistory: CreateHistory): CreateHistory - useQueries(createHistory: CreateHistory): CreateHistory - actions: { - PUSH: string - REPLACE: string - POP: string - } - } - -} - - -declare module "history/lib/createBrowserHistory" { - - export default function createBrowserHistory(options?: HistoryModule.HistoryOptions): HistoryModule.History - -} - - -declare module "history/lib/createHashHistory" { - - export default function createHashHistory(options?: HistoryModule.HistoryOptions): HistoryModule.History - -} - - -declare module "history/lib/createMemoryHistory" { - - export default function createMemoryHistory(options?: HistoryModule.HistoryOptions): HistoryModule.History - -} - - -declare module "history/lib/createLocation" { - - export default function createLocation(path?: HistoryModule.Path, state?: HistoryModule.LocationState, action?: HistoryModule.Action, key?: HistoryModule.LocationKey): HistoryModule.Location - -} - - -declare module "history/lib/useBasename" { - - export default function useBasename(createHistory: HistoryModule.CreateHistory): HistoryModule.CreateHistory - -} - - -declare module "history/lib/useBeforeUnload" { - - export default function useBeforeUnload(createHistory: HistoryModule.CreateHistory): HistoryModule.CreateHistory - -} - - -declare module "history/lib/useQueries" { - - export default function useQueries(createHistory: HistoryModule.CreateHistory): HistoryModule.CreateHistory - -} - - -declare module "history/lib/actions" { - - export const PUSH: string - - export const REPLACE: string - - export const POP: string - - export default { - PUSH, - REPLACE, - POP - } - -} - - -declare module "history" { - - export { default as createHistory } from "history/lib/createBrowserHistory" - - export { default as createHashHistory } from "history/lib/createHashHistory" - - export { default as createMemoryHistory } from "history/lib/createMemoryHistory" - - export { default as createLocation } from "history/lib/createLocation" - - export { default as useBasename } from "history/lib/useBasename" - - export { default as useBeforeUnload } from "history/lib/useBeforeUnload" - - export { default as useQueries } from "history/lib/useQueries" - - import * as Actions from "history/lib/actions" - - export { Actions } - -} diff --git a/templates/ReactSpa/typings/react-router/react-router.d.ts b/templates/ReactSpa/typings/react-router/react-router.d.ts deleted file mode 100644 index abed5eb6..00000000 --- a/templates/ReactSpa/typings/react-router/react-router.d.ts +++ /dev/null @@ -1,474 +0,0 @@ -// Type definitions for react-router v2.0.0-rc5 -// Project: https://github.com/rackt/react-router -// Definitions by: Sergey Buturlakin , Yuichi Murata , Václav Ostrožlík -// Definitions: https://github.com/borisyankov/DefinitelyTyped - - -/// -/// - - -declare namespace ReactRouter { - - import React = __React - - import H = HistoryModule - - // types based on https://github.com/rackt/react-router/blob/master/docs/Glossary.md - - type Component = React.ReactType - - type EnterHook = (nextState: RouterState, replaceState: RedirectFunction, callback?: Function) => any - - type LeaveHook = () => any - - type Params = Object - - type ParseQueryString = (queryString: H.QueryString) => H.Query - - type RedirectFunction = (state: H.LocationState, pathname: H.Pathname | H.Path, query?: H.Query) => void - - type RouteComponent = Component - - // use the following interface in an app code to get access to route param values, history, location... - // interface MyComponentProps extends ReactRouter.RouteComponentProps<{}, { id: number }> {} - // somewhere in MyComponent - // ... - // let id = this.props.routeParams.id - // ... - // this.props.history. ... - // ... - interface RouteComponentProps { - history?: History - location?: H.Location - params?: P - route?: PlainRoute - routeParams?: R - routes?: PlainRoute[] - children?: React.ReactElement - } - - type RouteComponents = { [key: string]: RouteComponent } - - type RouteConfig = React.ReactNode | PlainRoute | PlainRoute[] - - type RouteHook = (nextLocation?: H.Location) => any - - type RoutePattern = string - - type StringifyQuery = (queryObject: H.Query) => H.QueryString - - type RouterListener = (error: Error, nextState: RouterState) => void - - interface RouterState { - location: H.Location - routes: PlainRoute[] - params: Params - components: RouteComponent[] - } - - - interface HistoryBase extends H.History { - routes: PlainRoute[] - parseQueryString?: ParseQueryString - stringifyQuery?: StringifyQuery - } - - type History = HistoryBase & H.HistoryQueries & HistoryRoutes - const browserHistory: History; - const hashHistory: History; - - /* components */ - - interface RouterProps extends React.Props { - history?: H.History - routes?: RouteConfig // alias for children - createElement?: (component: RouteComponent, props: Object) => any - onError?: (error: any) => any - onUpdate?: () => any - parseQueryString?: ParseQueryString - stringifyQuery?: StringifyQuery - } - interface Router extends React.ComponentClass {} - interface RouterElement extends React.ReactElement {} - const Router: Router - - - interface LinkProps extends React.HTMLAttributes, React.Props { - activeStyle?: React.CSSProperties - activeClassName?: string - onlyActiveOnIndex?: boolean - to: RoutePattern - query?: H.Query - state?: H.LocationState - } - interface Link extends React.ComponentClass {} - interface LinkElement extends React.ReactElement {} - const Link: Link - - - const IndexLink: Link - - - interface RouterContextProps extends React.Props { - history?: H.History - router: Router - createElement: (component: RouteComponent, props: Object) => any - location: H.Location - routes: RouteConfig - params: Params - components?: RouteComponent[] - } - interface RouterContext extends React.ComponentClass {} - interface RouterContextElement extends React.ReactElement { - history?: H.History - location: H.Location - router?: Router - } - const RouterContext: RouterContext - - - /* components (configuration) */ - - interface RouteProps extends React.Props { - path?: RoutePattern - component?: RouteComponent - components?: RouteComponents - getComponent?: (location: H.Location, cb: (error: any, component?: RouteComponent) => void) => void - getComponents?: (location: H.Location, cb: (error: any, components?: RouteComponents) => void) => void - onEnter?: EnterHook - onLeave?: LeaveHook - getIndexRoute?: (location: H.Location, cb: (error: any, indexRoute: RouteConfig) => void) => void - getChildRoutes?: (location: H.Location, cb: (error: any, childRoutes: RouteConfig) => void) => void - } - interface Route extends React.ComponentClass {} - interface RouteElement extends React.ReactElement {} - const Route: Route - - - interface PlainRoute { - path?: RoutePattern - component?: RouteComponent - components?: RouteComponents - getComponent?: (location: H.Location, cb: (error: any, component?: RouteComponent) => void) => void - getComponents?: (location: H.Location, cb: (error: any, components?: RouteComponents) => void) => void - onEnter?: EnterHook - onLeave?: LeaveHook - indexRoute?: PlainRoute - getIndexRoute?: (location: H.Location, cb: (error: any, indexRoute: RouteConfig) => void) => void - childRoutes?: PlainRoute[] - getChildRoutes?: (location: H.Location, cb: (error: any, childRoutes: RouteConfig) => void) => void - } - - - interface RedirectProps extends React.Props { - path?: RoutePattern - from?: RoutePattern // alias for path - to: RoutePattern - query?: H.Query - state?: H.LocationState - } - interface Redirect extends React.ComponentClass {} - interface RedirectElement extends React.ReactElement {} - const Redirect: Redirect - - - interface IndexRouteProps extends React.Props { - component?: RouteComponent - components?: RouteComponents - getComponent?: (location: H.Location, cb: (error: any, component?: RouteComponent) => void) => void - getComponents?: (location: H.Location, cb: (error: any, components?: RouteComponents) => void) => void - onEnter?: EnterHook - onLeave?: LeaveHook - } - interface IndexRoute extends React.ComponentClass {} - interface IndexRouteElement extends React.ReactElement {} - const IndexRoute: IndexRoute - - - interface IndexRedirectProps extends React.Props { - to: RoutePattern - query?: H.Query - state?: H.LocationState - } - interface IndexRedirect extends React.ComponentClass {} - interface IndexRedirectElement extends React.ReactElement {} - const IndexRedirect: IndexRedirect - - - /* mixins */ - - interface HistoryMixin { - history: History - } - const History: React.Mixin - - - interface LifecycleMixin { - routerWillLeave(nextLocation: H.Location): string | boolean - } - const Lifecycle: React.Mixin - - - const RouteContext: React.Mixin - - - /* utils */ - - interface HistoryRoutes { - listen(listener: RouterListener): Function - listenBeforeLeavingRoute(route: PlainRoute, hook: RouteHook): void - match(location: H.Location, callback: (error: any, nextState: RouterState, nextLocation: H.Location) => void): void - isActive(pathname: H.Pathname, query?: H.Query, indexOnly?: boolean): boolean - } - - function useRoutes(createHistory: HistoryModule.CreateHistory): HistoryModule.CreateHistory - - - function createRoutes(routes: RouteConfig): PlainRoute[] - - - interface MatchArgs { - routes?: RouteConfig - history?: H.History - location?: H.Location - parseQueryString?: ParseQueryString - stringifyQuery?: StringifyQuery - } - interface MatchState extends RouterState { - history: History - } - function match(args: MatchArgs, cb: (error: any, nextLocation: H.Location, nextState: MatchState) => void): void - -} - - -declare module "react-router/lib/Router" { - - export default ReactRouter.Router - -} - - -declare module "react-router/lib/Link" { - - export default ReactRouter.Link - -} - - -declare module "react-router/lib/IndexLink" { - - export default ReactRouter.IndexLink - -} - - -declare module "react-router/lib/IndexRedirect" { - - export default ReactRouter.IndexRedirect - -} - - -declare module "react-router/lib/IndexRoute" { - - export default ReactRouter.IndexRoute - -} - - -declare module "react-router/lib/Redirect" { - - export default ReactRouter.Redirect - -} - - -declare module "react-router/lib/Route" { - - export default ReactRouter.Route - -} - - -declare module "react-router/lib/History" { - - export default ReactRouter.History - -} - - -declare module "react-router/lib/Lifecycle" { - - export default ReactRouter.Lifecycle - -} - - -declare module "react-router/lib/RouteContext" { - - export default ReactRouter.RouteContext - -} - - -declare module "react-router/lib/useRoutes" { - - export default ReactRouter.useRoutes - -} - -declare module "react-router/lib/PatternUtils" { - - export function formatPattern(pattern: string, params: {}): string; - -} - -declare module "react-router/lib/RouteUtils" { - - type E = __React.ReactElement - - export function isReactChildren(object: E | E[]): boolean - - export function createRouteFromReactElement(element: E): ReactRouter.PlainRoute - - export function createRoutesFromReactChildren(children: E | E[], parentRoute: ReactRouter.PlainRoute): ReactRouter.PlainRoute[] - - export import createRoutes = ReactRouter.createRoutes - -} - - -declare module "react-router/lib/RouterContext" { - - export default ReactRouter.RouterContext - -} - - -declare module "react-router/lib/PropTypes" { - - import React = __React - - export function falsy(props: any, propName: string, componentName: string): Error; - - export const history: React.Requireable - - export const location: React.Requireable - - export const component: React.Requireable - - export const components: React.Requireable - - export const route: React.Requireable - - export const routes: React.Requireable - - export default { - falsy, - history, - location, - component, - components, - route - } - -} - -declare module "react-router/lib/browserHistory" { - export default ReactRouter.browserHistory; -} - -declare module "react-router/lib/hashHistory" { - export default ReactRouter.hashHistory; -} - -declare module "react-router/lib/match" { - - export default ReactRouter.match - -} - - -declare module "react-router" { - - import Router from "react-router/lib/Router" - - import Link from "react-router/lib/Link" - - import IndexLink from "react-router/lib/IndexLink" - - import IndexRedirect from "react-router/lib/IndexRedirect" - - import IndexRoute from "react-router/lib/IndexRoute" - - import Redirect from "react-router/lib/Redirect" - - import Route from "react-router/lib/Route" - - import History from "react-router/lib/History" - - import Lifecycle from "react-router/lib/Lifecycle" - - import RouteContext from "react-router/lib/RouteContext" - - import browserHistory from "react-router/lib/browserHistory" - - import hashHistory from "react-router/lib/hashHistory" - - import useRoutes from "react-router/lib/useRoutes" - - import { createRoutes } from "react-router/lib/RouteUtils" - - import { formatPattern } from "react-router/lib/PatternUtils" - - import RouterContext from "react-router/lib/RouterContext" - - import PropTypes from "react-router/lib/PropTypes" - - import match from "react-router/lib/match" - - // PlainRoute is defined in the API documented at: - // https://github.com/rackt/react-router/blob/master/docs/API.md - // but not included in any of the .../lib modules above. - export type PlainRoute = ReactRouter.PlainRoute - - // The following definitions are also very useful to export - // because by using these types lots of potential type errors - // can be exposed: - export type EnterHook = ReactRouter.EnterHook - export type LeaveHook = ReactRouter.LeaveHook - export type ParseQueryString = ReactRouter.ParseQueryString - export type RedirectFunction = ReactRouter.RedirectFunction - export type RouteComponentProps = ReactRouter.RouteComponentProps; - export type RouteHook = ReactRouter.RouteHook - export type StringifyQuery = ReactRouter.StringifyQuery - export type RouterListener = ReactRouter.RouterListener - export type RouterState = ReactRouter.RouterState - export type HistoryBase = ReactRouter.HistoryBase - - export { - Router, - Link, - IndexLink, - IndexRedirect, - IndexRoute, - Redirect, - Route, - History, - browserHistory, - hashHistory, - Lifecycle, - RouteContext, - useRoutes, - createRoutes, - formatPattern, - RouterContext, - PropTypes, - match - } - - export default Router - -} diff --git a/templates/ReactSpa/typings/react/react-dom.d.ts b/templates/ReactSpa/typings/react/react-dom.d.ts deleted file mode 100644 index 80a0c604..00000000 --- a/templates/ReactSpa/typings/react/react-dom.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -// Type definitions for React v0.14 (react-dom) -// Project: http://facebook.github.io/react/ -// Definitions by: Asana , AssureSign , Microsoft -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// - -declare namespace __React { - namespace __DOM { - function findDOMNode(instance: ReactInstance): E; - function findDOMNode(instance: ReactInstance): Element; - - function render

( - element: DOMElement

, - container: Element, - callback?: (element: Element) => any): Element; - function render( - element: ClassicElement

, - container: Element, - callback?: (component: ClassicComponent) => any): ClassicComponent; - function render( - element: ReactElement

, - container: Element, - callback?: (component: Component) => any): Component; - - function unmountComponentAtNode(container: Element): boolean; - - var version: string; - - function unstable_batchedUpdates(callback: (a: A, b: B) => any, a: A, b: B): void; - function unstable_batchedUpdates(callback: (a: A) => any, a: A): void; - function unstable_batchedUpdates(callback: () => any): void; - - function unstable_renderSubtreeIntoContainer

( - parentComponent: Component, - nextElement: DOMElement

, - container: Element, - callback?: (element: Element) => any): Element; - function unstable_renderSubtreeIntoContainer( - parentComponent: Component, - nextElement: ClassicElement

, - container: Element, - callback?: (component: ClassicComponent) => any): ClassicComponent; - function unstable_renderSubtreeIntoContainer( - parentComponent: Component, - nextElement: ReactElement

, - container: Element, - callback?: (component: Component) => any): Component; - } - - namespace __DOMServer { - function renderToString(element: ReactElement): string; - function renderToStaticMarkup(element: ReactElement): string; - var version: string; - } -} - -declare module "react-dom" { - import DOM = __React.__DOM; - export = DOM; -} - -declare module "react-dom/server" { - import DOMServer = __React.__DOMServer; - export = DOMServer; -} diff --git a/templates/ReactSpa/typings/react/react.d.ts b/templates/ReactSpa/typings/react/react.d.ts deleted file mode 100644 index 5753731b..00000000 --- a/templates/ReactSpa/typings/react/react.d.ts +++ /dev/null @@ -1,2281 +0,0 @@ -// Type definitions for React v0.14 -// Project: http://facebook.github.io/react/ -// Definitions by: Asana , AssureSign , Microsoft -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -declare namespace __React { - - // - // React Elements - // ---------------------------------------------------------------------- - - type ReactType = string | ComponentClass | StatelessComponent; - - interface ReactElement

> { - type: string | ComponentClass

| StatelessComponent

; - props: P; - key: string | number; - ref: string | ((component: Component | Element) => any); - } - - interface ClassicElement

extends ReactElement

{ - type: ClassicComponentClass

; - ref: string | ((component: ClassicComponent) => any); - } - - interface DOMElement

> extends ReactElement

{ - type: string; - ref: string | ((element: Element) => any); - } - - interface ReactHTMLElement extends DOMElement> { - ref: string | ((element: HTMLElement) => any); - } - - interface ReactSVGElement extends DOMElement { - ref: string | ((element: SVGElement) => any); - } - - // - // Factories - // ---------------------------------------------------------------------- - - interface Factory

{ - (props?: P, ...children: ReactNode[]): ReactElement

; - } - - interface ClassicFactory

extends Factory

{ - (props?: P, ...children: ReactNode[]): ClassicElement

; - } - - interface DOMFactory

> extends Factory

{ - (props?: P, ...children: ReactNode[]): DOMElement

; - } - - type HTMLFactory = DOMFactory>; - type SVGFactory = DOMFactory; - - // - // React Nodes - // http://facebook.github.io/react/docs/glossary.html - // ---------------------------------------------------------------------- - - type ReactText = string | number; - type ReactChild = ReactElement | ReactText; - - // Should be Array but type aliases cannot be recursive - type ReactFragment = {} | Array; - type ReactNode = ReactChild | ReactFragment | boolean; - - // - // Top Level API - // ---------------------------------------------------------------------- - - function createClass(spec: ComponentSpec): ClassicComponentClass

; - - function createFactory

(type: string): DOMFactory

; - function createFactory

(type: ClassicComponentClass

): ClassicFactory

; - function createFactory

(type: ComponentClass

| StatelessComponent

): Factory

; - - function createElement

( - type: string, - props?: P, - ...children: ReactNode[]): DOMElement

; - function createElement

( - type: ClassicComponentClass

, - props?: P, - ...children: ReactNode[]): ClassicElement

; - function createElement

( - type: ComponentClass

| StatelessComponent

, - props?: P, - ...children: ReactNode[]): ReactElement

; - - function cloneElement

( - element: DOMElement

, - props?: P, - ...children: ReactNode[]): DOMElement

; - function cloneElement

( - element: ClassicElement

, - props?: P, - ...children: ReactNode[]): ClassicElement

; - function cloneElement

( - element: ReactElement

, - props?: P, - ...children: ReactNode[]): ReactElement

; - - function isValidElement(object: {}): boolean; - - var DOM: ReactDOM; - var PropTypes: ReactPropTypes; - var Children: ReactChildren; - - // - // Component API - // ---------------------------------------------------------------------- - - type ReactInstance = Component | Element; - - // Base component for plain JS classes - class Component implements ComponentLifecycle { - constructor(props?: P, context?: any); - setState(f: (prevState: S, props: P) => S, callback?: () => any): void; - setState(state: S, callback?: () => any): void; - forceUpdate(callBack?: () => any): void; - render(): JSX.Element; - props: P; - state: S; - context: {}; - refs: { - [key: string]: ReactInstance - }; - } - - interface ClassicComponent extends Component { - replaceState(nextState: S, callback?: () => any): void; - isMounted(): boolean; - getInitialState?(): S; - } - - interface ChildContextProvider { - getChildContext(): CC; - } - - // - // Class Interfaces - // ---------------------------------------------------------------------- - - interface StatelessComponent

{ - (props?: P, context?: any): ReactElement; - propTypes?: ValidationMap

; - contextTypes?: ValidationMap; - defaultProps?: P; - displayName?: string; - } - - interface ComponentClass

{ - new(props?: P, context?: any): Component; - propTypes?: ValidationMap

; - contextTypes?: ValidationMap; - childContextTypes?: ValidationMap; - defaultProps?: P; - } - - interface ClassicComponentClass

extends ComponentClass

{ - new(props?: P, context?: any): ClassicComponent; - getDefaultProps?(): P; - displayName?: string; - } - - // - // Component Specs and Lifecycle - // ---------------------------------------------------------------------- - - interface ComponentLifecycle { - componentWillMount?(): void; - componentDidMount?(): void; - componentWillReceiveProps?(nextProps: P, nextContext: any): void; - shouldComponentUpdate?(nextProps: P, nextState: S, nextContext: any): boolean; - componentWillUpdate?(nextProps: P, nextState: S, nextContext: any): void; - componentDidUpdate?(prevProps: P, prevState: S, prevContext: any): void; - componentWillUnmount?(): void; - } - - interface Mixin extends ComponentLifecycle { - mixins?: Mixin; - statics?: { - [key: string]: any; - }; - - displayName?: string; - propTypes?: ValidationMap; - contextTypes?: ValidationMap; - childContextTypes?: ValidationMap; - - getDefaultProps?(): P; - getInitialState?(): S; - } - - interface ComponentSpec extends Mixin { - render(): ReactElement; - - [propertyName: string]: any; - } - - // - // Event System - // ---------------------------------------------------------------------- - - interface SyntheticEvent { - bubbles: boolean; - cancelable: boolean; - currentTarget: EventTarget; - defaultPrevented: boolean; - eventPhase: number; - isTrusted: boolean; - nativeEvent: Event; - preventDefault(): void; - stopPropagation(): void; - target: EventTarget; - timeStamp: Date; - type: string; - } - - interface ClipboardEvent extends SyntheticEvent { - clipboardData: DataTransfer; - } - - interface CompositionEvent extends SyntheticEvent { - data: string; - } - - interface DragEvent extends SyntheticEvent { - dataTransfer: DataTransfer; - } - - interface FocusEvent extends SyntheticEvent { - relatedTarget: EventTarget; - } - - interface FormEvent extends SyntheticEvent { - } - - interface KeyboardEvent extends SyntheticEvent { - altKey: boolean; - charCode: number; - ctrlKey: boolean; - getModifierState(key: string): boolean; - key: string; - keyCode: number; - locale: string; - location: number; - metaKey: boolean; - repeat: boolean; - shiftKey: boolean; - which: number; - } - - interface MouseEvent extends SyntheticEvent { - altKey: boolean; - button: number; - buttons: number; - clientX: number; - clientY: number; - ctrlKey: boolean; - getModifierState(key: string): boolean; - metaKey: boolean; - pageX: number; - pageY: number; - relatedTarget: EventTarget; - screenX: number; - screenY: number; - shiftKey: boolean; - } - - interface TouchEvent extends SyntheticEvent { - altKey: boolean; - changedTouches: TouchList; - ctrlKey: boolean; - getModifierState(key: string): boolean; - metaKey: boolean; - shiftKey: boolean; - targetTouches: TouchList; - touches: TouchList; - } - - interface UIEvent extends SyntheticEvent { - detail: number; - view: AbstractView; - } - - interface WheelEvent extends SyntheticEvent { - deltaMode: number; - deltaX: number; - deltaY: number; - deltaZ: number; - } - - // - // Event Handler Types - // ---------------------------------------------------------------------- - - interface EventHandler { - (event: E): void; - } - - type ReactEventHandler = EventHandler; - - type ClipboardEventHandler = EventHandler; - type CompositionEventHandler = EventHandler; - type DragEventHandler = EventHandler; - type FocusEventHandler = EventHandler; - type FormEventHandler = EventHandler; - type KeyboardEventHandler = EventHandler; - type MouseEventHandler = EventHandler; - type TouchEventHandler = EventHandler; - type UIEventHandler = EventHandler; - type WheelEventHandler = EventHandler; - - // - // Props / DOM Attributes - // ---------------------------------------------------------------------- - - interface Props { - children?: ReactNode; - key?: string | number; - ref?: string | ((component: T) => any); - } - - interface HTMLProps extends HTMLAttributes, Props { - } - - interface SVGProps extends SVGAttributes, Props { - } - - interface DOMAttributes { - dangerouslySetInnerHTML?: { - __html: string; - }; - - // Clipboard Events - onCopy?: ClipboardEventHandler; - onCut?: ClipboardEventHandler; - onPaste?: ClipboardEventHandler; - - // Composition Events - onCompositionEnd?: CompositionEventHandler; - onCompositionStart?: CompositionEventHandler; - onCompositionUpdate?: CompositionEventHandler; - - // Focus Events - onFocus?: FocusEventHandler; - onBlur?: FocusEventHandler; - - // Form Events - onChange?: FormEventHandler; - onInput?: FormEventHandler; - onSubmit?: FormEventHandler; - - // Image Events - onLoad?: ReactEventHandler; - onError?: ReactEventHandler; // also a Media Event - - // Keyboard Events - onKeyDown?: KeyboardEventHandler; - onKeyPress?: KeyboardEventHandler; - onKeyUp?: KeyboardEventHandler; - - // Media Events - onAbort?: ReactEventHandler; - onCanPlay?: ReactEventHandler; - onCanPlayThrough?: ReactEventHandler; - onDurationChange?: ReactEventHandler; - onEmptied?: ReactEventHandler; - onEncrypted?: ReactEventHandler; - onEnded?: ReactEventHandler; - onLoadedData?: ReactEventHandler; - onLoadedMetadata?: ReactEventHandler; - onLoadStart?: ReactEventHandler; - onPause?: ReactEventHandler; - onPlay?: ReactEventHandler; - onPlaying?: ReactEventHandler; - onProgress?: ReactEventHandler; - onRateChange?: ReactEventHandler; - onSeeked?: ReactEventHandler; - onSeeking?: ReactEventHandler; - onStalled?: ReactEventHandler; - onSuspend?: ReactEventHandler; - onTimeUpdate?: ReactEventHandler; - onVolumeChange?: ReactEventHandler; - onWaiting?: ReactEventHandler; - - // MouseEvents - onClick?: MouseEventHandler; - onContextMenu?: MouseEventHandler; - onDoubleClick?: MouseEventHandler; - onDrag?: DragEventHandler; - onDragEnd?: DragEventHandler; - onDragEnter?: DragEventHandler; - onDragExit?: DragEventHandler; - onDragLeave?: DragEventHandler; - onDragOver?: DragEventHandler; - onDragStart?: DragEventHandler; - onDrop?: DragEventHandler; - onMouseDown?: MouseEventHandler; - onMouseEnter?: MouseEventHandler; - onMouseLeave?: MouseEventHandler; - onMouseMove?: MouseEventHandler; - onMouseOut?: MouseEventHandler; - onMouseOver?: MouseEventHandler; - onMouseUp?: MouseEventHandler; - - // Selection Events - onSelect?: ReactEventHandler; - - // Touch Events - onTouchCancel?: TouchEventHandler; - onTouchEnd?: TouchEventHandler; - onTouchMove?: TouchEventHandler; - onTouchStart?: TouchEventHandler; - - // UI Events - onScroll?: UIEventHandler; - - // Wheel Events - onWheel?: WheelEventHandler; - } - - // This interface is not complete. Only properties accepting - // unitless numbers are listed here (see CSSProperty.js in React) - interface CSSProperties { - boxFlex?: number; - boxFlexGroup?: number; - columnCount?: number; - flex?: number | string; - flexGrow?: number; - flexShrink?: number; - fontWeight?: number | string; - lineClamp?: number; - lineHeight?: number | string; - opacity?: number; - order?: number; - orphans?: number; - widows?: number; - zIndex?: number; - zoom?: number; - - fontSize?: number | string; - - // SVG-related properties - fillOpacity?: number; - strokeOpacity?: number; - strokeWidth?: number; - - // Remaining properties auto-extracted from http://docs.webplatform.org. - // License: http://docs.webplatform.org/wiki/Template:CC-by-3.0 - /** - * Aligns a flex container's lines within the flex container when there is extra space in the cross-axis, similar to how justify-content aligns individual items within the main-axis. - */ - alignContent?: any; - - /** - * Sets the default alignment in the cross axis for all of the flex container's items, including anonymous flex items, similarly to how justify-content aligns items along the main axis. - */ - alignItems?: any; - - /** - * Allows the default alignment to be overridden for individual flex items. - */ - alignSelf?: any; - - /** - * This property allows precise alignment of elements, such as graphics, that do not have a baseline-table or lack the desired baseline in their baseline-table. With the alignment-adjust property, the position of the baseline identified by the alignment-baseline can be explicitly determined. It also determines precisely the alignment point for each glyph within a textual element. - */ - alignmentAdjust?: any; - - alignmentBaseline?: any; - - /** - * Defines a length of time to elapse before an animation starts, allowing an animation to begin execution some time after it is applied. - */ - animationDelay?: any; - - /** - * Defines whether an animation should run in reverse on some or all cycles. - */ - animationDirection?: any; - - /** - * Specifies how many times an animation cycle should play. - */ - animationIterationCount?: any; - - /** - * Defines the list of animations that apply to the element. - */ - animationName?: any; - - /** - * Defines whether an animation is running or paused. - */ - animationPlayState?: any; - - /** - * Allows changing the style of any element to platform-based interface elements or vice versa. - */ - appearance?: any; - - /** - * Determines whether or not the “back” side of a transformed element is visible when facing the viewer. - */ - backfaceVisibility?: any; - - /** - * This property describes how the element's background images should blend with each other and the element's background color. - * The value is a list of blend modes that corresponds to each background image. Each element in the list will apply to the corresponding element of background-image. If a property doesn’t have enough comma-separated values to match the number of layers, the UA must calculate its used value by repeating the list of values until there are enough. - */ - backgroundBlendMode?: any; - - backgroundColor?: any; - - backgroundComposite?: any; - - /** - * Applies one or more background images to an element. These can be any valid CSS image, including url() paths to image files or CSS gradients. - */ - backgroundImage?: any; - - /** - * Specifies what the background-position property is relative to. - */ - backgroundOrigin?: any; - - /** - * Sets the horizontal position of a background image. - */ - backgroundPositionX?: any; - - /** - * Background-repeat defines if and how background images will be repeated after they have been sized and positioned - */ - backgroundRepeat?: any; - - /** - * Obsolete - spec retired, not implemented. - */ - baselineShift?: any; - - /** - * Non standard. Sets or retrieves the location of the Dynamic HTML (DHTML) behavior. - */ - behavior?: any; - - /** - * Shorthand property that defines the different properties of all four sides of an element's border in a single declaration. It can be used to set border-width, border-style and border-color, or a subset of these. - */ - border?: any; - - /** - * Defines the shape of the border of the bottom-left corner. - */ - borderBottomLeftRadius?: any; - - /** - * Defines the shape of the border of the bottom-right corner. - */ - borderBottomRightRadius?: any; - - /** - * Sets the width of an element's bottom border. To set all four borders, use the border-width shorthand property which sets the values simultaneously for border-top-width, border-right-width, border-bottom-width, and border-left-width. - */ - borderBottomWidth?: any; - - /** - * Border-collapse can be used for collapsing the borders between table cells - */ - borderCollapse?: any; - - /** - * The CSS border-color property sets the color of an element's four borders. This property can have from one to four values, made up of the elementary properties: • border-top-color - * • border-right-color - * • border-bottom-color - * • border-left-color The default color is the currentColor of each of these values. - * If you provide one value, it sets the color for the element. Two values set the horizontal and vertical values, respectively. Providing three values sets the top, vertical, and bottom values, in that order. Four values set all for sides: top, right, bottom, and left, in that order. - */ - borderColor?: any; - - /** - * Specifies different corner clipping effects, such as scoop (inner curves), bevel (straight cuts) or notch (cut-off rectangles). Works along with border-radius to specify the size of each corner effect. - */ - borderCornerShape?: any; - - /** - * The property border-image-source is used to set the image to be used instead of the border style. If this is set to none the border-style is used instead. - */ - borderImageSource?: any; - - /** - * The border-image-width CSS property defines the offset to use for dividing the border image in nine parts, the top-left corner, central top edge, top-right-corner, central right edge, bottom-right corner, central bottom edge, bottom-left corner, and central right edge. They represent inward distance from the top, right, bottom, and left edges. - */ - borderImageWidth?: any; - - /** - * Shorthand property that defines the border-width, border-style and border-color of an element's left border in a single declaration. Note that you can use the corresponding longhand properties to set specific individual properties of the left border — border-left-width, border-left-style and border-left-color. - */ - borderLeft?: any; - - /** - * The CSS border-left-color property sets the color of an element's left border. This page explains the border-left-color value, but often you will find it more convenient to fix the border's left color as part of a shorthand set, either border-left or border-color. - * Colors can be defined several ways. For more information, see Usage. - */ - borderLeftColor?: any; - - /** - * Sets the style of an element's left border. To set all four borders, use the shorthand property, border-style. Otherwise, you can set the borders individually with border-top-style, border-right-style, border-bottom-style, border-left-style. - */ - borderLeftStyle?: any; - - /** - * Sets the width of an element's left border. To set all four borders, use the border-width shorthand property which sets the values simultaneously for border-top-width, border-right-width, border-bottom-width, and border-left-width. - */ - borderLeftWidth?: any; - - /** - * Shorthand property that defines the border-width, border-style and border-color of an element's right border in a single declaration. Note that you can use the corresponding longhand properties to set specific individual properties of the right border — border-right-width, border-right-style and border-right-color. - */ - borderRight?: any; - - /** - * Sets the color of an element's right border. This page explains the border-right-color value, but often you will find it more convenient to fix the border's right color as part of a shorthand set, either border-right or border-color. - * Colors can be defined several ways. For more information, see Usage. - */ - borderRightColor?: any; - - /** - * Sets the style of an element's right border. To set all four borders, use the shorthand property, border-style. Otherwise, you can set the borders individually with border-top-style, border-right-style, border-bottom-style, border-left-style. - */ - borderRightStyle?: any; - - /** - * Sets the width of an element's right border. To set all four borders, use the border-width shorthand property which sets the values simultaneously for border-top-width, border-right-width, border-bottom-width, and border-left-width. - */ - borderRightWidth?: any; - - /** - * Specifies the distance between the borders of adjacent cells. - */ - borderSpacing?: any; - - /** - * Sets the style of an element's four borders. This property can have from one to four values. With only one value, the value will be applied to all four borders; otherwise, this works as a shorthand property for each of border-top-style, border-right-style, border-bottom-style, border-left-style, where each border style may be assigned a separate value. - */ - borderStyle?: any; - - /** - * Shorthand property that defines the border-width, border-style and border-color of an element's top border in a single declaration. Note that you can use the corresponding longhand properties to set specific individual properties of the top border — border-top-width, border-top-style and border-top-color. - */ - borderTop?: any; - - /** - * Sets the color of an element's top border. This page explains the border-top-color value, but often you will find it more convenient to fix the border's top color as part of a shorthand set, either border-top or border-color. - * Colors can be defined several ways. For more information, see Usage. - */ - borderTopColor?: any; - - /** - * Sets the rounding of the top-left corner of the element. - */ - borderTopLeftRadius?: any; - - /** - * Sets the rounding of the top-right corner of the element. - */ - borderTopRightRadius?: any; - - /** - * Sets the style of an element's top border. To set all four borders, use the shorthand property, border-style. Otherwise, you can set the borders individually with border-top-style, border-right-style, border-bottom-style, border-left-style. - */ - borderTopStyle?: any; - - /** - * Sets the width of an element's top border. To set all four borders, use the border-width shorthand property which sets the values simultaneously for border-top-width, border-right-width, border-bottom-width, and border-left-width. - */ - borderTopWidth?: any; - - /** - * Sets the width of an element's four borders. This property can have from one to four values. This is a shorthand property for setting values simultaneously for border-top-width, border-right-width, border-bottom-width, and border-left-width. - */ - borderWidth?: any; - - /** - * This property specifies how far an absolutely positioned box's bottom margin edge is offset above the bottom edge of the box's containing block. For relatively positioned boxes, the offset is with respect to the bottom edges of the box itself (i.e., the box is given a position in the normal flow, then offset from that position according to these properties). - */ - bottom?: any; - - /** - * Obsolete. - */ - boxAlign?: any; - - /** - * Breaks a box into fragments creating new borders, padding and repeating backgrounds or lets it stay as a continuous box on a page break, column break, or, for inline elements, at a line break. - */ - boxDecorationBreak?: any; - - /** - * Deprecated - */ - boxDirection?: any; - - /** - * Do not use. This property has been replaced by the flex-wrap property. - * Gets or sets a value that specifies the direction to add successive rows or columns when the value of box-lines is set to multiple. - */ - boxLineProgression?: any; - - /** - * Do not use. This property has been replaced by the flex-wrap property. - * Gets or sets a value that specifies whether child elements wrap onto multiple lines or columns based on the space available in the object. - */ - boxLines?: any; - - /** - * Do not use. This property has been replaced by flex-order. - * Specifies the ordinal group that a child element of the object belongs to. This ordinal value identifies the display order (along the axis defined by the box-orient property) for the group. - */ - boxOrdinalGroup?: any; - - /** - * The CSS break-after property allows you to force a break on multi-column layouts. More specifically, it allows you to force a break after an element. It allows you to determine if a break should occur, and what type of break it should be. The break-after CSS property describes how the page, column or region break behaves after the generated box. If there is no generated box, the property is ignored. - */ - breakAfter?: any; - - /** - * Control page/column/region breaks that fall above a block of content - */ - breakBefore?: any; - - /** - * Control page/column/region breaks that fall within a block of content - */ - breakInside?: any; - - /** - * The clear CSS property specifies if an element can be positioned next to or must be positioned below the floating elements that precede it in the markup. - */ - clear?: any; - - /** - * Deprecated; see clip-path. - * Lets you specify the dimensions of an absolutely positioned element that should be visible, and the element is clipped into this shape, and displayed. - */ - clip?: any; - - /** - * Clipping crops an graphic, so that only a portion of the graphic is rendered, or filled. This clip-rule property, when used with the clip-path property, defines which clip rule, or algorithm, to use when filling the different parts of a graphics. - */ - clipRule?: any; - - /** - * The color property sets the color of an element's foreground content (usually text), accepting any standard CSS color from keywords and hex values to RGB(a) and HSL(a). - */ - color?: any; - - /** - * Specifies how to fill columns (balanced or sequential). - */ - columnFill?: any; - - /** - * The column-gap property controls the width of the gap between columns in multi-column elements. - */ - columnGap?: any; - - /** - * Sets the width, style, and color of the rule between columns. - */ - columnRule?: any; - - /** - * Specifies the color of the rule between columns. - */ - columnRuleColor?: any; - - /** - * Specifies the width of the rule between columns. - */ - columnRuleWidth?: any; - - /** - * The column-span CSS property makes it possible for an element to span across all columns when its value is set to all. An element that spans more than one column is called a spanning element. - */ - columnSpan?: any; - - /** - * Specifies the width of columns in multi-column elements. - */ - columnWidth?: any; - - /** - * This property is a shorthand property for setting column-width and/or column-count. - */ - columns?: any; - - /** - * The counter-increment property accepts one or more names of counters (identifiers), each one optionally followed by an integer which specifies the value by which the counter should be incremented (e.g. if the value is 2, the counter increases by 2 each time it is invoked). - */ - counterIncrement?: any; - - /** - * The counter-reset property contains a list of one or more names of counters, each one optionally followed by an integer (otherwise, the integer defaults to 0.) Each time the given element is invoked, the counters specified by the property are set to the given integer. - */ - counterReset?: any; - - /** - * The cue property specifies sound files (known as an "auditory icon") to be played by speech media agents before and after presenting an element's content; if only one file is specified, it is played both before and after. The volume at which the file(s) should be played, relative to the volume of the main element, may also be specified. The icon files may also be set separately with the cue-before and cue-after properties. - */ - cue?: any; - - /** - * The cue-after property specifies a sound file (known as an "auditory icon") to be played by speech media agents after presenting an element's content; the volume at which the file should be played may also be specified. The shorthand property cue sets cue sounds for both before and after the element is presented. - */ - cueAfter?: any; - - /** - * The direction CSS property specifies the text direction/writing direction. The rtl is used for Hebrew or Arabic text, the ltr is for other languages. - */ - direction?: any; - - /** - * This property specifies the type of rendering box used for an element. It is a shorthand property for many other display properties. - */ - display?: any; - - /** - * The ‘fill’ property paints the interior of the given graphical element. The area to be painted consists of any areas inside the outline of the shape. To determine the inside of the shape, all subpaths are considered, and the interior is determined according to the rules associated with the current value of the ‘fill-rule’ property. The zero-width geometric outline of a shape is included in the area to be painted. - */ - fill?: any; - - /** - * The ‘fill-rule’ property indicates the algorithm which is to be used to determine what parts of the canvas are included inside the shape. For a simple, non-intersecting path, it is intuitively clear what region lies "inside"; however, for a more complex path, such as a path that intersects itself or where one subpath encloses another, the interpretation of "inside" is not so obvious. - * The ‘fill-rule’ property provides two options for how the inside of a shape is determined: - */ - fillRule?: any; - - /** - * Applies various image processing effects. This property is largely unsupported. See Compatibility section for more information. - */ - filter?: any; - - /** - * Obsolete, do not use. This property has been renamed to align-items. - * Specifies the alignment (perpendicular to the layout axis defined by the flex-direction property) of child elements of the object. - */ - flexAlign?: any; - - /** - * The flex-basis CSS property describes the initial main size of the flex item before any free space is distributed according to the flex factors described in the flex property (flex-grow and flex-shrink). - */ - flexBasis?: any; - - /** - * The flex-direction CSS property describes how flex items are placed in the flex container, by setting the direction of the flex container's main axis. - */ - flexDirection?: any; - - /** - * The flex-flow CSS property defines the flex container's main and cross axis. It is a shorthand property for the flex-direction and flex-wrap properties. - */ - flexFlow?: any; - - /** - * Do not use. This property has been renamed to align-self - * Specifies the alignment (perpendicular to the layout axis defined by flex-direction) of child elements of the object. - */ - flexItemAlign?: any; - - /** - * Do not use. This property has been renamed to align-content. - * Specifies how a flexbox's lines align within the flexbox when there is extra space along the axis that is perpendicular to the axis defined by the flex-direction property. - */ - flexLinePack?: any; - - /** - * Gets or sets a value that specifies the ordinal group that a flexbox element belongs to. This ordinal value identifies the display order for the group. - */ - flexOrder?: any; - - /** - * Elements which have the style float are floated horizontally. These elements can move as far to the left or right of the containing element. All elements after the floating element will flow around it, but elements before the floating element are not impacted. If several floating elements are placed after each other, they will float next to each other as long as there is room. - */ - float?: any; - - /** - * Flows content from a named flow (specified by a corresponding flow-into) through selected elements to form a dynamic chain of layout regions. - */ - flowFrom?: any; - - /** - * The font property is shorthand that allows you to do one of two things: you can either set up six of the most mature font properties in one line, or you can set one of a choice of keywords to adopt a system font setting. - */ - font?: any; - - /** - * The font-family property allows one or more font family names and/or generic family names to be specified for usage on the selected element(s)' text. The browser then goes through the list; for each character in the selection it applies the first font family that has an available glyph for that character. - */ - fontFamily?: any; - - /** - * The font-kerning property allows contextual adjustment of inter-glyph spacing, i.e. the spaces between the characters in text. This property controls metric kerning - that utilizes adjustment data contained in the font. Optical Kerning is not supported as yet. - */ - fontKerning?: any; - - /** - * The font-size-adjust property adjusts the font-size of the fallback fonts defined with font-family, so that the x-height is the same no matter what font is used. This preserves the readability of the text when fallback happens. - */ - fontSizeAdjust?: any; - - /** - * Allows you to expand or condense the widths for a normal, condensed, or expanded font face. - */ - fontStretch?: any; - - /** - * The font-style property allows normal, italic, or oblique faces to be selected. Italic forms are generally cursive in nature while oblique faces are typically sloped versions of the regular face. Oblique faces can be simulated by artificially sloping the glyphs of the regular face. - */ - fontStyle?: any; - - /** - * This value specifies whether the user agent is allowed to synthesize bold or oblique font faces when a font family lacks bold or italic faces. - */ - fontSynthesis?: any; - - /** - * The font-variant property enables you to select the small-caps font within a font family. - */ - fontVariant?: any; - - /** - * Fonts can provide alternate glyphs in addition to default glyph for a character. This property provides control over the selection of these alternate glyphs. - */ - fontVariantAlternates?: any; - - /** - * Lays out one or more grid items bound by 4 grid lines. Shorthand for setting grid-column-start, grid-column-end, grid-row-start, and grid-row-end in a single declaration. - */ - gridArea?: any; - - /** - * Controls a grid item's placement in a grid area, particularly grid position and a grid span. Shorthand for setting grid-column-start and grid-column-end in a single declaration. - */ - gridColumn?: any; - - /** - * Controls a grid item's placement in a grid area as well as grid position and a grid span. The grid-column-end property (with grid-row-start, grid-row-end, and grid-column-start) determines a grid item's placement by specifying the grid lines of a grid item's grid area. - */ - gridColumnEnd?: any; - - /** - * Determines a grid item's placement by specifying the starting grid lines of a grid item's grid area . A grid item's placement in a grid area consists of a grid position and a grid span. See also ( grid-row-start, grid-row-end, and grid-column-end) - */ - gridColumnStart?: any; - - /** - * Gets or sets a value that indicates which row an element within a Grid should appear in. Shorthand for setting grid-row-start and grid-row-end in a single declaration. - */ - gridRow?: any; - - /** - * Determines a grid item’s placement by specifying the block-end. A grid item's placement in a grid area consists of a grid position and a grid span. The grid-row-end property (with grid-row-start, grid-column-start, and grid-column-end) determines a grid item's placement by specifying the grid lines of a grid item's grid area. - */ - gridRowEnd?: any; - - /** - * Specifies a row position based upon an integer location, string value, or desired row size. - * css/properties/grid-row is used as short-hand for grid-row-position and grid-row-position - */ - gridRowPosition?: any; - - gridRowSpan?: any; - - /** - * Specifies named grid areas which are not associated with any particular grid item, but can be referenced from the grid-placement properties. The syntax of the grid-template-areas property also provides a visualization of the structure of the grid, making the overall layout of the grid container easier to understand. - */ - gridTemplateAreas?: any; - - /** - * Specifies (with grid-template-rows) the line names and track sizing functions of the grid. Each sizing function can be specified as a length, a percentage of the grid container’s size, a measurement of the contents occupying the column or row, or a fraction of the free space in the grid. - */ - gridTemplateColumns?: any; - - /** - * Specifies (with grid-template-columns) the line names and track sizing functions of the grid. Each sizing function can be specified as a length, a percentage of the grid container’s size, a measurement of the contents occupying the column or row, or a fraction of the free space in the grid. - */ - gridTemplateRows?: any; - - /** - * Sets the height of an element. The content area of the element height does not include the padding, border, and margin of the element. - */ - height?: any; - - /** - * Specifies the minimum number of characters in a hyphenated word - */ - hyphenateLimitChars?: any; - - /** - * Indicates the maximum number of successive hyphenated lines in an element. The ‘no-limit’ value means that there is no limit. - */ - hyphenateLimitLines?: any; - - /** - * Specifies the maximum amount of trailing whitespace (before justification) that may be left in a line before hyphenation is triggered to pull part of a word from the next line back up into the current one. - */ - hyphenateLimitZone?: any; - - /** - * Specifies whether or not words in a sentence can be split by the use of a manual or automatic hyphenation mechanism. - */ - hyphens?: any; - - imeMode?: any; - - layoutGrid?: any; - - layoutGridChar?: any; - - layoutGridLine?: any; - - layoutGridMode?: any; - - layoutGridType?: any; - - /** - * Sets the left edge of an element - */ - left?: any; - - /** - * The letter-spacing CSS property specifies the spacing behavior between text characters. - */ - letterSpacing?: any; - - /** - * Deprecated. Gets or sets line-breaking rules for text in selected languages such as Japanese, Chinese, and Korean. - */ - lineBreak?: any; - - /** - * Shorthand property that sets the list-style-type, list-style-position and list-style-image properties in one declaration. - */ - listStyle?: any; - - /** - * This property sets the image that will be used as the list item marker. When the image is available, it will replace the marker set with the 'list-style-type' marker. That also means that if the image is not available, it will show the style specified by list-style-property - */ - listStyleImage?: any; - - /** - * Specifies if the list-item markers should appear inside or outside the content flow. - */ - listStylePosition?: any; - - /** - * Specifies the type of list-item marker in a list. - */ - listStyleType?: any; - - /** - * The margin property is shorthand to allow you to set all four margins of an element at once. Its equivalent longhand properties are margin-top, margin-right, margin-bottom and margin-left. Negative values are also allowed. - */ - margin?: any; - - /** - * margin-bottom sets the bottom margin of an element. - */ - marginBottom?: any; - - /** - * margin-left sets the left margin of an element. - */ - marginLeft?: any; - - /** - * margin-right sets the right margin of an element. - */ - marginRight?: any; - - /** - * margin-top sets the top margin of an element. - */ - marginTop?: any; - - /** - * The marquee-direction determines the initial direction in which the marquee content moves. - */ - marqueeDirection?: any; - - /** - * The 'marquee-style' property determines a marquee's scrolling behavior. - */ - marqueeStyle?: any; - - /** - * This property is shorthand for setting mask-image, mask-mode, mask-repeat, mask-position, mask-clip, mask-origin, mask-composite and mask-size. Omitted values are set to their original properties' initial values. - */ - mask?: any; - - /** - * This property is shorthand for setting mask-border-source, mask-border-slice, mask-border-width, mask-border-outset, and mask-border-repeat. Omitted values are set to their original properties' initial values. - */ - maskBorder?: any; - - /** - * This property specifies how the images for the sides and the middle part of the mask image are scaled and tiled. The first keyword applies to the horizontal sides, the second one applies to the vertical ones. If the second keyword is absent, it is assumed to be the same as the first, similar to the CSS border-image-repeat property. - */ - maskBorderRepeat?: any; - - /** - * This property specifies inward offsets from the top, right, bottom, and left edges of the mask image, dividing it into nine regions: four corners, four edges, and a middle. The middle image part is discarded and treated as fully transparent black unless the fill keyword is present. The four values set the top, right, bottom and left offsets in that order, similar to the CSS border-image-slice property. - */ - maskBorderSlice?: any; - - /** - * Specifies an image to be used as a mask. An image that is empty, fails to download, is non-existent, or cannot be displayed is ignored and does not mask the element. - */ - maskBorderSource?: any; - - /** - * This property sets the width of the mask box image, similar to the CSS border-image-width property. - */ - maskBorderWidth?: any; - - /** - * Determines the mask painting area, which defines the area that is affected by the mask. The painted content of an element may be restricted to this area. - */ - maskClip?: any; - - /** - * For elements rendered as a single box, specifies the mask positioning area. For elements rendered as multiple boxes (e.g., inline boxes on several lines, boxes on several pages) specifies which boxes box-decoration-break operates on to determine the mask positioning area(s). - */ - maskOrigin?: any; - - /** - * This property must not be used. It is no longer included in any standard or standard track specification, nor is it implemented in any browser. It is only used when the text-align-last property is set to size. It controls allowed adjustments of font-size to fit line content. - */ - maxFontSize?: any; - - /** - * Sets the maximum height for an element. It prevents the height of the element to exceed the specified value. If min-height is specified and is greater than max-height, max-height is overridden. - */ - maxHeight?: any; - - /** - * Sets the maximum width for an element. It limits the width property to be larger than the value specified in max-width. - */ - maxWidth?: any; - - /** - * Sets the minimum height for an element. It prevents the height of the element to be smaller than the specified value. The value of min-height overrides both max-height and height. - */ - minHeight?: any; - - /** - * Sets the minimum width of an element. It limits the width property to be not smaller than the value specified in min-width. - */ - minWidth?: any; - - /** - * The CSS outline property is a shorthand property for setting one or more of the individual outline properties outline-style, outline-width and outline-color in a single rule. In most cases the use of this shortcut is preferable and more convenient. - * Outlines differ from borders in the following ways: • Outlines do not take up space, they are drawn above the content. - * • Outlines may be non-rectangular. They are rectangular in Gecko/Firefox. Internet Explorer attempts to place the smallest contiguous outline around all elements or shapes that are indicated to have an outline. Opera draws a non-rectangular shape around a construct. - */ - outline?: any; - - /** - * The outline-color property sets the color of the outline of an element. An outline is a line that is drawn around elements, outside the border edge, to make the element stand out. - */ - outlineColor?: any; - - /** - * The outline-offset property offsets the outline and draw it beyond the border edge. - */ - outlineOffset?: any; - - /** - * The overflow property controls how extra content exceeding the bounding box of an element is rendered. It can be used in conjunction with an element that has a fixed width and height, to eliminate text-induced page distortion. - */ - overflow?: any; - - /** - * Specifies the preferred scrolling methods for elements that overflow. - */ - overflowStyle?: any; - - /** - * The overflow-x property is a specific case of the generic overflow property. It controls how extra content exceeding the x-axis of the bounding box of an element is rendered. - */ - overflowX?: any; - - /** - * The padding optional CSS property sets the required padding space on one to four sides of an element. The padding area is the space between an element and its border. Negative values are not allowed but decimal values are permitted. The element size is treated as fixed, and the content of the element shifts toward the center as padding is increased. - * The padding property is a shorthand to avoid setting each side separately (padding-top, padding-right, padding-bottom, padding-left). - */ - padding?: any; - - /** - * The padding-bottom CSS property of an element sets the padding space required on the bottom of an element. The padding area is the space between the content of the element and its border. Contrary to margin-bottom values, negative values of padding-bottom are invalid. - */ - paddingBottom?: any; - - /** - * The padding-left CSS property of an element sets the padding space required on the left side of an element. The padding area is the space between the content of the element and its border. Contrary to margin-left values, negative values of padding-left are invalid. - */ - paddingLeft?: any; - - /** - * The padding-right CSS property of an element sets the padding space required on the right side of an element. The padding area is the space between the content of the element and its border. Contrary to margin-right values, negative values of padding-right are invalid. - */ - paddingRight?: any; - - /** - * The padding-top CSS property of an element sets the padding space required on the top of an element. The padding area is the space between the content of the element and its border. Contrary to margin-top values, negative values of padding-top are invalid. - */ - paddingTop?: any; - - /** - * The page-break-after property is supported in all major browsers. With CSS3, page-break-* properties are only aliases of the break-* properties. The CSS3 Fragmentation spec defines breaks for all CSS box fragmentation. - */ - pageBreakAfter?: any; - - /** - * The page-break-before property sets the page-breaking behavior before an element. With CSS3, page-break-* properties are only aliases of the break-* properties. The CSS3 Fragmentation spec defines breaks for all CSS box fragmentation. - */ - pageBreakBefore?: any; - - /** - * Sets the page-breaking behavior inside an element. With CSS3, page-break-* properties are only aliases of the break-* properties. The CSS3 Fragmentation spec defines breaks for all CSS box fragmentation. - */ - pageBreakInside?: any; - - /** - * The pause property determines how long a speech media agent should pause before and after presenting an element. It is a shorthand for the pause-before and pause-after properties. - */ - pause?: any; - - /** - * The pause-after property determines how long a speech media agent should pause after presenting an element. It may be replaced by the shorthand property pause, which sets pause time before and after. - */ - pauseAfter?: any; - - /** - * The pause-before property determines how long a speech media agent should pause before presenting an element. It may be replaced by the shorthand property pause, which sets pause time before and after. - */ - pauseBefore?: any; - - /** - * The perspective property defines how far an element is placed from the view on the z-axis, from the screen to the viewer. - * Perspective defines how an object is viewed. In graphic arts, perspective is the representation on a flat surface of what the viewer's eye would see in a 3D space. (See Wikipedia for more information about graphical perspective and for related illustrations.) - * The illusion of perspective on a flat surface, such as a computer screen, is created by projecting points on the flat surface as they would appear if the flat surface were a window through which the viewer was looking at the object. In discussion of virtual environments, this flat surface is called a projection plane. - */ - perspective?: any; - - /** - * The perspective-origin property establishes the origin for the perspective property. It effectively sets the X and Y position at which the viewer appears to be looking at the children of the element. - * When used with perspective, perspective-origin changes the appearance of an object, as if a viewer were looking at it from a different origin. An object appears differently if a viewer is looking directly at it versus looking at it from below, above, or from the side. Thus, the perspective-origin is like a vanishing point. - * The default value of perspective-origin is 50% 50%. This displays an object as if the viewer's eye were positioned directly at the center of the screen, both top-to-bottom and left-to-right. A value of 0% 0% changes the object as if the viewer was looking toward the top left angle. A value of 100% 100% changes the appearance as if viewed toward the bottom right angle. - */ - perspectiveOrigin?: any; - - /** - * The pointer-events property allows you to control whether an element can be the target for the pointing device (e.g, mouse, pen) events. - */ - pointerEvents?: any; - - /** - * The position property controls the type of positioning used by an element within its parent elements. The effect of the position property depends on a lot of factors, for example the position property of parent elements. - */ - position?: any; - - /** - * Obsolete: unsupported. - * This property determines whether or not a full-width punctuation mark character should be trimmed if it appears at the beginning of a line, so that its "ink" lines up with the first glyph in the line above and below. - */ - punctuationTrim?: any; - - /** - * Sets the type of quotation marks for embedded quotations. - */ - quotes?: any; - - /** - * Controls whether the last region in a chain displays additional 'overset' content according its default overflow property, or if it displays a fragment of content as if it were flowing into a subsequent region. - */ - regionFragment?: any; - - /** - * The rest-after property determines how long a speech media agent should pause after presenting an element's main content, before presenting that element's exit cue sound. It may be replaced by the shorthand property rest, which sets rest time before and after. - */ - restAfter?: any; - - /** - * The rest-before property determines how long a speech media agent should pause after presenting an intro cue sound for an element, before presenting that element's main content. It may be replaced by the shorthand property rest, which sets rest time before and after. - */ - restBefore?: any; - - /** - * Specifies the position an element in relation to the right side of the containing element. - */ - right?: any; - - rubyAlign?: any; - - rubyPosition?: any; - - /** - * Defines the alpha channel threshold used to extract a shape from an image. Can be thought of as a "minimum opacity" threshold; that is, a value of 0.5 means that the shape will enclose all the pixels that are more than 50% opaque. - */ - shapeImageThreshold?: any; - - /** - * A future level of CSS Shapes will define a shape-inside property, which will define a shape to wrap content within the element. See Editor's Draft and CSSWG wiki page on next-level plans - */ - shapeInside?: any; - - /** - * Adds a margin to a shape-outside. In effect, defines a new shape that is the smallest contour around all the points that are the shape-margin distance outward perpendicular to each point on the underlying shape. For points where a perpendicular direction is not defined (e.g., a triangle corner), takes all points on a circle centered at the point and with a radius of the shape-margin distance. This property accepts only non-negative values. - */ - shapeMargin?: any; - - /** - * Declares a shape around which text should be wrapped, with possible modifications from the shape-margin property. The shape defined by shape-outside and shape-margin changes the geometry of a float element's float area. - */ - shapeOutside?: any; - - /** - * The speak property determines whether or not a speech synthesizer will read aloud the contents of an element. - */ - speak?: any; - - /** - * The speak-as property determines how the speech synthesizer interprets the content: words as whole words or as a sequence of letters, numbers as a numerical value or a sequence of digits, punctuation as pauses in speech or named punctuation characters. - */ - speakAs?: any; - - /** - * The tab-size CSS property is used to customise the width of a tab (U+0009) character. - */ - tabSize?: any; - - /** - * The 'table-layout' property controls the algorithm used to lay out the table cells, rows, and columns. - */ - tableLayout?: any; - - /** - * The text-align CSS property describes how inline content like text is aligned in its parent block element. text-align does not control the alignment of block elements itself, only their inline content. - */ - textAlign?: any; - - /** - * The text-align-last CSS property describes how the last line of a block element or a line before line break is aligned in its parent block element. - */ - textAlignLast?: any; - - /** - * The text-decoration CSS property is used to set the text formatting to underline, overline, line-through or blink. - * underline and overline decorations are positioned under the text, line-through over it. - */ - textDecoration?: any; - - /** - * Sets the color of any text decoration, such as underlines, overlines, and strike throughs. - */ - textDecorationColor?: any; - - /** - * Sets what kind of line decorations are added to an element, such as underlines, overlines, etc. - */ - textDecorationLine?: any; - - textDecorationLineThrough?: any; - - textDecorationNone?: any; - - textDecorationOverline?: any; - - /** - * Specifies what parts of an element’s content are skipped over when applying any text decoration. - */ - textDecorationSkip?: any; - - /** - * This property specifies the style of the text decoration line drawn on the specified element. The intended meaning for the values are the same as those of the border-style-properties. - */ - textDecorationStyle?: any; - - textDecorationUnderline?: any; - - /** - * The text-emphasis property will apply special emphasis marks to the elements text. Slightly similar to the text-decoration property only that this property can have affect on the line-height. It also is noted that this is shorthand for text-emphasis-style and for text-emphasis-color. - */ - textEmphasis?: any; - - /** - * The text-emphasis-color property specifies the foreground color of the emphasis marks. - */ - textEmphasisColor?: any; - - /** - * The text-emphasis-style property applies special emphasis marks to an element's text. - */ - textEmphasisStyle?: any; - - /** - * This property helps determine an inline box's block-progression dimension, derived from the text-height and font-size properties for non-replaced elements, the height or the width for replaced elements, and the stacked block-progression dimension for inline-block elements. The block-progression dimension determines the position of the padding, border and margin for the element. - */ - textHeight?: any; - - /** - * Specifies the amount of space horizontally that should be left on the first line of the text of an element. This horizontal spacing is at the beginning of the first line and is in respect to the left edge of the containing block box. - */ - textIndent?: any; - - textJustifyTrim?: any; - - textKashidaSpace?: any; - - /** - * The text-line-through property is a shorthand property for text-line-through-style, text-line-through-color and text-line-through-mode. (Considered obsolete; use text-decoration instead.) - */ - textLineThrough?: any; - - /** - * Specifies the line colors for the line-through text decoration. - * (Considered obsolete; use text-decoration-color instead.) - */ - textLineThroughColor?: any; - - /** - * Sets the mode for the line-through text decoration, determining whether the text decoration affects the space characters or not. - * (Considered obsolete; use text-decoration-skip instead.) - */ - textLineThroughMode?: any; - - /** - * Specifies the line style for line-through text decoration. - * (Considered obsolete; use text-decoration-style instead.) - */ - textLineThroughStyle?: any; - - /** - * Specifies the line width for the line-through text decoration. - */ - textLineThroughWidth?: any; - - /** - * The text-overflow shorthand CSS property determines how overflowed content that is not displayed is signaled to the users. It can be clipped, display an ellipsis ('…', U+2026 HORIZONTAL ELLIPSIS) or a Web author-defined string. It covers the two long-hand properties text-overflow-mode and text-overflow-ellipsis - */ - textOverflow?: any; - - /** - * The text-overline property is the shorthand for the text-overline-style, text-overline-width, text-overline-color, and text-overline-mode properties. - */ - textOverline?: any; - - /** - * Specifies the line color for the overline text decoration. - */ - textOverlineColor?: any; - - /** - * Sets the mode for the overline text decoration, determining whether the text decoration affects the space characters or not. - */ - textOverlineMode?: any; - - /** - * Specifies the line style for overline text decoration. - */ - textOverlineStyle?: any; - - /** - * Specifies the line width for the overline text decoration. - */ - textOverlineWidth?: any; - - /** - * The text-rendering CSS property provides information to the browser about how to optimize when rendering text. Options are: legibility, speed or geometric precision. - */ - textRendering?: any; - - /** - * Obsolete: unsupported. - */ - textScript?: any; - - /** - * The CSS text-shadow property applies one or more drop shadows to the text and of an element. Each shadow is specified as an offset from the text, along with optional color and blur radius values. - */ - textShadow?: any; - - /** - * This property transforms text for styling purposes. (It has no effect on the underlying content.) - */ - textTransform?: any; - - /** - * Unsupported. - * This property will add a underline position value to the element that has an underline defined. - */ - textUnderlinePosition?: any; - - /** - * After review this should be replaced by text-decoration should it not? - * This property will set the underline style for text with a line value for underline, overline, and line-through. - */ - textUnderlineStyle?: any; - - /** - * This property specifies how far an absolutely positioned box's top margin edge is offset below the top edge of the box's containing block. For relatively positioned boxes, the offset is with respect to the top edges of the box itself (i.e., the box is given a position in the normal flow, then offset from that position according to these properties). - */ - top?: any; - - /** - * Determines whether touch input may trigger default behavior supplied by the user agent, such as panning or zooming. - */ - touchAction?: any; - - /** - * CSS transforms allow elements styled with CSS to be transformed in two-dimensional or three-dimensional space. Using this property, elements can be translated, rotated, scaled, and skewed. The value list may consist of 2D and/or 3D transform values. - */ - transform?: any; - - /** - * This property defines the origin of the transformation axes relative to the element to which the transformation is applied. - */ - transformOrigin?: any; - - /** - * This property allows you to define the relative position of the origin of the transformation grid along the z-axis. - */ - transformOriginZ?: any; - - /** - * This property specifies how nested elements are rendered in 3D space relative to their parent. - */ - transformStyle?: any; - - /** - * The transition CSS property is a shorthand property for transition-property, transition-duration, transition-timing-function, and transition-delay. It allows to define the transition between two states of an element. - */ - transition?: any; - - /** - * Defines when the transition will start. A value of ‘0s’ means the transition will execute as soon as the property is changed. Otherwise, the value specifies an offset from the moment the property is changed, and the transition will delay execution by that offset. - */ - transitionDelay?: any; - - /** - * The 'transition-duration' property specifies the length of time a transition animation takes to complete. - */ - transitionDuration?: any; - - /** - * The 'transition-property' property specifies the name of the CSS property to which the transition is applied. - */ - transitionProperty?: any; - - /** - * Sets the pace of action within a transition - */ - transitionTimingFunction?: any; - - /** - * The unicode-bidi CSS property specifies the level of embedding with respect to the bidirectional algorithm. - */ - unicodeBidi?: any; - - /** - * unicode-range allows you to set a specific range of characters to be downloaded from a font (embedded using @font-face) and made available for use on the current page. - */ - unicodeRange?: any; - - /** - * This is for all the high level UX stuff. - */ - userFocus?: any; - - /** - * For inputing user content - */ - userInput?: any; - - /** - * The vertical-align property controls how inline elements or text are vertically aligned compared to the baseline. If this property is used on table-cells it controls the vertical alignment of content of the table cell. - */ - verticalAlign?: any; - - /** - * The visibility property specifies whether the boxes generated by an element are rendered. - */ - visibility?: any; - - /** - * The voice-balance property sets the apparent position (in stereo sound) of the synthesized voice for spoken media. - */ - voiceBalance?: any; - - /** - * The voice-duration property allows the author to explicitly set the amount of time it should take a speech synthesizer to read an element's content, for example to allow the speech to be synchronized with other media. With a value of auto (the default) the length of time it takes to read the content is determined by the content itself and the voice-rate property. - */ - voiceDuration?: any; - - /** - * The voice-family property sets the speaker's voice used by a speech media agent to read an element. The speaker may be specified as a named character (to match a voice option in the speech reading software) or as a generic description of the age and gender of the voice. Similar to the font-family property for visual media, a comma-separated list of fallback options may be given in case the speech reader does not recognize the character name or cannot synthesize the requested combination of generic properties. - */ - voiceFamily?: any; - - /** - * The voice-pitch property sets pitch or tone (high or low) for the synthesized speech when reading an element; the pitch may be specified absolutely or relative to the normal pitch for the voice-family used to read the text. - */ - voicePitch?: any; - - /** - * The voice-range property determines how much variation in pitch or tone will be created by the speech synthesize when reading an element. Emphasized text, grammatical structures and punctuation may all be rendered as changes in pitch, this property determines how strong or obvious those changes are; large ranges are associated with enthusiastic or emotional speech, while small ranges are associated with flat or mechanical speech. - */ - voiceRange?: any; - - /** - * The voice-rate property sets the speed at which the voice synthesized by a speech media agent will read content. - */ - voiceRate?: any; - - /** - * The voice-stress property sets the level of vocal emphasis to be used for synthesized speech reading the element. - */ - voiceStress?: any; - - /** - * The voice-volume property sets the volume for spoken content in speech media. It replaces the deprecated volume property. - */ - voiceVolume?: any; - - /** - * The white-space property controls whether and how white space inside the element is collapsed, and whether lines may wrap at unforced "soft wrap" opportunities. - */ - whiteSpace?: any; - - /** - * Obsolete: unsupported. - */ - whiteSpaceTreatment?: any; - - /** - * Specifies the width of the content area of an element. The content area of the element width does not include the padding, border, and margin of the element. - */ - width?: any; - - /** - * The word-break property is often used when there is long generated content that is strung together without and spaces or hyphens to beak apart. A common case of this is when there is a long URL that does not have any hyphens. This case could potentially cause the breaking of the layout as it could extend past the parent element. - */ - wordBreak?: any; - - /** - * The word-spacing CSS property specifies the spacing behavior between "words". - */ - wordSpacing?: any; - - /** - * An alias of css/properties/overflow-wrap, word-wrap defines whether to break words when the content exceeds the boundaries of its container. - */ - wordWrap?: any; - - /** - * Specifies how exclusions affect inline content within block-level elements. Elements lay out their inline content in their content area but wrap around exclusion areas. - */ - wrapFlow?: any; - - /** - * Set the value that is used to offset the inner wrap shape from other shapes. Inline content that intersects a shape with this property will be pushed by this shape's margin. - */ - wrapMargin?: any; - - /** - * Obsolete and unsupported. Do not use. - * This CSS property controls the text when it reaches the end of the block in which it is enclosed. - */ - wrapOption?: any; - - /** - * writing-mode specifies if lines of text are laid out horizontally or vertically, and the direction which lines of text and blocks progress. - */ - writingMode?: any; - - - [propertyName: string]: any; - } - - interface HTMLAttributes extends DOMAttributes { - // React-specific Attributes - defaultChecked?: boolean; - defaultValue?: string | string[]; - - // Standard HTML Attributes - accept?: string; - acceptCharset?: string; - accessKey?: string; - action?: string; - allowFullScreen?: boolean; - allowTransparency?: boolean; - alt?: string; - async?: boolean; - autoComplete?: string; - autoFocus?: boolean; - autoPlay?: boolean; - capture?: boolean; - cellPadding?: number | string; - cellSpacing?: number | string; - charSet?: string; - challenge?: string; - checked?: boolean; - classID?: string; - className?: string; - cols?: number; - colSpan?: number; - content?: string; - contentEditable?: boolean; - contextMenu?: string; - controls?: boolean; - coords?: string; - crossOrigin?: string; - data?: string; - dateTime?: string; - default?: boolean; - defer?: boolean; - dir?: string; - disabled?: boolean; - download?: any; - draggable?: boolean; - encType?: string; - form?: string; - formAction?: string; - formEncType?: string; - formMethod?: string; - formNoValidate?: boolean; - formTarget?: string; - frameBorder?: number | string; - headers?: string; - height?: number | string; - hidden?: boolean; - high?: number; - href?: string; - hrefLang?: string; - htmlFor?: string; - httpEquiv?: string; - icon?: string; - id?: string; - inputMode?: string; - integrity?: string; - is?: string; - keyParams?: string; - keyType?: string; - kind?: string; - label?: string; - lang?: string; - list?: string; - loop?: boolean; - low?: number; - manifest?: string; - marginHeight?: number; - marginWidth?: number; - max?: number | string; - maxLength?: number; - media?: string; - mediaGroup?: string; - method?: string; - min?: number | string; - minLength?: number; - multiple?: boolean; - muted?: boolean; - name?: string; - noValidate?: boolean; - open?: boolean; - optimum?: number; - pattern?: string; - placeholder?: string; - poster?: string; - preload?: string; - radioGroup?: string; - readOnly?: boolean; - rel?: string; - required?: boolean; - role?: string; - rows?: number; - rowSpan?: number; - sandbox?: string; - scope?: string; - scoped?: boolean; - scrolling?: string; - seamless?: boolean; - selected?: boolean; - shape?: string; - size?: number; - sizes?: string; - span?: number; - spellCheck?: boolean; - src?: string; - srcDoc?: string; - srcLang?: string; - srcSet?: string; - start?: number; - step?: number | string; - style?: CSSProperties; - summary?: string; - tabIndex?: number; - target?: string; - title?: string; - type?: string; - useMap?: string; - value?: string | string[]; - width?: number | string; - wmode?: string; - wrap?: string; - - // RDFa Attributes - about?: string; - datatype?: string; - inlist?: any; - prefix?: string; - property?: string; - resource?: string; - typeof?: string; - vocab?: string; - - // Non-standard Attributes - autoCapitalize?: string; - autoCorrect?: string; - autoSave?: string; - color?: string; - itemProp?: string; - itemScope?: boolean; - itemType?: string; - itemID?: string; - itemRef?: string; - results?: number; - security?: string; - unselectable?: boolean; - } - - interface SVGAttributes extends HTMLAttributes { - clipPath?: string; - cx?: number | string; - cy?: number | string; - d?: string; - dx?: number | string; - dy?: number | string; - fill?: string; - fillOpacity?: number | string; - fontFamily?: string; - fontSize?: number | string; - fx?: number | string; - fy?: number | string; - gradientTransform?: string; - gradientUnits?: string; - markerEnd?: string; - markerMid?: string; - markerStart?: string; - offset?: number | string; - opacity?: number | string; - patternContentUnits?: string; - patternUnits?: string; - points?: string; - preserveAspectRatio?: string; - r?: number | string; - rx?: number | string; - ry?: number | string; - spreadMethod?: string; - stopColor?: string; - stopOpacity?: number | string; - stroke?: string; - strokeDasharray?: string; - strokeLinecap?: string; - strokeMiterlimit?: string; - strokeOpacity?: number | string; - strokeWidth?: number | string; - textAnchor?: string; - transform?: string; - version?: string; - viewBox?: string; - x1?: number | string; - x2?: number | string; - x?: number | string; - xlinkActuate?: string; - xlinkArcrole?: string; - xlinkHref?: string; - xlinkRole?: string; - xlinkShow?: string; - xlinkTitle?: string; - xlinkType?: string; - xmlBase?: string; - xmlLang?: string; - xmlSpace?: string; - y1?: number | string; - y2?: number | string; - y?: number | string; - } - - // - // React.DOM - // ---------------------------------------------------------------------- - - interface ReactDOM { - // HTML - a: HTMLFactory; - abbr: HTMLFactory; - address: HTMLFactory; - area: HTMLFactory; - article: HTMLFactory; - aside: HTMLFactory; - audio: HTMLFactory; - b: HTMLFactory; - base: HTMLFactory; - bdi: HTMLFactory; - bdo: HTMLFactory; - big: HTMLFactory; - blockquote: HTMLFactory; - body: HTMLFactory; - br: HTMLFactory; - button: HTMLFactory; - canvas: HTMLFactory; - caption: HTMLFactory; - cite: HTMLFactory; - code: HTMLFactory; - col: HTMLFactory; - colgroup: HTMLFactory; - data: HTMLFactory; - datalist: HTMLFactory; - dd: HTMLFactory; - del: HTMLFactory; - details: HTMLFactory; - dfn: HTMLFactory; - dialog: HTMLFactory; - div: HTMLFactory; - dl: HTMLFactory; - dt: HTMLFactory; - em: HTMLFactory; - embed: HTMLFactory; - fieldset: HTMLFactory; - figcaption: HTMLFactory; - figure: HTMLFactory; - footer: HTMLFactory; - form: HTMLFactory; - h1: HTMLFactory; - h2: HTMLFactory; - h3: HTMLFactory; - h4: HTMLFactory; - h5: HTMLFactory; - h6: HTMLFactory; - head: HTMLFactory; - header: HTMLFactory; - hgroup: HTMLFactory; - hr: HTMLFactory; - html: HTMLFactory; - i: HTMLFactory; - iframe: HTMLFactory; - img: HTMLFactory; - input: HTMLFactory; - ins: HTMLFactory; - kbd: HTMLFactory; - keygen: HTMLFactory; - label: HTMLFactory; - legend: HTMLFactory; - li: HTMLFactory; - link: HTMLFactory; - main: HTMLFactory; - map: HTMLFactory; - mark: HTMLFactory; - menu: HTMLFactory; - menuitem: HTMLFactory; - meta: HTMLFactory; - meter: HTMLFactory; - nav: HTMLFactory; - noscript: HTMLFactory; - object: HTMLFactory; - ol: HTMLFactory; - optgroup: HTMLFactory; - option: HTMLFactory; - output: HTMLFactory; - p: HTMLFactory; - param: HTMLFactory; - picture: HTMLFactory; - pre: HTMLFactory; - progress: HTMLFactory; - q: HTMLFactory; - rp: HTMLFactory; - rt: HTMLFactory; - ruby: HTMLFactory; - s: HTMLFactory; - samp: HTMLFactory; - script: HTMLFactory; - section: HTMLFactory; - select: HTMLFactory; - small: HTMLFactory; - source: HTMLFactory; - span: HTMLFactory; - strong: HTMLFactory; - style: HTMLFactory; - sub: HTMLFactory; - summary: HTMLFactory; - sup: HTMLFactory; - table: HTMLFactory; - tbody: HTMLFactory; - td: HTMLFactory; - textarea: HTMLFactory; - tfoot: HTMLFactory; - th: HTMLFactory; - thead: HTMLFactory; - time: HTMLFactory; - title: HTMLFactory; - tr: HTMLFactory; - track: HTMLFactory; - u: HTMLFactory; - ul: HTMLFactory; - "var": HTMLFactory; - video: HTMLFactory; - wbr: HTMLFactory; - - // SVG - svg: SVGFactory; - circle: SVGFactory; - defs: SVGFactory; - ellipse: SVGFactory; - g: SVGFactory; - image: SVGFactory; - line: SVGFactory; - linearGradient: SVGFactory; - mask: SVGFactory; - path: SVGFactory; - pattern: SVGFactory; - polygon: SVGFactory; - polyline: SVGFactory; - radialGradient: SVGFactory; - rect: SVGFactory; - stop: SVGFactory; - text: SVGFactory; - tspan: SVGFactory; - } - - // - // React.PropTypes - // ---------------------------------------------------------------------- - - interface Validator { - (object: T, key: string, componentName: string): Error; - } - - interface Requireable extends Validator { - isRequired: Validator; - } - - interface ValidationMap { - [key: string]: Validator; - } - - interface ReactPropTypes { - any: Requireable; - array: Requireable; - bool: Requireable; - func: Requireable; - number: Requireable; - object: Requireable; - string: Requireable; - node: Requireable; - element: Requireable; - instanceOf(expectedClass: {}): Requireable; - oneOf(types: any[]): Requireable; - oneOfType(types: Validator[]): Requireable; - arrayOf(type: Validator): Requireable; - objectOf(type: Validator): Requireable; - shape(type: ValidationMap): Requireable; - } - - // - // React.Children - // ---------------------------------------------------------------------- - - interface ReactChildren { - map(children: ReactNode, fn: (child: ReactChild, index: number) => T): T[]; - forEach(children: ReactNode, fn: (child: ReactChild, index: number) => any): void; - count(children: ReactNode): number; - only(children: ReactNode): ReactElement; - toArray(children: ReactNode): ReactChild[]; - } - - // - // Browser Interfaces - // https://github.com/nikeee/2048-typescript/blob/master/2048/js/touch.d.ts - // ---------------------------------------------------------------------- - - interface AbstractView { - styleMedia: StyleMedia; - document: Document; - } - - interface Touch { - identifier: number; - target: EventTarget; - screenX: number; - screenY: number; - clientX: number; - clientY: number; - pageX: number; - pageY: number; - } - - interface TouchList { - [index: number]: Touch; - length: number; - item(index: number): Touch; - identifiedTouch(identifier: number): Touch; - } -} - -declare module "react" { - export = __React; -} - -declare namespace JSX { - import React = __React; - - interface Element extends React.ReactElement { } - interface ElementClass extends React.Component { - render(): JSX.Element; - } - interface ElementAttributesProperty { props: {}; } - - interface IntrinsicAttributes { - key?: string | number; - } - - interface IntrinsicClassAttributes { - ref?: string | ((classInstance: T) => void); - } - - interface IntrinsicElements { - // HTML - a: React.HTMLProps; - abbr: React.HTMLProps; - address: React.HTMLProps; - area: React.HTMLProps; - article: React.HTMLProps; - aside: React.HTMLProps; - audio: React.HTMLProps; - b: React.HTMLProps; - base: React.HTMLProps; - bdi: React.HTMLProps; - bdo: React.HTMLProps; - big: React.HTMLProps; - blockquote: React.HTMLProps; - body: React.HTMLProps; - br: React.HTMLProps; - button: React.HTMLProps; - canvas: React.HTMLProps; - caption: React.HTMLProps; - cite: React.HTMLProps; - code: React.HTMLProps; - col: React.HTMLProps; - colgroup: React.HTMLProps; - data: React.HTMLProps; - datalist: React.HTMLProps; - dd: React.HTMLProps; - del: React.HTMLProps; - details: React.HTMLProps; - dfn: React.HTMLProps; - dialog: React.HTMLProps; - div: React.HTMLProps; - dl: React.HTMLProps; - dt: React.HTMLProps; - em: React.HTMLProps; - embed: React.HTMLProps; - fieldset: React.HTMLProps; - figcaption: React.HTMLProps; - figure: React.HTMLProps; - footer: React.HTMLProps; - form: React.HTMLProps; - h1: React.HTMLProps; - h2: React.HTMLProps; - h3: React.HTMLProps; - h4: React.HTMLProps; - h5: React.HTMLProps; - h6: React.HTMLProps; - head: React.HTMLProps; - header: React.HTMLProps; - hgroup: React.HTMLProps; - hr: React.HTMLProps; - html: React.HTMLProps; - i: React.HTMLProps; - iframe: React.HTMLProps; - img: React.HTMLProps; - input: React.HTMLProps; - ins: React.HTMLProps; - kbd: React.HTMLProps; - keygen: React.HTMLProps; - label: React.HTMLProps; - legend: React.HTMLProps; - li: React.HTMLProps; - link: React.HTMLProps; - main: React.HTMLProps; - map: React.HTMLProps; - mark: React.HTMLProps; - menu: React.HTMLProps; - menuitem: React.HTMLProps; - meta: React.HTMLProps; - meter: React.HTMLProps; - nav: React.HTMLProps; - noscript: React.HTMLProps; - object: React.HTMLProps; - ol: React.HTMLProps; - optgroup: React.HTMLProps; - option: React.HTMLProps; - output: React.HTMLProps; - p: React.HTMLProps; - param: React.HTMLProps; - picture: React.HTMLProps; - pre: React.HTMLProps; - progress: React.HTMLProps; - q: React.HTMLProps; - rp: React.HTMLProps; - rt: React.HTMLProps; - ruby: React.HTMLProps; - s: React.HTMLProps; - samp: React.HTMLProps; - script: React.HTMLProps; - section: React.HTMLProps; - select: React.HTMLProps; - small: React.HTMLProps; - source: React.HTMLProps; - span: React.HTMLProps; - strong: React.HTMLProps; - style: React.HTMLProps; - sub: React.HTMLProps; - summary: React.HTMLProps; - sup: React.HTMLProps; - table: React.HTMLProps; - tbody: React.HTMLProps; - td: React.HTMLProps; - textarea: React.HTMLProps; - tfoot: React.HTMLProps; - th: React.HTMLProps; - thead: React.HTMLProps; - time: React.HTMLProps; - title: React.HTMLProps; - tr: React.HTMLProps; - track: React.HTMLProps; - u: React.HTMLProps; - ul: React.HTMLProps; - "var": React.HTMLProps; - video: React.HTMLProps; - wbr: React.HTMLProps; - - // SVG - svg: React.SVGProps; - - circle: React.SVGProps; - clipPath: React.SVGProps; - defs: React.SVGProps; - ellipse: React.SVGProps; - g: React.SVGProps; - image: React.SVGProps; - line: React.SVGProps; - linearGradient: React.SVGProps; - mask: React.SVGProps; - path: React.SVGProps; - pattern: React.SVGProps; - polygon: React.SVGProps; - polyline: React.SVGProps; - radialGradient: React.SVGProps; - rect: React.SVGProps; - stop: React.SVGProps; - text: React.SVGProps; - tspan: React.SVGProps; - } -} diff --git a/templates/ReactSpa/typings/tsd.d.ts b/templates/ReactSpa/typings/tsd.d.ts deleted file mode 100644 index 6491ac94..00000000 --- a/templates/ReactSpa/typings/tsd.d.ts +++ /dev/null @@ -1,6 +0,0 @@ - -/// -/// -/// -/// -/// diff --git a/templates/WebApplicationBasic/package.json b/templates/WebApplicationBasic/package.json index ff1e7343..8cc94585 100644 --- a/templates/WebApplicationBasic/package.json +++ b/templates/WebApplicationBasic/package.json @@ -2,7 +2,7 @@ "name": "WebApplicationBasic", "version": "0.0.0", "devDependencies": { - "bootstrap": "^3.3.6", + "bootstrap": "^3.3.7", "css-loader": "^0.23.1", "event-source-polyfill": "^0.0.7", "extendify": "^1.0.0", @@ -11,8 +11,8 @@ "jquery": "^2.2.1", "style-loader": "^0.13.0", "ts-loader": "^0.8.1", - "typescript": "^1.8.2", + "typescript": "^2.0.3", "url-loader": "^0.5.7", - "webpack": "^1.12.14" + "webpack": "^1.13.2" } } diff --git a/templates/WebApplicationBasic/tsconfig.json b/templates/WebApplicationBasic/tsconfig.json index 1404455b..046eabe4 100644 --- a/templates/WebApplicationBasic/tsconfig.json +++ b/templates/WebApplicationBasic/tsconfig.json @@ -3,6 +3,7 @@ "moduleResolution": "node", "target": "es5", "sourceMap": true, + "lib": ["es6", "dom"], "skipDefaultLibCheck": true }, "exclude": [