(type: Thunk, attributes: A, ...children: any[]): VirtualElement;
+
+ var h: typeof element;
+
+ namespace diff {
+ /**
+ * Compare two virtual nodes and return an array of changes to turn the left into the right.
+ */
+ function diffNode(prevNode: VirtualElement, nextNode: VirtualElement): any[];
+
+ class Actions {
+ private _keys: string[];
+ private _name: string;
+
+ static setAttribute(a: string, b: any, c: any): Actions;
+ static removeAttribute(a: string, b: any): Actions;
+ static insertChild(a: any, b: number, c: string): Actions;
+ static removeChild(a: number): Actions;
+ static updateChild(a: number, b: any[]): Actions;
+ static updateChildren(a: any[]): Actions;
+ static insertBefore(a: number): Actions;
+ static replaceNode(a: any, b: any, c: string): Actions;
+ static removeNode(a: any): Actions;
+ static sameNode(): Actions;
+ static updateThunk(a: any, b: any, c: string): Actions;
+
+ static case(pat: any, action: Actions): any;
+ }
+ }
+
+ namespace vnode {
+ var create: typeof element;
+
+ /**
+ * Text nodes are stored as objects to keep things simple
+ */
+ function createTextElement(text: string): VirtualElement;
+
+ /**
+ * Lazily-rendered virtual nodes
+ */
+ function createThunkElement(fn: (model: Model) => VirtualElement, key: string, props: P, children: T[], options: O): VirtualElement;
+
+ function createEmptyElement(): VirtualElement;
+
+ function isThunk(vnode: VirtualElement): boolean;
+
+ function isText(vnode: VirtualElement): boolean;
+
+ function isEmpty(vnode: VirtualElement): boolean;
+
+ function isSameThunk(prevNode: VirtualElement, nextNode: VirtualElement): boolean;
+
+ // function isValidAttribute(value: A): boolean;
+
+ /**
+ * Create a node path, eg. (23,5,2,4) => '23.5.2.4'
+ */
+ function createPath(...paths: (number|string)[]): string;
+ }
+}
+
+interface Model {
+ props?: any,
+ children?: any[],
+ path?: string,
+ dispatch?: Dispatch,
+ context?: any
+}
+
+interface Component {
+ render: (model: Model) => deku.VirtualElement;
+ onCreate?: (model: Model) => any;
+ onUpdate?: (model: Model) => any;
+ onRemove?: (model: Model) => any;
+}
+
+/**
+ * Thunk object passed to `element`
+ */
+type Thunk = Component | ((model: Model) => deku.VirtualElement);
+
+type Render = (vnode: deku.VirtualElement, context?: any) => void;
+
+type Dispatch = (action: any) => any;
diff --git a/deku/tsconfig.json b/deku/tsconfig.json
new file mode 100644
index 0000000000..3a18954e88
--- /dev/null
+++ b/deku/tsconfig.json
@@ -0,0 +1,19 @@
+{
+ "compilerOptions": {
+ "module": "commonjs",
+ "target": "es6",
+ "noImplicitAny": true,
+ "strictNullChecks": true,
+ "baseUrl": "../",
+ "typeRoots": [
+ "../"
+ ],
+ "types": [],
+ "noEmit": true,
+ "forceConsistentCasingInFileNames": true
+ },
+ "files": [
+ "index.d.ts",
+ "deku-tests.ts"
+ ]
+}
diff --git a/easeljs/index.d.ts b/easeljs/index.d.ts
index a0dc7b566f..a5916a56f2 100644
--- a/easeljs/index.d.ts
+++ b/easeljs/index.d.ts
@@ -623,6 +623,7 @@ declare namespace createjs {
primary: boolean;
rawX: number;
rawY: number;
+ relatedTarget: DisplayObject;
stageX: number;
stageY: number;
mouseMoveOutside: boolean;
diff --git a/electron/index.d.ts b/electron/index.d.ts
index d39710189b..c0797775a2 100644
--- a/electron/index.d.ts
+++ b/electron/index.d.ts
@@ -2850,7 +2850,7 @@ declare namespace Electron {
interface StringProtocolCallback extends ProtocolCallback {
(str: string): void;
(obj: {
- data: Buffer,
+ data: string,
mimeType: string,
charset?: string
}): void;
diff --git a/extjs/ExtJS-tests.ts b/extjs/extjs-tests.ts
similarity index 100%
rename from extjs/ExtJS-tests.ts
rename to extjs/extjs-tests.ts
diff --git a/google-libphonenumber/index.d.ts b/google-libphonenumber/index.d.ts
index 937a0d9623..4a0f865373 100644
--- a/google-libphonenumber/index.d.ts
+++ b/google-libphonenumber/index.d.ts
@@ -20,10 +20,11 @@ declare namespace libphonenumber {
parse(number: string, region: string): PhoneNumber;
isValidNumber(phoneNumber: PhoneNumber): boolean;
isPossibleNumber(phoneNumber: PhoneNumber): boolean;
- isValidNumberForRegion(phoneNumber: PhoneNumber): boolean;
+ isValidNumberForRegion(phoneNumber: PhoneNumber, region: string): boolean;
getRegionCodeForNumber(phoneNumber: PhoneNumber): string;
isNANPACountry(regionCode: string): boolean;
format(phoneNumber: PhoneNumber, format: PhoneNumberFormat): string;
+ parseAndKeepRawInput(number: string, regionCode: string): PhoneNumber;
}
export class AsYouTypeFormatter {
diff --git a/google.visualization/google.visualization-tests.ts b/google.visualization/google.visualization-tests.ts
index 2cbd8220f2..a51657a592 100644
--- a/google.visualization/google.visualization-tests.ts
+++ b/google.visualization/google.visualization-tests.ts
@@ -156,10 +156,17 @@ function test_areaChart() {
['2016', 1030, 540]
]);
- var options = {
+ var options:google.visualization.AreaChartOptions = {
title: 'Company Performance',
hAxis: {title: 'Year', titleTextStyle: {color: '#333'}},
- vAxis: {minValue: 0}
+ vAxis: {minValue: 0},
+ annotations: {
+ textStyle: {
+ bold: true,
+ italic: true,
+ color: "black"
+ }
+ }
};
var chart = new google.visualization.AreaChart(document.getElementById('chart_div'));
@@ -510,3 +517,107 @@ function test_ChartsLoad() {
google.charts.setOnLoadCallback(drawChart);
}
+
+
+function test_ChartAnnotations() {
+ var annotations:google.visualization.ChartAnnotations = {
+ boxStyle: {
+ // Color of the box outline.
+ stroke: '#888',
+ // Thickness of the box outline.
+ strokeWidth: 1,
+ // x-radius of the corner curvature.
+ rx: 10,
+ // y-radius of the corner curvature.
+ ry: 10,
+ // Attributes for linear gradient fill.
+ gradient: {
+ // Start color for gradient.
+ color1: '#fbf6a7',
+ // Finish color for gradient.
+ color2: '#33b679',
+ // Where on the boundary to start and
+ // end the color1/color2 gradient,
+ // relative to the upper left corner
+ // of the boundary.
+ x1: '0%', y1: '0%',
+ x2: '100%', y2: '100%',
+ // If true, the boundary for x1,
+ // y1, x2, and y2 is the box. If
+ // false, it's the entire chart.
+ useObjectBoundingBoxUnits: true
+ }
+ },
+ datum: {
+ stem: {
+ color: 'black',
+ length: 12
+ },
+ style: 'point'
+ },
+ domain: {
+ stem: {
+ color: 'black',
+ length: 5
+ },
+ style: 'point'
+ },
+ highContrast: true,
+ stem: {
+ color: 'black',
+ length: 5
+ },
+ style: 'line',
+ textStyle: {
+ fontName: 'Times-Roman',
+ fontSize: 18,
+ bold: true,
+ italic: true,
+ // The color of the text.
+ color: '#871b47',
+ // The color of the text outline.
+ auraColor: '#d799ae',
+ // The transparency of the text.
+ opacity: 0.8
+ }
+ };
+
+ var barAnnotations:google.visualization.ChartBarColumnAnnotations = {
+ alwaysOutside: true,
+ textStyle: {
+ fontName: 'Times-Roman',
+ fontSize: 18,
+ bold: true
+ }
+ };
+}
+
+
+function test_OrgChart() {
+ var data = new google.visualization.DataTable();
+ data.addColumn('string', 'Name');
+ data.addColumn('string', 'Manager');
+ data.addColumn('string', 'ToolTip');
+
+ // For each orgchart box, provide the name, manager, and tooltip to show.
+ data.addRows([
+ [{v:'Mike', f:'MikePresident
'}, '', 'The President'],
+ [{v:'Jim', f:'JimVice President
'}, 'Mike', 'VP'],
+ ['Alice', 'Mike', ''],
+ ['Bob', 'Jim', 'Bob Sponge'],
+ ['Carol', 'Bob', '']
+ ]);
+
+ var chart = new google.visualization.OrgChart(document.getElementById('chart_div'));
+ chart.draw(data, {
+ allowCollapse: true,
+ allowHtml: true,
+ nodeClass: 'node',
+ selectedNodeClass: 'selected',
+ size: 'small'
+ });
+ chart.collapse(1, true);
+ var children = chart.getChildrenIndexes(0);
+ var collapsed = chart.getCollapsedNodes();
+
+}
diff --git a/google.visualization/index.d.ts b/google.visualization/index.d.ts
index a4dc1b7b1a..83b08296f8 100644
--- a/google.visualization/index.d.ts
+++ b/google.visualization/index.d.ts
@@ -1,6 +1,6 @@
// Type definitions for Google Visualisation Apis
// Project: https://developers.google.com/chart/
-// Definitions by: Dan Ludwig , Gregory Moore
+// Definitions by: Dan Ludwig , Gregory Moore , Dan Manastireanu
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace google {
@@ -331,6 +331,25 @@ declare namespace google {
export interface ChartAnnotations {
boxStyle?: ChartBoxStyle;
textStyle?: ChartTextStyle;
+ datum?: ChartStemAndStyle;
+ domain?: ChartStemAndStyle;
+ highContrast?: boolean;
+ stem?: ChartStem;
+ style?: string; // 'line' or 'point'
+ }
+
+ export interface ChartBarColumnAnnotations extends ChartAnnotations {
+ alwaysOutside?: boolean;
+ }
+
+ export interface ChartStemAndStyle {
+ stem?: ChartStem;
+ style?: string;
+ }
+
+ export interface ChartStem {
+ color?: string;
+ length?: number;
}
export interface ChartBoxStyle {
@@ -565,7 +584,7 @@ declare namespace google {
export interface ColumnChartOptions {
aggregationTarget?: string;
animation?: TransitionAnimation;
- annotations?: ChartAnnotations;
+ annotations?: ChartBarColumnAnnotations;
axisTitlesPosition?: string; // in, out, none
backgroundColor?: any;
bar?: GroupWidth;
@@ -645,7 +664,7 @@ declare namespace google {
export interface BarChartOptions {
aggregationTarget?: string;
animation?: TransitionAnimation;
- annotations?: ChartAnnotations;
+ annotations?: ChartBarColumnAnnotations;
axisTitlesPosition?: string; // in, out, none
backgroundColor?: any;
bar?: GroupWidth;
@@ -739,6 +758,7 @@ declare namespace google {
export interface AreaChartOptions {
aggregationTarget?: string;
animation?: TransitionAnimation;
+ annotations?: ChartAnnotations;
areaOpacity?: number;
axisTitlesPosition?: string;
backgroundColor?: any;
@@ -1357,6 +1377,34 @@ declare namespace google {
format(dataTable: DataTable, srcColumnIndices: number[], opt_dstColumnIndex?: number): void;
}
+ //#endregion
+ //#region OrgChart
+
+ // https://google-developers.appspot.com/chart/interactive/docs/gallery/orgchart
+ export class OrgChart extends CoreChartBase {
+ draw(data: DataTable, options: OrgChartOptions): void;
+ draw(data: DataView, options: OrgChartOptions): void;
+ collapse(row: number, collapsed: boolean): void;
+ getChildrenIndexes(row: number): number[];
+ getCollapsedNodes(): number[];
+ }
+
+ // https://google-developers.appspot.com/chart/interactive/docs/gallery/orgchart#Configuration_Options
+ export interface OrgChartOptions {
+ allowCollapse?: boolean;
+ allowHtml?: boolean;
+ color?: string;
+ nodeClass?: string;
+ selectedNodeClass?: string;
+ selectionColor?: string;
+ /**
+ * Chart size
+ * @type {('small'|'medium'|'large')}
+ * @default 'medium'
+ */
+ size?: string;
+ }
+
//#endregion
}
}
diff --git a/headroom/tsconfig.json b/headroom/tsconfig.json
index 6b6f41a4b8..3dd7aec967 100644
--- a/headroom/tsconfig.json
+++ b/headroom/tsconfig.json
@@ -14,6 +14,6 @@
},
"files": [
"index.d.ts",
- "Headroom-tests.ts"
+ "headroom-tests.ts"
]
}
\ No newline at end of file
diff --git a/ids/tsconfig.json b/ids/tsconfig.json
index 822ef6cd32..85fbd7f361 100644
--- a/ids/tsconfig.json
+++ b/ids/tsconfig.json
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"module": "commonjs",
- "target": "es5",
+ "target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../",
diff --git a/joi/index.d.ts b/joi/index.d.ts
index 1a8fb9c018..2f803cdf7d 100644
--- a/joi/index.d.ts
+++ b/joi/index.d.ts
@@ -125,10 +125,10 @@ export interface IPOptions {
}
export interface ValidationError extends Error {
- message: string;
+ isJoi: boolean;
details: ValidationErrorItem[];
- simple(): string;
- annotated(): string;
+ annotate(): string;
+ _object: any;
}
export interface ValidationErrorItem {
@@ -136,6 +136,7 @@ export interface ValidationErrorItem {
type: string;
path: string;
options?: ValidationOptions;
+ context?: any;
}
export interface ValidationResult {
diff --git a/joi/joi-tests.ts b/joi/joi-tests.ts
index 71b267e957..d50db6eedd 100644
--- a/joi/joi-tests.ts
+++ b/joi/joi-tests.ts
@@ -126,7 +126,8 @@ validErrItem = {
message: str,
type: str,
path: str,
- options: validOpts
+ options: validOpts,
+ context: obj
};
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
diff --git a/jquery.ajaxfile/jquery.ajaxFile-tests.ts b/jquery.ajaxfile/jquery.ajaxfile-tests.ts
similarity index 100%
rename from jquery.ajaxfile/jquery.ajaxFile-tests.ts
rename to jquery.ajaxfile/jquery.ajaxfile-tests.ts
diff --git a/jquery.slimscroll/jquery.SlimScroll-tests.ts b/jquery.slimscroll/jquery.slimscroll-tests.ts
similarity index 100%
rename from jquery.slimscroll/jquery.SlimScroll-tests.ts
rename to jquery.slimscroll/jquery.slimscroll-tests.ts
diff --git a/jquery.slimscroll/tsconfig.json b/jquery.slimscroll/tsconfig.json
index 910f07039e..524b9a8740 100644
--- a/jquery.slimscroll/tsconfig.json
+++ b/jquery.slimscroll/tsconfig.json
@@ -14,6 +14,6 @@
},
"files": [
"index.d.ts",
- "jquery.slimScroll-tests.ts"
+ "jquery.slimscroll-tests.ts"
]
}
\ No newline at end of file
diff --git a/jstimezonedetect/jstimezonedetect-tests.ts b/jstimezonedetect/jstimezonedetect-tests.ts
index c4907aa6b0..9baf0f4aa5 100644
--- a/jstimezonedetect/jstimezonedetect-tests.ts
+++ b/jstimezonedetect/jstimezonedetect-tests.ts
@@ -1,5 +1,3 @@
-///
-
import * as jstz from 'jstimezonedetect';
jstz.determine().name() === 'America/Montreal';
diff --git a/jstimezonedetect/tsconfig.json b/jstimezonedetect/tsconfig.json
new file mode 100644
index 0000000000..d036a843d1
--- /dev/null
+++ b/jstimezonedetect/tsconfig.json
@@ -0,0 +1,19 @@
+{
+ "compilerOptions": {
+ "module": "commonjs",
+ "target": "es6",
+ "noImplicitAny": true,
+ "strictNullChecks": true,
+ "baseUrl": "../",
+ "typeRoots": [
+ "../"
+ ],
+ "types": [],
+ "noEmit": true,
+ "forceConsistentCasingInFileNames": true
+ },
+ "files": [
+ "index.d.ts",
+ "jstimezonedetect-tests.ts"
+ ]
+}
\ No newline at end of file
diff --git a/leadfoot/tsconfig.json b/leadfoot/tsconfig.json
index cdd1c4b81c..b09d84c423 100644
--- a/leadfoot/tsconfig.json
+++ b/leadfoot/tsconfig.json
@@ -5,7 +5,7 @@
],
"compilerOptions": {
"module": "commonjs",
- "target": "es5",
+ "target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../",
diff --git a/leaflet/index.d.ts b/leaflet/index.d.ts
index 9f714717a3..d16be0bc1f 100644
--- a/leaflet/index.d.ts
+++ b/leaflet/index.d.ts
@@ -1222,12 +1222,35 @@ declare namespace L {
}
export namespace DomEvent {
- export function on(el: HTMLElement, types: string, fn: Function, context?: Object): typeof DomEvent;
+ export function on(el: HTMLElement, types: string, fn: (ev: Event) => any, context?: Object): typeof DomEvent;
+
export function on(el: HTMLElement, eventMap: {[eventName: string]: Function}, context?: Object): typeof DomEvent;
- export function off(el: HTMLElement, types: string, fn: Function, context?: Object): typeof DomEvent;
+
+ export function off(el: HTMLElement, types: string, fn: (ev: Event) => any, context?: Object): typeof DomEvent;
+
export function off(el: HTMLElement, eventMap: {[eventName: string]: Function}, context?: Object): typeof DomEvent;
+
+ export function stopPropagation(ev: Event): typeof DomEvent;
+
export function disableScrollPropagation(el: HTMLElement): typeof DomEvent;
+
export function disableClickPropagation(el: HTMLElement): typeof DomEvent;
+
+ export function preventDefault(ev: Event): typeof DomEvent;
+
+ export function stop(ev: Event): typeof DomEvent;
+
+ export function getMousePosition(ev: Event, container?: HTMLElement): Point;
+
+ export function getWheelDelta(ev: Event): number;
+
+ export function addListener(el: HTMLElement, types: string, fn: (ev: Event) => any, context?: Object): typeof DomEvent;
+
+ export function addListener(el: HTMLElement, eventMap: {[eventName: string]: Function}, context?: Object): typeof DomEvent;
+
+ export function removeListener(el: HTMLElement, types: string, fn: (ev: Event) => any, context?: Object): typeof DomEvent;
+
+ export function removeListener(el: HTMLElement, eventMap: {[eventName: string]: Function}, context?: Object): typeof DomEvent;
}
interface DefaultMapPanes {
diff --git a/leaflet/leaflet-tests.ts b/leaflet/leaflet-tests.ts
index 04d44f7210..34a5fa245f 100644
--- a/leaflet/leaflet-tests.ts
+++ b/leaflet/leaflet-tests.ts
@@ -208,12 +208,24 @@ tileLayer = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', tileLayerOpti
tileLayer = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png?{foo}&{bar}&{abc}', {foo: 'bar', bar: (data: any) => 'foo', abc: () => ''});
let eventHandler = () => {};
-L.DomEvent.on(htmlElement, 'click', eventHandler);
-L.DomEvent.off(htmlElement, 'click', eventHandler);
-L.DomEvent.on(htmlElement, { 'click': eventHandler });
-L.DomEvent.off(htmlElement, { 'click': eventHandler }, eventHandler);
-L.DomEvent.disableScrollPropagation(htmlElement);
-L.DomEvent.disableClickPropagation(htmlElement);
+let domEvent: Event = {} as Event;
+L.DomEvent
+ .on(htmlElement, 'click', eventHandler)
+ .addListener(htmlElement, 'click', eventHandler)
+ .off(htmlElement, 'click', eventHandler)
+ .removeListener(htmlElement, 'click', eventHandler)
+ .on(htmlElement, {'click': eventHandler})
+ .addListener(htmlElement, {'click': eventHandler})
+ .off(htmlElement, {'click': eventHandler}, eventHandler)
+ .removeListener(htmlElement, {'click': eventHandler}, eventHandler)
+ .stopPropagation(domEvent)
+ .disableScrollPropagation(htmlElement)
+ .disableClickPropagation(htmlElement)
+ .preventDefault(domEvent)
+ .stop(domEvent);
+point = L.DomEvent.getMousePosition(domEvent);
+point = L.DomEvent.getMousePosition(domEvent, htmlElement);
+const wheelDelta: number = L.DomEvent.getWheelDelta(domEvent);
map = map
// addControl
diff --git a/leapmotionts/LeapMotionTS-tests.ts b/leapmotionts/leapmotionts-tests.ts
similarity index 100%
rename from leapmotionts/LeapMotionTS-tests.ts
rename to leapmotionts/leapmotionts-tests.ts
diff --git a/leapmotionts/tsconfig.json b/leapmotionts/tsconfig.json
index d6599c4e70..4e16a4efea 100644
--- a/leapmotionts/tsconfig.json
+++ b/leapmotionts/tsconfig.json
@@ -14,6 +14,6 @@
},
"files": [
"index.d.ts",
- "leapmotionTS-tests.ts"
+ "leapmotionts-tests.ts"
]
}
\ No newline at end of file
diff --git a/libxmljs/index.d.ts b/libxmljs/index.d.ts
index bc33a4eec1..c928f57362 100644
--- a/libxmljs/index.d.ts
+++ b/libxmljs/index.d.ts
@@ -17,13 +17,13 @@ export declare function parseHtmlString(source: string): HTMLDocument;
export declare class XMLDocument {
constructor(version: number, encoding: string);
- child(idx: number): Element;
+ child(idx: number): Element | undefined;
childNodes(): Element[];
errors(): SyntaxError[];
encoding(): string;
encoding(enc: string): void;
find(xpath: string): Element[];
- get(xpath: string): Element;
+ get(xpath: string): Element | undefined;
node(name: string, content: string): Element;
root(): Element;
toString(): string;
@@ -48,7 +48,7 @@ export declare class Element {
attrs(): Attribute[];
parent(): Element;
doc(): XMLDocument;
- child(idx: number): Element;
+ child(idx: number): Element | undefined;
childNodes(): Element[];
addChild(child: Element): Element;
nextSibling(): Element;
@@ -60,9 +60,9 @@ export declare class Element {
find(xpath: string): Element[];
find(xpath: string, ns_uri: string): Element[];
find(xpath: string, namespaces: { [key: string]: string; }): Element[];
- get(xpath: string): Element;
- get(xpath: string, ns_uri: string): Element;
- get(xpath: string, ns_uri: { [key: string]: string; }): Element;
+ get(xpath: string): Element | undefined;
+ get(xpath: string, ns_uri: string): Element | undefined;
+ get(xpath: string, ns_uri: { [key: string]: string; }): Element | undefined;
defineNamespace(href: string): Namespace;
defineNamespace(prefix: string, href: string): Namespace;
namespace(): Namespace;
diff --git a/loader-runner/index.d.ts b/loader-runner/index.d.ts
index 102348ec71..f0b34ec600 100644
--- a/loader-runner/index.d.ts
+++ b/loader-runner/index.d.ts
@@ -8,7 +8,7 @@
export interface Loader {
path: string;
query: string;
- request: any;
+ request: string;
options: any;
normal: any;
pitch: any;
@@ -24,12 +24,12 @@ export interface RunLoaderOption {
resource: string;
loaders: any[];
context: any;
- readResource: (filename: string, callback: (err: NodeJS.ErrnoException, data: Buffer) => void) => void;
+ readResource: (filename: string, callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void) => void;
}
export function runLoaders(
options: RunLoaderOption,
- callback: (err: NodeJS.ErrnoException, result: any) => any
+ callback: (err: NodeJS.ErrnoException | null, result: any) => any
): void;
diff --git a/loader-runner/loader-runner-tests.ts b/loader-runner/loader-runner-tests.ts
index cfdd08f11b..38661b60ec 100644
--- a/loader-runner/loader-runner-tests.ts
+++ b/loader-runner/loader-runner-tests.ts
@@ -3,7 +3,8 @@ import { runLoaders, getContext, Loader, RunLoaderOption } from 'loader-runner';
const option = {} as RunLoaderOption;
runLoaders(option, function (err, result) {
- console.log(err, result);
+ if(err)
+ console.log(err, result);
});
getContext('sdlfkjaldfjiojsdf');
diff --git a/lodash/tsconfig.json b/lodash/tsconfig.json
index dd337af9c4..0a0d666d66 100644
--- a/lodash/tsconfig.json
+++ b/lodash/tsconfig.json
@@ -290,7 +290,7 @@
],
"compilerOptions": {
"module": "commonjs",
- "target": "es5",
+ "target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../",
diff --git a/lz-string/index.d.ts b/lz-string/index.d.ts
index 499c9cf50c..19c97c419f 100644
--- a/lz-string/index.d.ts
+++ b/lz-string/index.d.ts
@@ -1,4 +1,4 @@
-// Type definitions for lz-string v1.3.3
+// Type definitions for lz-string v1.3.5
// Project: https://github.com/pieroxy/lz-string
// Definitions by: Roman Nikitin
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -57,5 +57,35 @@ declare namespace LZString {
* @param compressed A string obtained from a call to compressToBase64().
*/
decompressFromBase64(compressed: string): string;
+
+ /**
+ * produces ASCII strings representing the original string encoded in Base64 with a few
+ * tweaks to make these URI safe. Hence, you can send them to the server without thinking
+ * about URL encoding them. This saves bandwidth and CPU
+ *
+ * @param uncompressed A string which should be compressed.
+ */
+ compressToEncodedURIComponent(uncompressed: string): string;
+
+ /**
+ * Decompresses "valid" input string created by the method compressToEncodedURIComponent().
+ *
+ * @param compressed A string obtained from a call to compressToEncodedURIComponent().
+ */
+ decompressFromEncodedURIComponent(compressed: string): string;
+
+ /**
+ * produces an uint8Array
+ *
+ * @param uncompressed A string which should be compressed.
+ */
+ compressToUint8Array(uncompressed: string): Uint8Array;
+
+ /**
+ * Decompresses "valid" array created by the method compressToUint8Array().
+ *
+ * @param compressed A string obtained from a call to compressToUint8Array().
+ */
+ decompressFromUint8Array(compressed: Uint8Array): string;
}
}
diff --git a/lz-string/lz-string-tests.ts b/lz-string/lz-string-tests.ts
index e26160f5f4..131bce2105 100644
--- a/lz-string/lz-string-tests.ts
+++ b/lz-string/lz-string-tests.ts
@@ -3,10 +3,15 @@
var input = "Someting to compress";
var encoded: string;
var decoded: string;
+var encodedU8: Uint8Array;
encoded = LZString.compress(input);
decoded = LZString.decompress(encoded);
encoded = LZString.compressToUTF16(input);
decoded = LZString.decompressFromUTF16(encoded);
encoded = LZString.compressToBase64(input);
-decoded = LZString.decompressFromBase64(encoded);
\ No newline at end of file
+decoded = LZString.decompressFromBase64(encoded);
+encoded = LZString.compressToEncodedURIComponent(input);
+decoded = LZString.compressToEncodedURIComponent(encoded);
+encodedU8 = LZString.compressToUint8Array(input);
+decoded = LZString.decompressFromUint8Array(encodedU8);
\ No newline at end of file
diff --git a/material-ui/index.d.ts b/material-ui/index.d.ts
index 941b7aff72..c04d673dc9 100644
--- a/material-ui/index.d.ts
+++ b/material-ui/index.d.ts
@@ -141,7 +141,7 @@ declare namespace __MaterialUI {
fontFamily?: string;
palette?: ThemePalette;
isRtl?: boolean;
- userAgent?: string;
+ userAgent?: string | boolean;
zIndex?: zIndex;
baseTheme?: RawTheme;
rawTheme?: RawTheme;
diff --git a/mongoose/index.d.ts b/mongoose/index.d.ts
index 12c92571b5..150d94b2df 100644
--- a/mongoose/index.d.ts
+++ b/mongoose/index.d.ts
@@ -871,7 +871,7 @@ declare module "mongoose" {
/** Hash containing current validation errors. */
errors: Object;
/** This documents _id. */
- _id: mongodb.ObjectID;
+ _id: any;
/** Boolean flag specifying if the document is new. */
isNew: boolean;
/** The documents schema. */
diff --git a/mz/tsconfig.json b/mz/tsconfig.json
index 83fafa87ea..7622a546f2 100644
--- a/mz/tsconfig.json
+++ b/mz/tsconfig.json
@@ -9,7 +9,8 @@
"../"
],
"types": [],
- "noEmit": true
+ "noEmit": true,
+ "forceConsistentCasingInFileNames": true
},
"files": [
"fs.d.ts",
diff --git a/node-schedule/index.d.ts b/node-schedule/index.d.ts
index b4cf431e64..d21f46715d 100644
--- a/node-schedule/index.d.ts
+++ b/node-schedule/index.d.ts
@@ -214,6 +214,67 @@ export class RecurrenceRule {
nextInvocationDate(base:Date):Date;
}
+/**
+ * Recurrence rule specification.
+ */
+export interface RecurrenceSpec {
+ /**
+ * Day of the month.
+ *
+ * @public
+ * @type {RecurrenceSegment}
+ */
+ date?: RecurrenceSegment;
+
+ /**
+ * Day of the week.
+ *
+ * @public
+ * @type {RecurrenceSegment}
+ */
+ dayOfWeek?: RecurrenceSegment;
+
+ /**
+ * Hour.
+ *
+ * @public
+ * @type {RecurrenceSegment}
+ */
+ hour?: RecurrenceSegment;
+
+ /**
+ * Minute.
+ *
+ * @public
+ * @type {RecurrenceSegment}
+ */
+ minute?: RecurrenceSegment;
+
+ /**
+ * Month.
+ *
+ * @public
+ * @type {RecurrenceSegment}
+ */
+ month?: RecurrenceSegment;
+
+ /**
+ * Second.
+ *
+ * @public
+ * @type {RecurrenceSegment}
+ */
+ second?: RecurrenceSegment;
+
+ /**
+ * Year.
+ *
+ * @public
+ * @type {RecurrenceSegment}
+ */
+ year?: RecurrenceSegment;
+}
+
/**
* Invocation.
*
@@ -266,11 +327,19 @@ export class Invocation {
/**
* Create a schedule job.
*
- * @param {string|RecurrenceRule|Date} name either an optional name for the new Job or scheduling information
- * @param {RecurrenceRule|Date|string} rule either the scheduling info or the JobCallback
- * @param {JobCallback} callback The callback to be executed on each invocation.
+ * @param {string} name name for the new Job
+ * @param {RecurrenceRule|RecurrenceSpec|Date|string} rule scheduling info
+ * @param {JobCallback} callback callback to be executed on each invocation
*/
- export function scheduleJob(name:string|RecurrenceRule|Date, rule: RecurrenceRule|Date|string|JobCallback, callback?: JobCallback): Job;
+ export function scheduleJob(name: string, rule: RecurrenceRule | RecurrenceSpec | Date | string, callback: JobCallback): Job;
+
+/**
+ * Create a schedule job.
+ *
+ * @param {RecurrenceRule|RecurrenceSpec|Date|string} rule scheduling info
+ * @param {JobCallback} callback callback to be executed on each invocation
+ */
+ export function scheduleJob(rule: RecurrenceRule | RecurrenceSpec | Date | string, callback: JobCallback): Job;
/**
* Changes the timing of a Job, canceling all pending invocations.
@@ -279,7 +348,7 @@ export class Invocation {
* @param spec {JobCallback} the new timing for this Job
* @return {Job} if the job could be rescheduled, {null} otherwise.
*/
- export function rescheduleJob(job:Job|string, spec:RecurrenceRule|Date|string):Job;
+ export function rescheduleJob(job: Job | string, spec: RecurrenceRule | RecurrenceSpec | Date | string): Job;
/**
* Dictionary of all Jobs, accessible by name.
diff --git a/object-refs/tsconfig.json b/object-refs/tsconfig.json
index 472dc47723..6b81d1c07d 100644
--- a/object-refs/tsconfig.json
+++ b/object-refs/tsconfig.json
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"module": "commonjs",
- "target": "es5",
+ "target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../",
diff --git a/ora/index.d.ts b/ora/index.d.ts
index a31d2bd5c1..e45a585442 100644
--- a/ora/index.d.ts
+++ b/ora/index.d.ts
@@ -1,36 +1,34 @@
// Type definitions for ora v0.3.0
// Project: https://github.com/sindresorhus/ora
-// Definitions by: Basarat Ali Syed
+// Definitions by: Basarat Ali Syed , Christian Rackerseder
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
///
-
type Color = 'black' | 'red' | 'green' | 'yellow' | 'blue' | 'magenta' | 'cyan' | 'white' | 'gray';
-type Text = string;
interface Options {
- text?: Text;
- spinner?: string | Spinner;
+ text?: string;
+ spinner?: string | Spinner;
color?: Color;
- interval?: number;
- stream?: NodeJS.WritableStream;
- enabled?: boolean;
- }
- interface Spinner {
- interval?: number;
- frames: string[];
+ interval?: number;
+ stream?: NodeJS.WritableStream;
+ enabled?: boolean;
+}
+interface Spinner {
+ interval?: number;
+ frames: string[];
}
interface Instance {
- start(): Instance;
- stop(): Instance;
- succeed(): Instance;
- fail(): Instance;
- stopAndPersist(symbol?: string): Instance;
- clear(): Instance;
- render(): Instance;
- frame(): Instance;
- text: string;
+ start(): Instance;
+ stop(): Instance;
+ succeed(): Instance;
+ fail(): Instance;
+ stopAndPersist(symbol?: string): Instance;
+ clear(): Instance;
+ render(): Instance;
+ frame(): Instance;
+ text: string;
color: Color;
}
-declare function ora(options: Options | Text): Instance;
+declare function ora(options: Options | string): Instance;
export = ora;
diff --git a/ora/ora-tests.ts b/ora/ora-tests.ts
index 067edd8678..b6e2a671dc 100644
--- a/ora/ora-tests.ts
+++ b/ora/ora-tests.ts
@@ -1,7 +1,6 @@
import ora = require('ora');
-const spinner = ora('Loading unicorns');
-spinner.start();
+const spinner = ora('Loading unicorns').start();
setTimeout(() => {
spinner.color = 'yellow';
diff --git a/passport-local-mongoose/passport-local-mongoose-tests.ts b/passport-local-mongoose/passport-local-mongoose-tests.ts
index 21a928a8d7..7b428561fe 100644
--- a/passport-local-mongoose/passport-local-mongoose-tests.ts
+++ b/passport-local-mongoose/passport-local-mongoose-tests.ts
@@ -23,6 +23,7 @@ import { Strategy as LocalStrategy } from 'passport-local';
//#region Test Models
interface User extends PassportLocalDocument {
+ _id: string;
username: string;
hash: string;
salt: string;
diff --git a/react-bootstrap/index.d.ts b/react-bootstrap/index.d.ts
index 9780efb443..2ec9eed50d 100644
--- a/react-bootstrap/index.d.ts
+++ b/react-bootstrap/index.d.ts
@@ -540,6 +540,7 @@ declare namespace ReactBootstrap {
brand?: any; // TODO: Add more specific type
bsSize?: Sizes;
bsStyle?: string;
+ collapseOnSelect?: boolean;
componentClass?: React.ReactType;
defaultNavExpanded?: boolean;
fixedBottom?: boolean;
diff --git a/react-helmet/index.d.ts b/react-helmet/index.d.ts
index c44639e0d0..3ddfd1ebb5 100644
--- a/react-helmet/index.d.ts
+++ b/react-helmet/index.d.ts
@@ -7,14 +7,11 @@
import * as React from "react";
-declare var Helmet: {
- (): ReactHelmet.HelmetComponent
- rewind(): ReactHelmet.HelmetData
- }
-
-export = Helmet;
+declare function ReactHelmet(): ReactHelmet.HelmetComponent;
declare namespace ReactHelmet {
+ function rewind(): ReactHelmet.HelmetData;
+
interface HelmetProps {
base?: any;
defaultTitle?: string;
@@ -43,3 +40,5 @@ declare namespace ReactHelmet {
class HelmetComponent extends React.Component {}
}
+
+export = ReactHelmet;
diff --git a/react-helmet/react-helmet-tests.tsx b/react-helmet/react-helmet-tests.tsx
index 2db79eb547..3a4a3f09d7 100644
--- a/react-helmet/react-helmet-tests.tsx
+++ b/react-helmet/react-helmet-tests.tsx
@@ -39,3 +39,9 @@ function HTML() {