From be2ba2bd6c2fbcdf10954956977fa6f1e499d3a2 Mon Sep 17 00:00:00 2001 From: Mark Pieszak Date: Wed, 3 Aug 2016 13:02:08 -0400 Subject: [PATCH 1/8] chore(github): Add Github templates --- .github/ISSUE_TEMPLATE.md | 46 ++++++++++++++++++++++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 32 ++++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..f27ce268 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,46 @@ +**Note: for support questions, please use one of these channels:** https://github.com/aspnet/Home/blob/dev/CONTRIBUTING.md#filing-issues. This repository's issues are reserved for feature requests and bug reports. + +* **I'm submitting a ...** +- [ ] bug report +- [ ] feature request +- [ ] support request => Please do not submit support request here, see note at the top of this template. + +* **What Modules or Template are related to this Issue?** +- [ ] AngularServices +- [ ] NodeServices +- [ ] ReactServices +- [ ] SpaServices +- [ ] Angular2 Spa +- [ ] Knockout Spa +- [ ] ReactRedux Spa +- [ ] React Spa + + +* **Do you want to request a *feature* or report a *bug*?** + + + +* **What is the current behavior?** + + + +* **If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem** by creating a github repo. + + + +* **What is the expected behavior?** + + + +* **What is the motivation / use case for changing the behavior?** + + + +* **Please tell us about your environment:** + +- Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX ] +- OS: [all | Mac OS X | Windows | Linux ] +- Platform: [all | NodeJs | Java | PHP | .Net | Ruby] + + +* **Other information** (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..733500d4 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,32 @@ +* **Please check if the PR fulfills these requirements** +- [ ] The commit message follows our guidelines: https://github.com/aspnet/Home/blob/dev/CONTRIBUTING.md#contributing-code-and-content +- [ ] Tests for the changes have been added (for bug fixes / features) +- [ ] Docs have been added / updated (for bug fixes / features) + +* **What Modules or Template are related to this pull-request?** +- [ ] AngularServices +- [ ] NodeServices +- [ ] ReactServices +- [ ] SpaServices +- [ ] Angular2 Spa +- [ ] Knockout Spa +- [ ] ReactRedux Spa +- [ ] React Spa + +* **What kind of change does this PR introduce?** (Bug fix, feature, docs update, ...) +remove unused proxy imports from some test files + + +* **What is the current behavior?** (You can also link to an open issue here) + + + +* **What is the new behavior (if this is a feature change)?** + + + +* **Does this PR introduce a breaking change?** (What changes might users need to make in their application due to this PR?) +No + + +* **Other information**: From 1e04b222b9bd9ca626923fff92209d8981b038e9 Mon Sep 17 00:00:00 2001 From: Mark Pieszak Date: Fri, 12 Aug 2016 16:28:35 -0400 Subject: [PATCH 2/8] chore(typescript) Upgrade to 2.0 & Types --- templates/Angular2Spa/package.json | 8 +- templates/Angular2Spa/tsd.json | 15 - .../typings/es6-shim/es6-shim.d.ts | 668 ----- .../typings/requirejs/require.d.ts | 397 --- templates/Angular2Spa/typings/tsd.d.ts | 3 - .../Angular2Spa/typings/url-workaround.d.ts | 7 - templates/KnockoutSpa/package.json | 14 +- templates/KnockoutSpa/tsd.json | 33 - .../typings/crossroads/crossroads.d.ts | 159 -- .../typings/es6-promise/es6-promise.d.ts | 75 - .../KnockoutSpa/typings/history/history.d.ts | 61 - .../typings/js-signals/js-signals.d.ts | 110 - .../typings/knockout/knockout.d.ts | 631 ----- .../typings/react-router/history.d.ts | 233 -- .../typings/requirejs/require.d.ts | 397 --- templates/KnockoutSpa/typings/tsd.d.ts | 8 - .../typings/whatwg-fetch/whatwg-fetch.d.ts | 85 - templates/ReactReduxSpa/package.json | 17 +- templates/ReactReduxSpa/tsd.json | 45 - .../typings/react-redux/react-redux.d.ts | 68 - .../react-router-redux.d.ts | 62 - .../typings/react-router/history.d.ts | 233 -- .../typings/react-router/react-router.d.ts | 480 ---- .../typings/react/react-dom.d.ts | 66 - .../ReactReduxSpa/typings/react/react.d.ts | 2405 ----------------- .../typings/redux-thunk/redux-thunk.d.ts | 18 - .../ReactReduxSpa/typings/redux/redux.d.ts | 52 - .../typings/source-map/source-map.d.ts | 90 - templates/ReactReduxSpa/typings/tsd.d.ts | 13 - .../typings/uglify-js/uglify-js.d.ts | 430 --- .../typings/webpack/webpack-env.d.ts | 232 -- .../typings/whatwg-fetch/whatwg-fetch.d.ts | 85 - templates/ReactSpa/package.json | 10 +- templates/ReactSpa/tsd.json | 24 - .../typings/react-router/history.d.ts | 192 -- .../typings/react-router/react-router.d.ts | 474 ---- .../ReactSpa/typings/react/react-dom.d.ts | 66 - templates/ReactSpa/typings/react/react.d.ts | 2281 ---------------- templates/ReactSpa/typings/tsd.d.ts | 6 - .../typings/whatwg-fetch/whatwg-fetch.d.ts | 85 - templates/WebApplicationBasic/package.json | 4 +- 41 files changed, 39 insertions(+), 10303 deletions(-) delete mode 100644 templates/Angular2Spa/tsd.json delete mode 100644 templates/Angular2Spa/typings/es6-shim/es6-shim.d.ts delete mode 100644 templates/Angular2Spa/typings/requirejs/require.d.ts delete mode 100644 templates/Angular2Spa/typings/tsd.d.ts delete mode 100644 templates/Angular2Spa/typings/url-workaround.d.ts delete mode 100644 templates/KnockoutSpa/tsd.json delete mode 100644 templates/KnockoutSpa/typings/crossroads/crossroads.d.ts delete mode 100644 templates/KnockoutSpa/typings/es6-promise/es6-promise.d.ts delete mode 100644 templates/KnockoutSpa/typings/history/history.d.ts delete mode 100644 templates/KnockoutSpa/typings/js-signals/js-signals.d.ts delete mode 100644 templates/KnockoutSpa/typings/knockout/knockout.d.ts delete mode 100644 templates/KnockoutSpa/typings/react-router/history.d.ts delete mode 100644 templates/KnockoutSpa/typings/requirejs/require.d.ts delete mode 100644 templates/KnockoutSpa/typings/tsd.d.ts delete mode 100644 templates/KnockoutSpa/typings/whatwg-fetch/whatwg-fetch.d.ts delete mode 100644 templates/ReactReduxSpa/tsd.json delete mode 100644 templates/ReactReduxSpa/typings/react-redux/react-redux.d.ts delete mode 100644 templates/ReactReduxSpa/typings/react-router-redux/react-router-redux.d.ts delete mode 100644 templates/ReactReduxSpa/typings/react-router/history.d.ts delete mode 100644 templates/ReactReduxSpa/typings/react-router/react-router.d.ts delete mode 100644 templates/ReactReduxSpa/typings/react/react-dom.d.ts delete mode 100644 templates/ReactReduxSpa/typings/react/react.d.ts delete mode 100644 templates/ReactReduxSpa/typings/redux-thunk/redux-thunk.d.ts delete mode 100644 templates/ReactReduxSpa/typings/redux/redux.d.ts delete mode 100644 templates/ReactReduxSpa/typings/source-map/source-map.d.ts delete mode 100644 templates/ReactReduxSpa/typings/tsd.d.ts delete mode 100644 templates/ReactReduxSpa/typings/uglify-js/uglify-js.d.ts delete mode 100644 templates/ReactReduxSpa/typings/webpack/webpack-env.d.ts delete mode 100644 templates/ReactReduxSpa/typings/whatwg-fetch/whatwg-fetch.d.ts delete mode 100644 templates/ReactSpa/tsd.json delete mode 100644 templates/ReactSpa/typings/react-router/history.d.ts delete mode 100644 templates/ReactSpa/typings/react-router/react-router.d.ts delete mode 100644 templates/ReactSpa/typings/react/react-dom.d.ts delete mode 100644 templates/ReactSpa/typings/react/react.d.ts delete mode 100644 templates/ReactSpa/typings/tsd.d.ts delete mode 100644 templates/ReactSpa/typings/whatwg-fetch/whatwg-fetch.d.ts diff --git a/templates/Angular2Spa/package.json b/templates/Angular2Spa/package.json index 37970041..a8ecb82e 100644 --- a/templates/Angular2Spa/package.json +++ b/templates/Angular2Spa/package.json @@ -1,7 +1,9 @@ { - "name": "WebApplicationBasic", + "name": "angular2-spa", "version": "0.0.0", "devDependencies": { + "@types/core-js": "^0.9.30", + "@types/requirejs": "^2.1.26", "aspnet-webpack": "^1.0.6", "bootstrap": "^3.3.6", "css-loader": "^0.23.1", @@ -12,8 +14,8 @@ "jquery": "^2.2.1", "raw-loader": "^0.5.1", "style-loader": "^0.13.0", - "ts-loader": "^0.8.1", - "typescript": "^1.8.2", + "ts-loader": "^0.8.2", + "typescript": "^2.0.0", "url-loader": "^0.5.7", "webpack": "^1.12.14", "webpack-hot-middleware": "^2.10.0" diff --git a/templates/Angular2Spa/tsd.json b/templates/Angular2Spa/tsd.json deleted file mode 100644 index b39437eb..00000000 --- a/templates/Angular2Spa/tsd.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "version": "v4", - "repo": "borisyankov/DefinitelyTyped", - "ref": "master", - "path": "typings", - "bundle": "typings/tsd.d.ts", - "installed": { - "requirejs/require.d.ts": { - "commit": "dade4414712ce84e3c63393f1aae407e9e7e6af7" - }, - "es6-shim/es6-shim.d.ts": { - "commit": "c0d876601e0f8236fd6b57626eb62c4e485f1563" - } - } -} diff --git a/templates/Angular2Spa/typings/es6-shim/es6-shim.d.ts b/templates/Angular2Spa/typings/es6-shim/es6-shim.d.ts deleted file mode 100644 index 41f22997..00000000 --- a/templates/Angular2Spa/typings/es6-shim/es6-shim.d.ts +++ /dev/null @@ -1,668 +0,0 @@ -// Type definitions for es6-shim v0.31.2 -// Project: https://github.com/paulmillr/es6-shim -// Definitions by: Ron Buckton -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -declare type PropertyKey = string | number | symbol; - -interface IteratorResult { - done: boolean; - value?: T; -} - -interface IterableShim { - /** - * Shim for an ES6 iterable. Not intended for direct use by user code. - */ - "_es6-shim iterator_"(): Iterator; -} - -interface Iterator { - next(value?: any): IteratorResult; - return?(value?: any): IteratorResult; - throw?(e?: any): IteratorResult; -} - -interface IterableIteratorShim extends IterableShim, Iterator { - /** - * Shim for an ES6 iterable iterator. Not intended for direct use by user code. - */ - "_es6-shim iterator_"(): IterableIteratorShim; -} - -interface StringConstructor { - /** - * Return the String value whose elements are, in order, the elements in the List elements. - * If length is 0, the empty string is returned. - */ - fromCodePoint(...codePoints: number[]): string; - - /** - * String.raw is intended for use as a tag function of a Tagged Template String. When called - * as such the first argument will be a well formed template call site object and the rest - * parameter will contain the substitution values. - * @param template A well-formed template string call site representation. - * @param substitutions A set of substitution values. - */ - raw(template: TemplateStringsArray, ...substitutions: any[]): string; -} - -interface String { - /** - * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point - * value of the UTF-16 encoded code point starting at the string element at position pos in - * the String resulting from converting this object to a String. - * If there is no element at that position, the result is undefined. - * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos. - */ - codePointAt(pos: number): number; - - /** - * Returns true if searchString appears as a substring of the result of converting this - * object to a String, at one or more positions that are - * greater than or equal to position; otherwise, returns false. - * @param searchString search string - * @param position If position is undefined, 0 is assumed, so as to search all of the String. - */ - includes(searchString: string, position?: number): boolean; - - /** - * Returns true if the sequence of elements of searchString converted to a String is the - * same as the corresponding elements of this object (converted to a String) starting at - * endPosition – length(this). Otherwise returns false. - */ - endsWith(searchString: string, endPosition?: number): boolean; - - /** - * Returns a String value that is made from count copies appended together. If count is 0, - * T is the empty String is returned. - * @param count number of copies to append - */ - repeat(count: number): string; - - /** - * Returns true if the sequence of elements of searchString converted to a String is the - * same as the corresponding elements of this object (converted to a String) starting at - * position. Otherwise returns false. - */ - startsWith(searchString: string, position?: number): boolean; - - /** - * Returns an HTML anchor element and sets the name attribute to the text value - * @param name - */ - anchor(name: string): string; - - /** Returns a HTML element */ - big(): string; - - /** Returns a HTML element */ - blink(): string; - - /** Returns a HTML element */ - bold(): string; - - /** Returns a HTML element */ - fixed(): string - - /** Returns a HTML element and sets the color attribute value */ - fontcolor(color: string): string - - /** Returns a HTML element and sets the size attribute value */ - fontsize(size: number): string; - - /** Returns a HTML element and sets the size attribute value */ - fontsize(size: string): string; - - /** Returns an HTML element */ - italics(): string; - - /** Returns an HTML element and sets the href attribute value */ - link(url: string): string; - - /** Returns a HTML element */ - small(): string; - - /** Returns a HTML element */ - strike(): string; - - /** Returns a HTML element */ - sub(): string; - - /** Returns a HTML element */ - sup(): string; - - /** - * Shim for an ES6 iterable. Not intended for direct use by user code. - */ - "_es6-shim iterator_"(): IterableIteratorShim; -} - -interface ArrayConstructor { - /** - * Creates an array from an array-like object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): Array; - - /** - * Creates an array from an iterable object. - * @param iterable An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(iterable: IterableShim, mapfn: (v: T, k: number) => U, thisArg?: any): Array; - - /** - * Creates an array from an array-like object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Array; - - /** - * Creates an array from an iterable object. - * @param iterable An iterable object to convert to an array. - */ - from(iterable: IterableShim): Array; - - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: T[]): Array; -} - -interface Array { - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: T, index: number, obj: Array) => boolean, thisArg?: any): T; - - /** - * Returns the index of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: T) => boolean, thisArg?: any): number; - - /** - * Returns the this object after filling the section identified by start and end with value - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: T, start?: number, end?: number): T[]; - - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): T[]; - - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): IterableIteratorShim<[number, T]>; - - /** - * Returns an list of keys in the array - */ - keys(): IterableIteratorShim; - - /** - * Returns an list of values in the array - */ - values(): IterableIteratorShim; - - /** - * Shim for an ES6 iterable. Not intended for direct use by user code. - */ - "_es6-shim iterator_"(): IterableIteratorShim; -} - -interface NumberConstructor { - /** - * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1 - * that is representable as a Number value, which is approximately: - * 2.2204460492503130808472633361816 x 10‍−‍16. - */ - EPSILON: number; - - /** - * Returns true if passed value is finite. - * Unlike the global isFininte, Number.isFinite doesn't forcibly convert the parameter to a - * number. Only finite values of the type number, result in true. - * @param number A numeric value. - */ - isFinite(number: number): boolean; - - /** - * Returns true if the value passed is an integer, false otherwise. - * @param number A numeric value. - */ - isInteger(number: number): boolean; - - /** - * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a - * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter - * to a number. Only values of the type number, that are also NaN, result in true. - * @param number A numeric value. - */ - isNaN(number: number): boolean; - - /** - * Returns true if the value passed is a safe integer. - * @param number A numeric value. - */ - isSafeInteger(number: number): boolean; - - /** - * The value of the largest integer n such that n and n + 1 are both exactly representable as - * a Number value. - * The value of Number.MIN_SAFE_INTEGER is 9007199254740991 2^53 − 1. - */ - MAX_SAFE_INTEGER: number; - - /** - * The value of the smallest integer n such that n and n − 1 are both exactly representable as - * a Number value. - * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)). - */ - MIN_SAFE_INTEGER: number; - - /** - * Converts a string to a floating-point number. - * @param string A string that contains a floating-point number. - */ - parseFloat(string: string): number; - - /** - * Converts A string to an integer. - * @param s A string to convert into a number. - * @param radix A value between 2 and 36 that specifies the base of the number in numString. - * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. - * All other strings are considered decimal. - */ - parseInt(string: string, radix?: number): number; -} - -interface ObjectConstructor { - /** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * @param target The target object to copy to. - * @param sources One or more source objects to copy properties from. - */ - assign(target: any, ...sources: any[]): any; - - /** - * Returns true if the values are the same value, false otherwise. - * @param value1 The first value. - * @param value2 The second value. - */ - is(value1: any, value2: any): boolean; - - /** - * Sets the prototype of a specified object o to object proto or null. Returns the object o. - * @param o The object to change its prototype. - * @param proto The value of the new prototype or null. - * @remarks Requires `__proto__` support. - */ - setPrototypeOf(o: any, proto: any): any; -} - -interface RegExp { - /** - * Returns a string indicating the flags of the regular expression in question. This field is read-only. - * The characters in this string are sequenced and concatenated in the following order: - * - * - "g" for global - * - "i" for ignoreCase - * - "m" for multiline - * - "u" for unicode - * - "y" for sticky - * - * If no flags are set, the value is the empty string. - */ - flags: string; -} - -interface Math { - /** - * Returns the number of leading zero bits in the 32-bit binary representation of a number. - * @param x A numeric expression. - */ - clz32(x: number): number; - - /** - * Returns the result of 32-bit multiplication of two numbers. - * @param x First number - * @param y Second number - */ - imul(x: number, y: number): number; - - /** - * Returns the sign of the x, indicating whether x is positive, negative or zero. - * @param x The numeric expression to test - */ - sign(x: number): number; - - /** - * Returns the base 10 logarithm of a number. - * @param x A numeric expression. - */ - log10(x: number): number; - - /** - * Returns the base 2 logarithm of a number. - * @param x A numeric expression. - */ - log2(x: number): number; - - /** - * Returns the natural logarithm of 1 + x. - * @param x A numeric expression. - */ - log1p(x: number): number; - - /** - * Returns the result of (e^x - 1) of x (e raised to the power of x, where e is the base of - * the natural logarithms). - * @param x A numeric expression. - */ - expm1(x: number): number; - - /** - * Returns the hyperbolic cosine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - cosh(x: number): number; - - /** - * Returns the hyperbolic sine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - sinh(x: number): number; - - /** - * Returns the hyperbolic tangent of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - tanh(x: number): number; - - /** - * Returns the inverse hyperbolic cosine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - acosh(x: number): number; - - /** - * Returns the inverse hyperbolic sine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - asinh(x: number): number; - - /** - * Returns the inverse hyperbolic tangent of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - atanh(x: number): number; - - /** - * Returns the square root of the sum of squares of its arguments. - * @param values Values to compute the square root for. - * If no arguments are passed, the result is +0. - * If there is only one argument, the result is the absolute value. - * If any argument is +Infinity or -Infinity, the result is +Infinity. - * If any argument is NaN, the result is NaN. - * If all arguments are either +0 or −0, the result is +0. - */ - hypot(...values: number[]): number; - - /** - * Returns the integral part of the a numeric expression, x, removing any fractional digits. - * If x is already an integer, the result is x. - * @param x A numeric expression. - */ - trunc(x: number): number; - - /** - * Returns the nearest single precision float representation of a number. - * @param x A numeric expression. - */ - fround(x: number): number; - - /** - * Returns an implementation-dependent approximation to the cube root of number. - * @param x A numeric expression. - */ - cbrt(x: number): number; -} - -interface PromiseLike { - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): PromiseLike; - then(onfulfilled?: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => void): PromiseLike; -} - -/** - * Represents the completion of an asynchronous operation - */ -interface Promise { - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; - then(onfulfilled?: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => void): Promise; - - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: (reason: any) => T | PromiseLike): Promise; - catch(onrejected?: (reason: any) => void): Promise; -} - -interface PromiseConstructor { - /** - * A reference to the prototype. - */ - prototype: Promise; - - /** - * Creates a new Promise. - * @param executor A callback used to initialize the promise. This callback is passed two arguments: - * a resolve callback used resolve the promise with a value or the result of another promise, - * and a reject callback used to reject the promise with a provided reason or error. - */ - new (executor: (resolve: (value?: T | PromiseLike) => void, reject: (reason?: any) => void) => void): Promise; - - /** - * Creates a Promise that is resolved with an array of results when all of the provided Promises - * resolve, or rejected when any Promise is rejected. - * @param values An array of Promises. - * @returns A new Promise. - */ - all(values: IterableShim>): Promise; - - /** - * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved - * or rejected. - * @param values An array of Promises. - * @returns A new Promise. - */ - race(values: IterableShim>): Promise; - - /** - * Creates a new rejected promise for the provided reason. - * @param reason The reason the promise was rejected. - * @returns A new rejected Promise. - */ - reject(reason: any): Promise; - - /** - * Creates a new rejected promise for the provided reason. - * @param reason The reason the promise was rejected. - * @returns A new rejected Promise. - */ - reject(reason: any): Promise; - - /** - * Creates a new resolved promise for the provided value. - * @param value A promise. - * @returns A promise whose internal state matches the provided promise. - */ - resolve(value: T | PromiseLike): Promise; - - /** - * Creates a new resolved promise . - * @returns A resolved promise. - */ - resolve(): Promise; -} - -declare var Promise: PromiseConstructor; - -interface Map { - clear(): void; - delete(key: K): boolean; - forEach(callbackfn: (value: V, index: K, map: Map) => void, thisArg?: any): void; - get(key: K): V; - has(key: K): boolean; - set(key: K, value?: V): Map; - size: number; - entries(): IterableIteratorShim<[K, V]>; - keys(): IterableIteratorShim; - values(): IterableIteratorShim; -} - -interface MapConstructor { - new (): Map; - new (iterable: IterableShim<[K, V]>): Map; - prototype: Map; -} - -declare var Map: MapConstructor; - -interface Set { - add(value: T): Set; - clear(): void; - delete(value: T): boolean; - forEach(callbackfn: (value: T, index: T, set: Set) => void, thisArg?: any): void; - has(value: T): boolean; - size: number; - entries(): IterableIteratorShim<[T, T]>; - keys(): IterableIteratorShim; - values(): IterableIteratorShim; -} - -interface SetConstructor { - new (): Set; - new (iterable: IterableShim): Set; - prototype: Set; -} - -declare var Set: SetConstructor; - -interface WeakMap { - delete(key: K): boolean; - get(key: K): V; - has(key: K): boolean; - set(key: K, value?: V): WeakMap; -} - -interface WeakMapConstructor { - new (): WeakMap; - new (iterable: IterableShim<[K, V]>): WeakMap; - prototype: WeakMap; -} - -declare var WeakMap: WeakMapConstructor; - -interface WeakSet { - add(value: T): WeakSet; - delete(value: T): boolean; - has(value: T): boolean; -} - -interface WeakSetConstructor { - new (): WeakSet; - new (iterable: IterableShim): WeakSet; - prototype: WeakSet; -} - -declare var WeakSet: WeakSetConstructor; - -declare module Reflect { - function apply(target: Function, thisArgument: any, argumentsList: ArrayLike): any; - function construct(target: Function, argumentsList: ArrayLike): any; - function defineProperty(target: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean; - function deleteProperty(target: any, propertyKey: PropertyKey): boolean; - function enumerate(target: any): IterableIteratorShim; - function get(target: any, propertyKey: PropertyKey, receiver?: any): any; - function getOwnPropertyDescriptor(target: any, propertyKey: PropertyKey): PropertyDescriptor; - function getPrototypeOf(target: any): any; - function has(target: any, propertyKey: PropertyKey): boolean; - function isExtensible(target: any): boolean; - function ownKeys(target: any): Array; - function preventExtensions(target: any): boolean; - function set(target: any, propertyKey: PropertyKey, value: any, receiver?: any): boolean; - function setPrototypeOf(target: any, proto: any): boolean; -} - -declare module "es6-shim" { - var String: StringConstructor; - var Array: ArrayConstructor; - var Number: NumberConstructor; - var Math: Math; - var Object: ObjectConstructor; - var Map: MapConstructor; - var Set: SetConstructor; - var WeakMap: WeakMapConstructor; - var WeakSet: WeakSetConstructor; - var Promise: PromiseConstructor; - module Reflect { - function apply(target: Function, thisArgument: any, argumentsList: ArrayLike): any; - function construct(target: Function, argumentsList: ArrayLike): any; - function defineProperty(target: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean; - function deleteProperty(target: any, propertyKey: PropertyKey): boolean; - function enumerate(target: any): Iterator; - function get(target: any, propertyKey: PropertyKey, receiver?: any): any; - function getOwnPropertyDescriptor(target: any, propertyKey: PropertyKey): PropertyDescriptor; - function getPrototypeOf(target: any): any; - function has(target: any, propertyKey: PropertyKey): boolean; - function isExtensible(target: any): boolean; - function ownKeys(target: any): Array; - function preventExtensions(target: any): boolean; - function set(target: any, propertyKey: PropertyKey, value: any, receiver?: any): boolean; - function setPrototypeOf(target: any, proto: any): boolean; - } -} diff --git a/templates/Angular2Spa/typings/requirejs/require.d.ts b/templates/Angular2Spa/typings/requirejs/require.d.ts deleted file mode 100644 index e9cdb3e8..00000000 --- a/templates/Angular2Spa/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/Angular2Spa/typings/tsd.d.ts b/templates/Angular2Spa/typings/tsd.d.ts deleted file mode 100644 index c5cfdc2b..00000000 --- a/templates/Angular2Spa/typings/tsd.d.ts +++ /dev/null @@ -1,3 +0,0 @@ - -/// -/// diff --git a/templates/Angular2Spa/typings/url-workaround.d.ts b/templates/Angular2Spa/typings/url-workaround.d.ts deleted file mode 100644 index 9d167602..00000000 --- a/templates/Angular2Spa/typings/url-workaround.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -// This file is a workaround for angular2-universal-preview version 0.84.2 relying on the declaration of -// Node's 'url' module. Ideally it would not declare dependencies on Node APIs except where it also supplies -// the definitions itself. - -declare module 'url' { - export interface Url {} -} diff --git a/templates/KnockoutSpa/package.json b/templates/KnockoutSpa/package.json index 9de97387..a20faccc 100644 --- a/templates/KnockoutSpa/package.json +++ b/templates/KnockoutSpa/package.json @@ -1,7 +1,15 @@ { - "name": "WebApplicationBasic", + "name": "knockout-spa", "version": "0.0.0", "devDependencies": { + "@types/crossroads": "0.0.28", + "@types/es6-promise": "0.0.29", + "@types/history": "^2.0.30", + "@types/knockout": "^3.4.31", + "@types/react-router": "^2.0.30", + "@types/requirejs": "^2.1.26", + "@types/signals": "0.0.16", + "@types/whatwg-fetch": "0.0.28", "aspnet-webpack": "^1.0.6", "bootstrap": "^3.3.6", "bundle-loader": "^0.5.4", @@ -15,8 +23,8 @@ "knockout": "^3.4.0", "raw-loader": "^0.5.1", "style-loader": "^0.13.0", - "ts-loader": "^0.8.1", - "typescript": "^1.8.2", + "ts-loader": "^0.8.2", + "typescript": "^2.0.0", "url-loader": "^0.5.7", "webpack": "^1.12.14" }, diff --git a/templates/KnockoutSpa/tsd.json b/templates/KnockoutSpa/tsd.json deleted file mode 100644 index 0e5592c3..00000000 --- a/templates/KnockoutSpa/tsd.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "version": "v4", - "repo": "borisyankov/DefinitelyTyped", - "ref": "master", - "path": "typings", - "bundle": "typings/tsd.d.ts", - "installed": { - "whatwg-fetch/whatwg-fetch.d.ts": { - "commit": "dade4414712ce84e3c63393f1aae407e9e7e6af7" - }, - "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" - } - } -} 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/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 c0e628b1..00000000 --- a/templates/KnockoutSpa/typings/tsd.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/// -/// -/// -/// -/// -/// -/// -/// diff --git a/templates/KnockoutSpa/typings/whatwg-fetch/whatwg-fetch.d.ts b/templates/KnockoutSpa/typings/whatwg-fetch/whatwg-fetch.d.ts deleted file mode 100644 index 64dd9048..00000000 --- a/templates/KnockoutSpa/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/ReactReduxSpa/package.json b/templates/ReactReduxSpa/package.json index a1d53df4..d1986c9c 100644 --- a/templates/ReactReduxSpa/package.json +++ b/templates/ReactReduxSpa/package.json @@ -1,7 +1,18 @@ { - "name": "WebApplicationBasic", + "name": "react-redux-spa", "version": "0.0.0", "devDependencies": { + "@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.26", + "@types/uglify-js": "^2.0.27", + "@types/webpack": "^1.12.31", + "@types/whatwg-fetch": "0.0.28", "aspnet-webpack": "^1.0.6", "aspnet-webpack-react": "^1.0.1", "babel-loader": "^6.2.3", @@ -14,8 +25,8 @@ "file-loader": "^0.8.5", "jquery": "^2.2.1", "style-loader": "^0.13.0", - "ts-loader": "^0.8.1", - "typescript": "^1.8.2", + "ts-loader": "^0.8.2", + "typescript": "^2.0.0", "url-loader": "^0.5.7", "webpack": "^1.12.14", "webpack-hot-middleware": "^2.10.0" 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

( - 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 9776cdb4..a6db0687 100644 --- a/templates/ReactSpa/package.json +++ b/templates/ReactSpa/package.json @@ -1,7 +1,11 @@ { - "name": "WebApplicationBasic", + "name": "reactspa", "version": "0.0.0", "devDependencies": { + "@types/react": "^0.14.29", + "@types/react-dom": "^0.14.14", + "@types/react-router": "^2.0.30", + "@types/whatwg-fetch": "0.0.28", "aspnet-webpack": "^1.0.6", "aspnet-webpack-react": "^1.0.0", "babel-loader": "^6.2.3", @@ -14,8 +18,8 @@ "file-loader": "^0.8.5", "jquery": "^2.2.1", "style-loader": "^0.13.0", - "ts-loader": "^0.8.1", - "typescript": "^1.8.2", + "ts-loader": "^0.8.2", + "typescript": "^2.0.0", "url-loader": "^0.5.7", "webpack": "^1.12.14", "webpack-hot-middleware": "^2.10.0" diff --git a/templates/ReactSpa/tsd.json b/templates/ReactSpa/tsd.json deleted file mode 100644 index 523893de..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" - }, - "whatwg-fetch/whatwg-fetch.d.ts": { - "commit": "dade4414712ce84e3c63393f1aae407e9e7e6af7" - } - } -} 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 f54e1c6a..00000000 --- a/templates/ReactSpa/typings/tsd.d.ts +++ /dev/null @@ -1,6 +0,0 @@ - -/// -/// -/// -/// -/// diff --git a/templates/ReactSpa/typings/whatwg-fetch/whatwg-fetch.d.ts b/templates/ReactSpa/typings/whatwg-fetch/whatwg-fetch.d.ts deleted file mode 100644 index 64dd9048..00000000 --- a/templates/ReactSpa/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/WebApplicationBasic/package.json b/templates/WebApplicationBasic/package.json index b899475a..681b6853 100644 --- a/templates/WebApplicationBasic/package.json +++ b/templates/WebApplicationBasic/package.json @@ -1,5 +1,5 @@ { - "name": "WebApplicationBasic", + "name": "webapplication-basic", "version": "0.0.0", "devDependencies": { "bootstrap": "^3.3.6", @@ -10,7 +10,7 @@ "jquery": "^2.2.1", "style-loader": "^0.13.0", "ts-loader": "^0.8.1", - "typescript": "^1.8.2", + "typescript": "^2.0.0", "url-loader": "^0.5.7", "webpack": "^1.12.14" } From bc3069a569876bd8324080d193ec4dde2003a297 Mon Sep 17 00:00:00 2001 From: Mark Pieszak Date: Mon, 15 Aug 2016 02:19:39 -0400 Subject: [PATCH 3/8] Delete ISSUE_TEMPLATE.md --- .github/ISSUE_TEMPLATE.md | 46 --------------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index f27ce268..00000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,46 +0,0 @@ -**Note: for support questions, please use one of these channels:** https://github.com/aspnet/Home/blob/dev/CONTRIBUTING.md#filing-issues. This repository's issues are reserved for feature requests and bug reports. - -* **I'm submitting a ...** -- [ ] bug report -- [ ] feature request -- [ ] support request => Please do not submit support request here, see note at the top of this template. - -* **What Modules or Template are related to this Issue?** -- [ ] AngularServices -- [ ] NodeServices -- [ ] ReactServices -- [ ] SpaServices -- [ ] Angular2 Spa -- [ ] Knockout Spa -- [ ] ReactRedux Spa -- [ ] React Spa - - -* **Do you want to request a *feature* or report a *bug*?** - - - -* **What is the current behavior?** - - - -* **If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem** by creating a github repo. - - - -* **What is the expected behavior?** - - - -* **What is the motivation / use case for changing the behavior?** - - - -* **Please tell us about your environment:** - -- Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX ] -- OS: [all | Mac OS X | Windows | Linux ] -- Platform: [all | NodeJs | Java | PHP | .Net | Ruby] - - -* **Other information** (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc) From 0e18a64a9d2e9f640818b98382af11677bd9f8b0 Mon Sep 17 00:00:00 2001 From: Mark Pieszak Date: Mon, 15 Aug 2016 02:19:48 -0400 Subject: [PATCH 4/8] Delete PULL_REQUEST_TEMPLATE.md --- .github/PULL_REQUEST_TEMPLATE.md | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 733500d4..00000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,32 +0,0 @@ -* **Please check if the PR fulfills these requirements** -- [ ] The commit message follows our guidelines: https://github.com/aspnet/Home/blob/dev/CONTRIBUTING.md#contributing-code-and-content -- [ ] Tests for the changes have been added (for bug fixes / features) -- [ ] Docs have been added / updated (for bug fixes / features) - -* **What Modules or Template are related to this pull-request?** -- [ ] AngularServices -- [ ] NodeServices -- [ ] ReactServices -- [ ] SpaServices -- [ ] Angular2 Spa -- [ ] Knockout Spa -- [ ] ReactRedux Spa -- [ ] React Spa - -* **What kind of change does this PR introduce?** (Bug fix, feature, docs update, ...) -remove unused proxy imports from some test files - - -* **What is the current behavior?** (You can also link to an open issue here) - - - -* **What is the new behavior (if this is a feature change)?** - - - -* **Does this PR introduce a breaking change?** (What changes might users need to make in their application due to this PR?) -No - - -* **Other information**: From d9f368676e447c69a85e5a49ed4eebde027314a9 Mon Sep 17 00:00:00 2001 From: Mark Pieszak Date: Fri, 12 Aug 2016 16:36:52 -0400 Subject: [PATCH 5/8] Update to use TS2 lib capability - no need for es6 or core-js --- templates/Angular2Spa/package.json | 1 - templates/Angular2Spa/tsconfig.json | 1 + templates/KnockoutSpa/package.json | 1 - templates/KnockoutSpa/tsconfig.json | 1 + templates/WebApplicationBasic/tsconfig.json | 1 + 5 files changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/Angular2Spa/package.json b/templates/Angular2Spa/package.json index a8ecb82e..a1cfe430 100644 --- a/templates/Angular2Spa/package.json +++ b/templates/Angular2Spa/package.json @@ -2,7 +2,6 @@ "name": "angular2-spa", "version": "0.0.0", "devDependencies": { - "@types/core-js": "^0.9.30", "@types/requirejs": "^2.1.26", "aspnet-webpack": "^1.0.6", "bootstrap": "^3.3.6", diff --git a/templates/Angular2Spa/tsconfig.json b/templates/Angular2Spa/tsconfig.json index ef5deed5..ea2b9af0 100644 --- a/templates/Angular2Spa/tsconfig.json +++ b/templates/Angular2Spa/tsconfig.json @@ -2,6 +2,7 @@ "compilerOptions": { "moduleResolution": "node", "target": "es5", + "lib": ["es6", "dom"], "sourceMap": true, "experimentalDecorators": true, "emitDecoratorMetadata": true, diff --git a/templates/KnockoutSpa/package.json b/templates/KnockoutSpa/package.json index a20faccc..8a245245 100644 --- a/templates/KnockoutSpa/package.json +++ b/templates/KnockoutSpa/package.json @@ -3,7 +3,6 @@ "version": "0.0.0", "devDependencies": { "@types/crossroads": "0.0.28", - "@types/es6-promise": "0.0.29", "@types/history": "^2.0.30", "@types/knockout": "^3.4.31", "@types/react-router": "^2.0.30", diff --git a/templates/KnockoutSpa/tsconfig.json b/templates/KnockoutSpa/tsconfig.json index 61872e16..aea40b38 100644 --- a/templates/KnockoutSpa/tsconfig.json +++ b/templates/KnockoutSpa/tsconfig.json @@ -3,6 +3,7 @@ "moduleResolution": "node", "target": "es5", "sourceMap": true, + "lib": ["es6", "dom"], "skipDefaultLibCheck": true }, "exclude": [ diff --git a/templates/WebApplicationBasic/tsconfig.json b/templates/WebApplicationBasic/tsconfig.json index 61872e16..705766ee 100644 --- a/templates/WebApplicationBasic/tsconfig.json +++ b/templates/WebApplicationBasic/tsconfig.json @@ -2,6 +2,7 @@ "compilerOptions": { "moduleResolution": "node", "target": "es5", + "lib": ["es6", "dom"], "sourceMap": true, "skipDefaultLibCheck": true }, From b5d9d1f1d1257c3f45280c2477c97bbac6bcfc98 Mon Sep 17 00:00:00 2001 From: Mark Pieszak Date: Wed, 17 Aug 2016 13:22:07 -0400 Subject: [PATCH 6/8] Added custom types for universal --- templates/Angular2Spa/types/custom-typings.d.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 templates/Angular2Spa/types/custom-typings.d.ts diff --git a/templates/Angular2Spa/types/custom-typings.d.ts b/templates/Angular2Spa/types/custom-typings.d.ts new file mode 100644 index 00000000..c52fd924 --- /dev/null +++ b/templates/Angular2Spa/types/custom-typings.d.ts @@ -0,0 +1,11 @@ +// This file is a workaround for angular2-universal-preview version 0.84.2 relying on the declaration of +// Node's 'url' module. Ideally it would not declare dependencies on Node APIs except where it also supplies +// the definitions itself. + +declare module 'url' { + export interface Url {} +} + +declare var module: { + id: string; +}; \ No newline at end of file From 801cbf664cf5353df7926b049bb9d574e50e68b8 Mon Sep 17 00:00:00 2001 From: Mark Pieszak Date: Thu, 18 Aug 2016 00:22:17 -0400 Subject: [PATCH 7/8] Multiple TS fixes --- templates/Angular2Spa/tsconfig.json | 6 +++++- templates/KnockoutSpa/tsconfig.json | 6 +++++- templates/ReactReduxSpa/tsconfig.json | 8 +++++++- templates/ReactReduxSpa/types/custom-types.d.ts | 11 +++++++++++ templates/ReactSpa/tsconfig.json | 6 +++++- 5 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 templates/ReactReduxSpa/types/custom-types.d.ts diff --git a/templates/Angular2Spa/tsconfig.json b/templates/Angular2Spa/tsconfig.json index ea2b9af0..821c96c4 100644 --- a/templates/Angular2Spa/tsconfig.json +++ b/templates/Angular2Spa/tsconfig.json @@ -6,8 +6,12 @@ "sourceMap": true, "experimentalDecorators": true, "emitDecoratorMetadata": true, - "skipDefaultLibCheck": true + "skipDefaultLibCheck": true, + "typeRoots": [ "node_modules/@types" ], + "types": [ "requirejs" ] }, + "compileOnSave": false, + "buildOnSave": false, "exclude": [ "node_modules" ] diff --git a/templates/KnockoutSpa/tsconfig.json b/templates/KnockoutSpa/tsconfig.json index aea40b38..fd5e0072 100644 --- a/templates/KnockoutSpa/tsconfig.json +++ b/templates/KnockoutSpa/tsconfig.json @@ -4,8 +4,12 @@ "target": "es5", "sourceMap": true, "lib": ["es6", "dom"], - "skipDefaultLibCheck": true + "skipDefaultLibCheck": true, + "typeRoots": [ "node_modules/@types" ], + "types": [ "crossroads", "history", "knockout", "react-router", "requirejs", "signals", "whatwg-fetch" ] }, + "compileOnSave": false, + "buildOnSave": false, "exclude": [ "node_modules" ] diff --git a/templates/ReactReduxSpa/tsconfig.json b/templates/ReactReduxSpa/tsconfig.json index b6603ac4..0e0bc074 100644 --- a/templates/ReactReduxSpa/tsconfig.json +++ b/templates/ReactReduxSpa/tsconfig.json @@ -5,8 +5,14 @@ "jsx": "preserve", "experimentalDecorators": true, "sourceMap": true, - "skipDefaultLibCheck": true + "skipDefaultLibCheck": true, + "lib": ["es6", "dom"], + "typeRoots": [ "node_modules/@types" ], + "types": [ "react", "react-dom", "react-redux", "react-router", "react-router/history", "react-router-redux", "redux", "redux-thunk", + "source-map", "uglify-js", "webpack", "whatwg-fetch" ] }, + "compileOnSave": false, + "buildOnSave": false, "exclude": [ "node_modules" ] diff --git a/templates/ReactReduxSpa/types/custom-types.d.ts b/templates/ReactReduxSpa/types/custom-types.d.ts new file mode 100644 index 00000000..e960575b --- /dev/null +++ b/templates/ReactReduxSpa/types/custom-types.d.ts @@ -0,0 +1,11 @@ +/* +* +* Temporary type declarations +* +*/ + +/// + +declare var module: any; + +declare function require(any):any; \ No newline at end of file diff --git a/templates/ReactSpa/tsconfig.json b/templates/ReactSpa/tsconfig.json index 39a15ea3..cba613e9 100644 --- a/templates/ReactSpa/tsconfig.json +++ b/templates/ReactSpa/tsconfig.json @@ -4,8 +4,12 @@ "target": "es6", "jsx": "preserve", "sourceMap": true, - "skipDefaultLibCheck": true + "skipDefaultLibCheck": true, + "typeRoots": [ "node_modules/@types" ], + "types": [ "react", "react-dom", "react-router", "whatwg-fetch" ] }, + "compileOnSave": false, + "buildOnSave": false, "exclude": [ "node_modules" ] From f63759448eaf494ab66e535c8c6bae195ead488c Mon Sep 17 00:00:00 2001 From: Mark Pieszak Date: Fri, 16 Sep 2016 15:15:31 -0400 Subject: [PATCH 8/8] Updates - still working on ReactReduxSpa example --- templates/Angular2Spa/package.json | 2 +- templates/KnockoutSpa/package.json | 13 +- templates/KnockoutSpa/tsconfig.json | 3 +- templates/KnockoutSpa/tsd.json | 33 --- .../KnockoutSpa/types/custom-typings.d.ts | 0 templates/KnockoutSpa/types/history.d.ts | 233 ++++++++++++++++++ .../ReactReduxSpa/ClientApp/configureStore.ts | 1 + templates/ReactReduxSpa/tsconfig.json | 2 +- .../ReactReduxSpa/types/custom-types.d.ts | 1 - templates/ReactSpa/tsd.json | 24 -- 10 files changed, 244 insertions(+), 68 deletions(-) delete mode 100644 templates/KnockoutSpa/tsd.json create mode 100644 templates/KnockoutSpa/types/custom-typings.d.ts create mode 100644 templates/KnockoutSpa/types/history.d.ts delete mode 100644 templates/ReactSpa/tsd.json diff --git a/templates/Angular2Spa/package.json b/templates/Angular2Spa/package.json index b15f5167..95f28a54 100644 --- a/templates/Angular2Spa/package.json +++ b/templates/Angular2Spa/package.json @@ -29,7 +29,7 @@ "rxjs": "5.0.0-beta.6", "style-loader": "^0.13.0", "ts-loader": "^0.8.1", - "typescript": "^1.8.2", + "typescript": "^2.0.0", "url-loader": "^0.5.7", "webpack": "^1.12.14", "webpack-externals-plugin": "^1.0.0", diff --git a/templates/KnockoutSpa/package.json b/templates/KnockoutSpa/package.json index 26b0f988..582de561 100644 --- a/templates/KnockoutSpa/package.json +++ b/templates/KnockoutSpa/package.json @@ -2,13 +2,14 @@ "name": "knockout-spa", "version": "0.0.0", "devDependencies": { + "@types/core-js": "^0.9.32", "@types/crossroads": "0.0.28", - "@types/history": "^2.0.30", - "@types/knockout": "^3.4.31", - "@types/react-router": "^2.0.30", + "@types/history": "^2.0.35", + "@types/knockout": "^3.4.33", + "@types/react-router": "^2.0.33", "@types/requirejs": "^2.1.26", "@types/signals": "0.0.16", - "@types/whatwg-fetch": "0.0.28", + "@types/whatwg-fetch": "0.0.30", "aspnet-webpack": "^1.0.6", "bootstrap": "^3.3.6", "bundle-loader": "^0.5.4", @@ -16,8 +17,8 @@ "css-loader": "^0.23.1", "extendify": "^1.0.0", "extract-text-webpack-plugin": "^1.0.1", - "file-loader": "^0.8.5", - "history": "^2.0.1", + "file-loader": "^0.9.0", + "history": "^4.2.0", "isomorphic-fetch": "^2.2.1", "jquery": "^2.2.1", "knockout": "^3.4.0", diff --git a/templates/KnockoutSpa/tsconfig.json b/templates/KnockoutSpa/tsconfig.json index 32eb9b47..957f29a1 100644 --- a/templates/KnockoutSpa/tsconfig.json +++ b/templates/KnockoutSpa/tsconfig.json @@ -3,10 +3,9 @@ "moduleResolution": "node", "target": "es5", "sourceMap": true, - "lib": ["es6", "dom"], "skipDefaultLibCheck": true, "typeRoots": [ "node_modules/@types" ], - "types": [ "crossroads", "history", "knockout", "react-router", "requirejs", "signals", "whatwg-fetch" ] + "types": ["core-js", "crossroads", "history", "knockout", "react-router", "requirejs", "signals", "whatwg-fetch" ] }, "compileOnSave": false, "buildOnSave": false, diff --git a/templates/KnockoutSpa/tsd.json b/templates/KnockoutSpa/tsd.json deleted file mode 100644 index cde96c4e..00000000 --- a/templates/KnockoutSpa/tsd.json +++ /dev/null @@ -1,33 +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" - } - } -} diff --git a/templates/KnockoutSpa/types/custom-typings.d.ts b/templates/KnockoutSpa/types/custom-typings.d.ts new file mode 100644 index 00000000..e69de29b diff --git a/templates/KnockoutSpa/types/history.d.ts b/templates/KnockoutSpa/types/history.d.ts new file mode 100644 index 00000000..c5c9e832 --- /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/ReactReduxSpa/ClientApp/configureStore.ts b/templates/ReactReduxSpa/ClientApp/configureStore.ts index 3ce14319..23ef753d 100644 --- a/templates/ReactReduxSpa/ClientApp/configureStore.ts +++ b/templates/ReactReduxSpa/ClientApp/configureStore.ts @@ -4,6 +4,7 @@ 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 diff --git a/templates/ReactReduxSpa/tsconfig.json b/templates/ReactReduxSpa/tsconfig.json index 88eb73a4..e849b0aa 100644 --- a/templates/ReactReduxSpa/tsconfig.json +++ b/templates/ReactReduxSpa/tsconfig.json @@ -8,7 +8,7 @@ "skipDefaultLibCheck": true, "lib": ["es6", "dom"], "typeRoots": [ "node_modules/@types" ], - "types": [ "react", "react-dom", "react-redux", "react-router", "react-router/history", "react-router-redux", "redux", "redux-thunk", + "types": [ "react", "react-dom", "react-redux", "react-router", "react-router-redux", "redux", "redux-thunk", "source-map", "uglify-js", "webpack", "whatwg-fetch" ] }, "compileOnSave": false, diff --git a/templates/ReactReduxSpa/types/custom-types.d.ts b/templates/ReactReduxSpa/types/custom-types.d.ts index e960575b..6587f2f6 100644 --- a/templates/ReactReduxSpa/types/custom-types.d.ts +++ b/templates/ReactReduxSpa/types/custom-types.d.ts @@ -4,7 +4,6 @@ * */ -/// declare var module: any; 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" - } - } -}

, - 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