mirror of https://github.com/status-im/reagent.git
Use externs from Cljsjs
This commit is contained in:
parent
bb00c2f29d
commit
be8f466158
12
project.clj
12
project.clj
|
@ -5,10 +5,10 @@
|
|||
|
||||
:dependencies [[org.clojure/clojure "1.8.0"]
|
||||
[org.clojure/clojurescript "1.9.762"]
|
||||
; [cljsjs/react-dom "15.6.1-1-SNAPSHOT"]
|
||||
; [cljsjs/react-dom-server "15.6.1-1-SNAPSHOT"]
|
||||
; [cljsjs/create-react-class "15.6.0-1-SNAPSHOT"]
|
||||
]
|
||||
;; If :npm-deps enabled, these are used only for externs
|
||||
[cljsjs/react-dom "15.6.1-1-SNAPSHOT"]
|
||||
[cljsjs/react-dom-server "15.6.1-1-SNAPSHOT"]
|
||||
[cljsjs/create-react-class "15.6.0-1-SNAPSHOT"]]
|
||||
|
||||
:plugins [[lein-cljsbuild "1.1.6"]
|
||||
[lein-codox "0.10.3"]]
|
||||
|
@ -101,10 +101,6 @@
|
|||
:language-out :ecmascript3
|
||||
:closure-warnings {:non-standard-jsdoc :off}
|
||||
:preloads [process.env]
|
||||
:externs ["src/react.ext.js"
|
||||
"src/react-dom.ext.js"
|
||||
"src/react-dom-server.ext.js"
|
||||
"src/extra.js"]
|
||||
:npm-deps {:react "15.6.1"
|
||||
:react-dom "15.6.1"
|
||||
:create-react-class "15.5.3"}}}}}
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
/**
|
||||
* @fileoverview Closure Compiler externs for Facebook ReactDOMServer.js DOM 0.14.0
|
||||
* @see http://reactjs.org
|
||||
* @externs
|
||||
*/
|
||||
|
||||
/**
|
||||
* The ReactDOMServer global object.
|
||||
*
|
||||
* @type {!Object}
|
||||
* @const
|
||||
*/
|
||||
var ReactDOMServer = {};
|
||||
|
||||
|
||||
/**
|
||||
* The current version of ReactDOMServer.
|
||||
*
|
||||
* @type {string}
|
||||
* @const
|
||||
*/
|
||||
ReactDOMServer.version;
|
||||
|
||||
/**
|
||||
* Render a ReactElement to its initial HTML.
|
||||
*
|
||||
* @param {React.ReactElement} element
|
||||
* @return {string}
|
||||
*/
|
||||
ReactDOMServer.renderToString = function(element) {};
|
||||
|
||||
|
||||
/**
|
||||
* Similar to renderToString, except this doesn't create extra DOM attributes
|
||||
* such as data-react-id, that React uses internally. This is useful if you want
|
||||
* to use React as a simple static page generator, as stripping away the extra
|
||||
* attributes can save lots of bytes.
|
||||
*
|
||||
* @param {React.ReactElement} element
|
||||
* @return {string}
|
||||
*/
|
||||
ReactDOMServer.renderToStaticMarkup = function(element) {};
|
|
@ -1,77 +0,0 @@
|
|||
/**
|
||||
* @fileoverview Closure Compiler externs for Facebook ReactDOM.js DOM 0.14.0
|
||||
* @see http://reactjs.org
|
||||
* @externs
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* The ReactDOM global object.
|
||||
*
|
||||
* @type {!Object}
|
||||
* @const
|
||||
* @suppress {const|duplicate}
|
||||
*/
|
||||
var ReactDOM = {};
|
||||
|
||||
|
||||
/**
|
||||
* The current version of ReactDOM.
|
||||
*
|
||||
* @type {string}
|
||||
* @const
|
||||
*/
|
||||
ReactDOM.version;
|
||||
|
||||
|
||||
/**
|
||||
* @param {React.ReactComponent} container
|
||||
* @param {Element} mountPoint
|
||||
* @param {Function=} opt_callback
|
||||
* @return {React.ReactComponent}
|
||||
*/
|
||||
ReactDOM.render = function(container, mountPoint, opt_callback) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {Element} container
|
||||
* @return {boolean}
|
||||
*/
|
||||
ReactDOM.unmountComponentAtNode = function(container) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {React.ReactComponent} component
|
||||
* @return {Element}
|
||||
*/
|
||||
ReactDOM.findDOMNode = function(component) {};
|
||||
|
||||
|
||||
/**
|
||||
* Call the provided function in a context within which calls to `setState`
|
||||
* and friends are batched such that components aren't updated unnecessarily.
|
||||
*
|
||||
* @param {Function} callback Function which calls `setState`, `forceUpdate`, etc.
|
||||
* @param {*=} opt_a Optional argument to pass to the callback.
|
||||
* @param {*=} opt_b Optional argument to pass to the callback.
|
||||
* @param {*=} opt_c Optional argument to pass to the callback.
|
||||
* @param {*=} opt_d Optional argument to pass to the callback.
|
||||
* @param {*=} opt_e Optional argument to pass to the callback.
|
||||
* @param {*=} opt_f Optional argument to pass to the callback.
|
||||
*/
|
||||
ReactDOM.unstable_batchedUpdates = function(callback, opt_a, opt_b, opt_c, opt_d, opt_e, opt_f) {};
|
||||
|
||||
/**
|
||||
* Renders a React component into the DOM in the supplied `container`.
|
||||
*
|
||||
* If the React component was previously rendered into `container`, this will
|
||||
* perform an update on it and only mutate the DOM as necessary to reflect the
|
||||
* latest React component.
|
||||
*
|
||||
* @param {React.ReactComponent} parentComponent The conceptual parent of this render tree.
|
||||
* @param {React.ReactElement} nextElement Component element to render.
|
||||
* @param {Element} container DOM element to render into.
|
||||
* @param {Function=} opt_callback function triggered on completion
|
||||
* @return {React.ReactComponent} Component instance rendered in `container`.
|
||||
*/
|
||||
ReactDOM.unstable_renderSubtreeIntoContainer = function(parentComponent, nextElement, container, opt_callback) {};
|
1907
src/react.ext.js
1907
src/react.ext.js
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue