mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-25 11:11:46 +08:00
Merge remote-tracking branch 'borisyankov/master'
This commit is contained in:
Vendored
+1
-1
@@ -21,7 +21,7 @@ declare module L.mapbox {
|
||||
function map(element: string, id: string, options?: MapOptions): L.mapbox.Map;
|
||||
function map(element: string, tilejson: any, options?: MapOptions): L.mapbox.Map;
|
||||
|
||||
interface MapOptions extends L.MapOptions {
|
||||
interface MapOptions extends L.Map.MapOptions {
|
||||
featureLayer? : FeatureLayerOptions;
|
||||
gridLayer? : any;
|
||||
tileLayer? : TileLayerOptions;
|
||||
|
||||
Generated
+19
-77
@@ -3,14 +3,13 @@
|
||||
"version": "0.0.1",
|
||||
"dependencies": {
|
||||
"definition-tester": {
|
||||
"version": "0.2.0",
|
||||
"from": "definition-tester@0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/definition-tester/-/definition-tester-0.2.0.tgz",
|
||||
"version": "0.3.0",
|
||||
"from": "definition-tester@0.3.0",
|
||||
"dependencies": {
|
||||
"bluebird": {
|
||||
"version": "2.10.0",
|
||||
"from": "bluebird@>=2.5.3 <3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.10.0.tgz"
|
||||
"version": "2.10.1",
|
||||
"from": "bluebird@>=2.10.1 <3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.10.1.tgz"
|
||||
},
|
||||
"definition-header": {
|
||||
"version": "0.1.0",
|
||||
@@ -23,9 +22,9 @@
|
||||
"resolved": "https://registry.npmjs.org/joi/-/joi-4.9.0.tgz",
|
||||
"dependencies": {
|
||||
"hoek": {
|
||||
"version": "2.16.2",
|
||||
"version": "2.16.3",
|
||||
"from": "hoek@>=2.2.0 <3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.2.tgz"
|
||||
"resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz"
|
||||
},
|
||||
"topo": {
|
||||
"version": "1.0.3",
|
||||
@@ -76,71 +75,9 @@
|
||||
}
|
||||
},
|
||||
"findup-sync": {
|
||||
"version": "0.2.1",
|
||||
"from": "findup-sync@>=0.2.1 <0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.2.1.tgz",
|
||||
"dependencies": {
|
||||
"glob": {
|
||||
"version": "4.3.5",
|
||||
"from": "glob@>=4.3.0 <4.4.0",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-4.3.5.tgz",
|
||||
"dependencies": {
|
||||
"inflight": {
|
||||
"version": "1.0.4",
|
||||
"from": "inflight@>=1.0.4 <2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.4.tgz",
|
||||
"dependencies": {
|
||||
"wrappy": {
|
||||
"version": "1.0.1",
|
||||
"from": "wrappy@>=1.0.0 <2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"inherits": {
|
||||
"version": "2.0.1",
|
||||
"from": "inherits@>=2.0.0 <3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz"
|
||||
},
|
||||
"minimatch": {
|
||||
"version": "2.0.10",
|
||||
"from": "minimatch@>=2.0.1 <3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz",
|
||||
"dependencies": {
|
||||
"brace-expansion": {
|
||||
"version": "1.1.0",
|
||||
"from": "brace-expansion@>=1.0.0 <2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.0.tgz",
|
||||
"dependencies": {
|
||||
"balanced-match": {
|
||||
"version": "0.2.0",
|
||||
"from": "balanced-match@>=0.2.0 <0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.2.0.tgz"
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"from": "concat-map@0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"once": {
|
||||
"version": "1.3.2",
|
||||
"from": "once@>=1.3.0 <2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.3.2.tgz",
|
||||
"dependencies": {
|
||||
"wrappy": {
|
||||
"version": "1.0.1",
|
||||
"from": "wrappy@>=1.0.0 <2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"version": "0.3.0",
|
||||
"from": "findup-sync@>=0.3.0 <0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz"
|
||||
},
|
||||
"git-wrapper": {
|
||||
"version": "0.1.1",
|
||||
@@ -148,9 +85,9 @@
|
||||
"resolved": "https://registry.npmjs.org/git-wrapper/-/git-wrapper-0.1.1.tgz"
|
||||
},
|
||||
"glob": {
|
||||
"version": "4.5.3",
|
||||
"from": "glob@>=4.3.2 <5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz",
|
||||
"version": "5.0.14",
|
||||
"from": "glob@>=5.0.14 <6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-5.0.14.tgz",
|
||||
"dependencies": {
|
||||
"inflight": {
|
||||
"version": "1.0.4",
|
||||
@@ -204,12 +141,17 @@
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"path-is-absolute": {
|
||||
"version": "1.0.0",
|
||||
"from": "path-is-absolute@>=1.0.0 <2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"lazy.js": {
|
||||
"version": "0.4.2",
|
||||
"from": "lazy.js@>=0.4.0 <0.5.0",
|
||||
"from": "lazy.js@>=0.4.2 <0.5.0",
|
||||
"resolved": "https://registry.npmjs.org/lazy.js/-/lazy.js-0.4.2.tgz"
|
||||
},
|
||||
"manticore": {
|
||||
|
||||
+2
-2
@@ -17,7 +17,7 @@
|
||||
"url": "https://github.com/borisyankov/DefinitelyTyped/issues"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.10.0"
|
||||
"node": ">= 0.12.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "./node_modules/.bin/dt --changes",
|
||||
@@ -35,7 +35,7 @@
|
||||
"dependencies": {
|
||||
},
|
||||
"devDependencies": {
|
||||
"definition-tester": "0.2.0",
|
||||
"definition-tester": "0.3.0",
|
||||
"typescript": "1.6.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
/// <reference path="react-mixin.d.ts" />
|
||||
/// <reference path="../react/react.d.ts" />
|
||||
|
||||
import reactMixin = require('react-mixin');
|
||||
import * as React from 'react';
|
||||
|
||||
var someMixin: React.Mixin<any, any>;
|
||||
var someOtherMixin: React.Mixin<any, any>;
|
||||
|
||||
class Foo extends React.Component<any, any> {
|
||||
render(): JSX.Element { return <div />; }
|
||||
}
|
||||
|
||||
reactMixin(Foo.prototype, someMixin);
|
||||
reactMixin(Foo.prototype, someOtherMixin);
|
||||
|
||||
|
||||
var mixin: React.Mixin<any, any> = {
|
||||
getDefaultProps: function(): any {
|
||||
return {b: 2};
|
||||
}
|
||||
};
|
||||
|
||||
class Foo2 extends React.Component<any, any> {
|
||||
static defaultProps = {
|
||||
a: 1
|
||||
};
|
||||
render(): JSX.Element {
|
||||
console.log(this.props); // {a: 1, b: 2}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
reactMixin.onClass(Foo2, mixin);
|
||||
|
||||
@reactMixin.decorate(mixin)
|
||||
class Foo3 extends React.Component<any, any> {
|
||||
}
|
||||
|
||||
function autobind(methodNames: string[]): React.Mixin<any, any> {
|
||||
return {
|
||||
componentWillMount: function(): void {
|
||||
methodNames.forEach((name) => {
|
||||
this[name] = this[name].bind(this);
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@reactMixin.decorate(mixin)
|
||||
@reactMixin.decorate(autobind(Object.keys(mixin)))
|
||||
class Foo4 extends React.Component<any, any> {
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
--target es5 --noImplicitAny --experimentalDecorators --jsx react
|
||||
Vendored
+27
@@ -0,0 +1,27 @@
|
||||
// Type definitions for react-mixin 2.0.2
|
||||
// Project: https://github.com/brigand/react-mixin
|
||||
// Definitions by: Qubo <https://github.com/tkqubo>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../react/react.d.ts" />
|
||||
|
||||
declare module "react-mixin" {
|
||||
import * as React from 'react';
|
||||
|
||||
namespace reactMixin {
|
||||
export interface ClassDecorator {
|
||||
<TFunction extends Function>(target: TFunction): TFunction|void;
|
||||
}
|
||||
|
||||
interface ReactMixin {
|
||||
decorate(mixin: React.Mixin<any, any>): ClassDecorator;
|
||||
onClass<S>(clazz: any, mixin: React.Mixin<any, any>): React.ComponentClass<S>;
|
||||
<S>(clazz: any, mixin: React.Mixin<any, any>): React.ComponentClass<S>;
|
||||
}
|
||||
}
|
||||
|
||||
var reactMixin: reactMixin.ReactMixin;
|
||||
|
||||
export = reactMixin;
|
||||
}
|
||||
|
||||
Vendored
+16
-8
@@ -336,7 +336,7 @@ declare namespace __React {
|
||||
ref?: string | ((component: T) => any);
|
||||
}
|
||||
|
||||
interface DOMAttributes extends Props<DOMComponent<any>> {
|
||||
interface DOMAttributesBase<T> extends Props<T> {
|
||||
onCopy?: ClipboardEventHandler;
|
||||
onCut?: ClipboardEventHandler;
|
||||
onPaste?: ClipboardEventHandler;
|
||||
@@ -377,6 +377,9 @@ declare namespace __React {
|
||||
};
|
||||
}
|
||||
|
||||
interface DOMAttributes extends DOMAttributesBase<DOMComponent<any>> {
|
||||
}
|
||||
|
||||
// This interface is not complete. Only properties accepting
|
||||
// unitless numbers are listed here (see CSSProperty.js in React)
|
||||
interface CSSProperties {
|
||||
@@ -406,9 +409,7 @@ declare namespace __React {
|
||||
[propertyName: string]: any;
|
||||
}
|
||||
|
||||
interface HTMLAttributes extends DOMAttributes {
|
||||
ref?: string | ((component: HTMLComponent) => void);
|
||||
|
||||
interface HTMLAttributesBase<T> extends DOMAttributesBase<T> {
|
||||
accept?: string;
|
||||
acceptCharset?: string;
|
||||
accessKey?: string;
|
||||
@@ -528,6 +529,9 @@ declare namespace __React {
|
||||
unselectable?: boolean;
|
||||
}
|
||||
|
||||
interface HTMLAttributes extends HTMLAttributesBase<HTMLComponent> {
|
||||
}
|
||||
|
||||
interface SVGElementAttributes extends HTMLAttributes {
|
||||
viewBox?: string;
|
||||
preserveAspectRatio?: string;
|
||||
@@ -1133,7 +1137,7 @@ declare module "react/addons" {
|
||||
ref?: string | ((component: T) => any);
|
||||
}
|
||||
|
||||
interface DOMAttributes extends Props<DOMComponent<any>> {
|
||||
interface DOMAttributesBase<T> extends Props<T> {
|
||||
onCopy?: ClipboardEventHandler;
|
||||
onCut?: ClipboardEventHandler;
|
||||
onPaste?: ClipboardEventHandler;
|
||||
@@ -1174,6 +1178,9 @@ declare module "react/addons" {
|
||||
};
|
||||
}
|
||||
|
||||
interface DOMAttributes extends DOMAttributesBase<DOMComponent<any>> {
|
||||
}
|
||||
|
||||
// This interface is not complete. Only properties accepting
|
||||
// unitless numbers are listed here (see CSSProperty.js in React)
|
||||
interface CSSProperties {
|
||||
@@ -1203,9 +1210,7 @@ declare module "react/addons" {
|
||||
[propertyName: string]: any;
|
||||
}
|
||||
|
||||
interface HTMLAttributes extends DOMAttributes {
|
||||
ref?: string | ((component: HTMLComponent) => void);
|
||||
|
||||
interface HTMLAttributesBase<T> extends DOMAttributesBase<T> {
|
||||
accept?: string;
|
||||
acceptCharset?: string;
|
||||
accessKey?: string;
|
||||
@@ -1325,6 +1330,9 @@ declare module "react/addons" {
|
||||
unselectable?: boolean;
|
||||
}
|
||||
|
||||
interface HTMLAttributes extends HTMLAttributesBase<HTMLComponent> {
|
||||
}
|
||||
|
||||
interface SVGElementAttributes extends HTMLAttributes {
|
||||
viewBox?: string;
|
||||
preserveAspectRatio?: string;
|
||||
|
||||
Reference in New Issue
Block a user