code stringlengths 24 2.07M | docstring stringlengths 25 85.3k | func_name stringlengths 1 92 | language stringclasses 1
value | repo stringlengths 5 64 | path stringlengths 4 172 | url stringlengths 44 218 | license stringclasses 7
values |
|---|---|---|---|---|---|---|---|
function flatPromise() {
let resolveFn
let rejectFn
const p = new Promise((resolve, reject) => {
resolveFn = resolve
rejectFn = reject
})
return [p, resolveFn, rejectFn]
} | Create a promise and obtain the resolve/reject functions
outside of the Promise callback. | flatPromise | javascript | tus/tus-js-client | test/spec/helpers/utils.js | https://github.com/tus/tus-js-client/blob/master/test/spec/helpers/utils.js | MIT |
function waitableFunction(name = 'func') {
const [promise, resolve] = flatPromise()
const fn = jasmine.createSpy(name, resolve).and.callThrough()
fn.toBeCalled = () => promise
return fn
} | Create a spy-able function which resolves a Promise
once it is called. | waitableFunction | javascript | tus/tus-js-client | test/spec/helpers/utils.js | https://github.com/tus/tus-js-client/blob/master/test/spec/helpers/utils.js | MIT |
function wait(delay) {
return new Promise((resolve) => {
setTimeout(resolve, delay, 'timed out')
})
} | Create a Promise that resolves after the specified duration. | wait | javascript | tus/tus-js-client | test/spec/helpers/utils.js | https://github.com/tus/tus-js-client/blob/master/test/spec/helpers/utils.js | MIT |
constructor() {
this._pendingRequests = []
this._pendingWaits = []
} | TestHttpStack implements the HTTP stack interface for tus-js-client
and can be used to assert outgoing requests and respond with mock data. | constructor | javascript | tus/tus-js-client | test/spec/helpers/utils.js | https://github.com/tus/tus-js-client/blob/master/test/spec/helpers/utils.js | MIT |
createRequest(method, url) {
return new TestRequest(method, url, (req) => {
if (this._pendingWaits.length >= 1) {
const handler = this._pendingWaits.shift()
handler(req)
return
}
this._pendingRequests.push(req)
})
} | TestHttpStack implements the HTTP stack interface for tus-js-client
and can be used to assert outgoing requests and respond with mock data. | createRequest | javascript | tus/tus-js-client | test/spec/helpers/utils.js | https://github.com/tus/tus-js-client/blob/master/test/spec/helpers/utils.js | MIT |
nextRequest() {
if (this._pendingRequests.length >= 1) {
return Promise.resolve(this._pendingRequests.shift())
}
return new Promise((resolve) => {
this._pendingWaits.push(resolve)
})
} | TestHttpStack implements the HTTP stack interface for tus-js-client
and can be used to assert outgoing requests and respond with mock data. | nextRequest | javascript | tus/tus-js-client | test/spec/helpers/utils.js | https://github.com/tus/tus-js-client/blob/master/test/spec/helpers/utils.js | MIT |
constructor(method, url, onRequestSend) {
this.method = method
this.url = url
this.requestHeaders = {}
this.body = null
this.bodySize = null
this._onRequestSend = onRequestSend
this._onProgress = () => {}
;[this._requestPromise, this._resolveRequest, this._rejectRequest] = flatPromise()... | TestHttpStack implements the HTTP stack interface for tus-js-client
and can be used to assert outgoing requests and respond with mock data. | constructor | javascript | tus/tus-js-client | test/spec/helpers/utils.js | https://github.com/tus/tus-js-client/blob/master/test/spec/helpers/utils.js | MIT |
getMethod() {
return this.method
} | TestHttpStack implements the HTTP stack interface for tus-js-client
and can be used to assert outgoing requests and respond with mock data. | getMethod | javascript | tus/tus-js-client | test/spec/helpers/utils.js | https://github.com/tus/tus-js-client/blob/master/test/spec/helpers/utils.js | MIT |
getURL() {
return this.url
} | TestHttpStack implements the HTTP stack interface for tus-js-client
and can be used to assert outgoing requests and respond with mock data. | getURL | javascript | tus/tus-js-client | test/spec/helpers/utils.js | https://github.com/tus/tus-js-client/blob/master/test/spec/helpers/utils.js | MIT |
setHeader(header, value) {
this.requestHeaders[header] = value
} | TestHttpStack implements the HTTP stack interface for tus-js-client
and can be used to assert outgoing requests and respond with mock data. | setHeader | javascript | tus/tus-js-client | test/spec/helpers/utils.js | https://github.com/tus/tus-js-client/blob/master/test/spec/helpers/utils.js | MIT |
getHeader(header) {
return this.requestHeaders[header] || null
} | TestHttpStack implements the HTTP stack interface for tus-js-client
and can be used to assert outgoing requests and respond with mock data. | getHeader | javascript | tus/tus-js-client | test/spec/helpers/utils.js | https://github.com/tus/tus-js-client/blob/master/test/spec/helpers/utils.js | MIT |
setProgressHandler(progressHandler) {
this._onProgress = progressHandler
} | TestHttpStack implements the HTTP stack interface for tus-js-client
and can be used to assert outgoing requests and respond with mock data. | setProgressHandler | javascript | tus/tus-js-client | test/spec/helpers/utils.js | https://github.com/tus/tus-js-client/blob/master/test/spec/helpers/utils.js | MIT |
async send(body = null) {
this.body = body
if (body) {
this.bodySize = await getBodySize(body)
this._onProgress(0)
this._onProgress(this.bodySize)
}
this._onRequestSend(this)
return this._requestPromise
} | TestHttpStack implements the HTTP stack interface for tus-js-client
and can be used to assert outgoing requests and respond with mock data. | send | javascript | tus/tus-js-client | test/spec/helpers/utils.js | https://github.com/tus/tus-js-client/blob/master/test/spec/helpers/utils.js | MIT |
abort() {
this._rejectRequest(new Error('request aborted'))
} | TestHttpStack implements the HTTP stack interface for tus-js-client
and can be used to assert outgoing requests and respond with mock data. | abort | javascript | tus/tus-js-client | test/spec/helpers/utils.js | https://github.com/tus/tus-js-client/blob/master/test/spec/helpers/utils.js | MIT |
getUnderlyingObject() {
throw new Error('not implemented')
} | TestHttpStack implements the HTTP stack interface for tus-js-client
and can be used to assert outgoing requests and respond with mock data. | getUnderlyingObject | javascript | tus/tus-js-client | test/spec/helpers/utils.js | https://github.com/tus/tus-js-client/blob/master/test/spec/helpers/utils.js | MIT |
respondWith(resData) {
resData.responseHeaders = resData.responseHeaders || {}
const res = new TestResponse(resData)
this._resolveRequest(res)
} | TestHttpStack implements the HTTP stack interface for tus-js-client
and can be used to assert outgoing requests and respond with mock data. | respondWith | javascript | tus/tus-js-client | test/spec/helpers/utils.js | https://github.com/tus/tus-js-client/blob/master/test/spec/helpers/utils.js | MIT |
async function getBodySize(body) {
if (body == null) {
return null
}
if (
body instanceof ArrayBuffer ||
(typeof SharedArrayBuffer !== 'undefined' && body instanceof SharedArrayBuffer) ||
ArrayBuffer.isView(body)
) {
return body.byteLength
}
if (body instanceof Blob) {
return body.... | TestHttpStack implements the HTTP stack interface for tus-js-client
and can be used to assert outgoing requests and respond with mock data. | getBodySize | javascript | tus/tus-js-client | test/spec/helpers/utils.js | https://github.com/tus/tus-js-client/blob/master/test/spec/helpers/utils.js | MIT |
constructor(res) {
this._response = res
} | TestHttpStack implements the HTTP stack interface for tus-js-client
and can be used to assert outgoing requests and respond with mock data. | constructor | javascript | tus/tus-js-client | test/spec/helpers/utils.js | https://github.com/tus/tus-js-client/blob/master/test/spec/helpers/utils.js | MIT |
getStatus() {
return this._response.status
} | TestHttpStack implements the HTTP stack interface for tus-js-client
and can be used to assert outgoing requests and respond with mock data. | getStatus | javascript | tus/tus-js-client | test/spec/helpers/utils.js | https://github.com/tus/tus-js-client/blob/master/test/spec/helpers/utils.js | MIT |
getHeader(header) {
return this._response.responseHeaders[header]
} | TestHttpStack implements the HTTP stack interface for tus-js-client
and can be used to assert outgoing requests and respond with mock data. | getHeader | javascript | tus/tus-js-client | test/spec/helpers/utils.js | https://github.com/tus/tus-js-client/blob/master/test/spec/helpers/utils.js | MIT |
getBody() {
return this._response.responseText
} | TestHttpStack implements the HTTP stack interface for tus-js-client
and can be used to assert outgoing requests and respond with mock data. | getBody | javascript | tus/tus-js-client | test/spec/helpers/utils.js | https://github.com/tus/tus-js-client/blob/master/test/spec/helpers/utils.js | MIT |
getUnderlyingObject() {
throw new Error('not implemented')
} | TestHttpStack implements the HTTP stack interface for tus-js-client
and can be used to assert outgoing requests and respond with mock data. | getUnderlyingObject | javascript | tus/tus-js-client | test/spec/helpers/utils.js | https://github.com/tus/tus-js-client/blob/master/test/spec/helpers/utils.js | MIT |
function Component(props, context, updater) {
this.props = props;
this.context = context;
this.refs = emptyObject;
this.updater = updater || ReactNoopUpdateQueue;
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | Component | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
defineDeprecationWarning = function(methodName, info) {
Object.defineProperty(Component.prototype, methodName, {
get: function() {
warn("%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1]);
return void 0;
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | defineDeprecationWarning | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function PureComponent(props, context, updater) {
this.props = props;
this.context = context;
this.refs = emptyObject;
this.updater = updater || ReactNoopUpdateQueue;
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | PureComponent | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function createRef() {
var refObject = {
current: null
};
{
Object.seal(refObject);
}
return refObject;
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | createRef | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function isArray(a) {
return isArrayImpl(a);
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | isArray | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function typeName(value) {
{
var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag;
var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
return type;
}
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | typeName | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function willCoercionThrow(value) {
{
try {
testStringCoercion(value);
return false;
} catch (e) {
return true;
}
}
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | willCoercionThrow | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function testStringCoercion(value) {
return "" + value;
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | testStringCoercion | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function checkKeyStringCoercion(value) {
{
if (willCoercionThrow(value)) {
error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
return testStringCoercion(value);
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | checkKeyStringCoercion | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function getWrappedName(outerType, innerType, wrapperName) {
var displayName = outerType.displayName;
if (displayName) {
return displayName;
}
var functionName = innerType.displayName || innerType.name || "";
return functionName !== "... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | getWrappedName | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function getContextName(type) {
return type.displayName || "Context";
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | getContextName | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function getComponentNameFromType(type) {
if (type == null) {
return null;
}
{
if (typeof type.tag === "number") {
error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | getComponentNameFromType | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function hasValidRef(config) {
{
if (hasOwnProperty.call(config, "ref")) {
var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
if (getter && getter.isReactWarning) {
return false;
}
}
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | hasValidRef | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function hasValidKey(config) {
{
if (hasOwnProperty.call(config, "key")) {
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
if (getter && getter.isReactWarning) {
return false;
}
}
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | hasValidKey | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function defineKeyPropWarningGetter(props, displayName) {
var warnAboutAccessingKey = function() {
{
if (!specialPropKeyWarningShown) {
specialPropKeyWarningShown = true;
error("%s: `key` is not a prop. Trying to access it will resu... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | defineKeyPropWarningGetter | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
warnAboutAccessingKey = function() {
{
if (!specialPropKeyWarningShown) {
specialPropKeyWarningShown = true;
error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value withi... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | warnAboutAccessingKey | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function defineRefPropWarningGetter(props, displayName) {
var warnAboutAccessingRef = function() {
{
if (!specialPropRefWarningShown) {
specialPropRefWarningShown = true;
error("%s: `ref` is not a prop. Trying to access it will resu... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | defineRefPropWarningGetter | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
warnAboutAccessingRef = function() {
{
if (!specialPropRefWarningShown) {
specialPropRefWarningShown = true;
error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value withi... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | warnAboutAccessingRef | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function warnIfStringRefCannotBeAutoConverted(config) {
{
if (typeof config.ref === "string" && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
var componentName = getComponentNameFromType(ReactCurrentOwner.current.ty... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | warnIfStringRefCannotBeAutoConverted | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
ReactElement = function(type, key, ref, self, source, owner, props) {
var element = {
// This tag allows us to uniquely identify this as a React Element
$$typeof: REACT_ELEMENT_TYPE,
// Built-in properties that belong on the element
type,
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | ReactElement | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function createElement(type, config, children) {
var propName;
var props = {};
var key = null;
var ref = null;
var self = null;
var source = null;
if (config != null) {
if (hasValidRef(config)) {
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | createElement | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function cloneAndReplaceKey(oldElement, newKey) {
var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
return newElement;
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | cloneAndReplaceKey | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function cloneElement(element, config, children) {
if (element === null || element === void 0) {
throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + ".");
}
var propName;
var props = assign({... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | cloneElement | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function isValidElement(object) {
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | isValidElement | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function escape(key) {
var escapeRegex = /[=:]/g;
var escaperLookup = {
"=": "=0",
":": "=2"
};
var escapedString = key.replace(escapeRegex, function(match) {
return escaperLookup[match];
});
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | escape | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function escapeUserProvidedKey(text) {
return text.replace(userProvidedKeyEscapeRegex, "$&/");
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | escapeUserProvidedKey | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function getElementKey(element, index) {
if (typeof element === "object" && element !== null && element.key != null) {
{
checkKeyStringCoercion(element.key);
}
return escape("" + element.key);
}
return index.toSt... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | getElementKey | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
var type = typeof children;
if (type === "undefined" || type === "boolean") {
children = null;
}
var invokeCallback = false;
if (children === null) {
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | mapIntoArray | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function mapChildren(children, func, context) {
if (children == null) {
return children;
}
var result = [];
var count = 0;
mapIntoArray(children, result, "", "", function(child) {
return func.call(context, child, count... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | mapChildren | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function countChildren(children) {
var n = 0;
mapChildren(children, function() {
n++;
});
return n;
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | countChildren | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function forEachChildren(children, forEachFunc, forEachContext) {
mapChildren(children, function() {
forEachFunc.apply(this, arguments);
}, forEachContext);
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | forEachChildren | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function toArray(children) {
return mapChildren(children, function(child) {
return child;
}) || [];
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | toArray | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function onlyChild(children) {
if (!isValidElement(children)) {
throw new Error("React.Children.only expected to receive a single React element child.");
}
return children;
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | onlyChild | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function createContext(defaultValue) {
var context = {
$$typeof: REACT_CONTEXT_TYPE,
// As a workaround to support multiple concurrent renderers, we categorize
// some renderers as primary and others as secondary. We only expect
// there to b... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | createContext | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function lazyInitializer(payload) {
if (payload._status === Uninitialized) {
var ctor = payload._result;
var thenable = ctor();
thenable.then(function(moduleObject2) {
if (payload._status === Pending || payload._status === Uninitialized) {
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | lazyInitializer | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function lazy(ctor) {
var payload = {
// We use these fields to store the result.
_status: Uninitialized,
_result: ctor
};
var lazyType = {
$$typeof: REACT_LAZY_TYPE,
_payload: payload,
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | lazy | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function forwardRef(render) {
{
if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).");
} else if (typeof ren... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | forwardRef | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function isValidElementType(type) {
if (typeof type === "string" || typeof type === "function") {
return true;
}
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | isValidElementType | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function memo(type, compare) {
{
if (!isValidElementType(type)) {
error("memo: The first argument must be a component. Instead received: %s", type === null ? "null" : typeof type);
}
}
var elementType = {
$$typeo... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | memo | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function resolveDispatcher() {
var dispatcher = ReactCurrentDispatcher.current;
{
if (dispatcher === null) {
error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | resolveDispatcher | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function useContext(Context) {
var dispatcher = resolveDispatcher();
{
if (Context._context !== void 0) {
var realContext = Context._context;
if (realContext.Consumer === Context) {
error("Calling useContext(Context.Cons... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | useContext | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function useState(initialState) {
var dispatcher = resolveDispatcher();
return dispatcher.useState(initialState);
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | useState | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function useReducer(reducer, initialArg, init) {
var dispatcher = resolveDispatcher();
return dispatcher.useReducer(reducer, initialArg, init);
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | useReducer | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function useRef(initialValue) {
var dispatcher = resolveDispatcher();
return dispatcher.useRef(initialValue);
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | useRef | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function useEffect(create, deps) {
var dispatcher = resolveDispatcher();
return dispatcher.useEffect(create, deps);
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | useEffect | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function useInsertionEffect(create, deps) {
var dispatcher = resolveDispatcher();
return dispatcher.useInsertionEffect(create, deps);
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | useInsertionEffect | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function useLayoutEffect(create, deps) {
var dispatcher = resolveDispatcher();
return dispatcher.useLayoutEffect(create, deps);
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | useLayoutEffect | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function useCallback(callback, deps) {
var dispatcher = resolveDispatcher();
return dispatcher.useCallback(callback, deps);
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | useCallback | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function useMemo(create, deps) {
var dispatcher = resolveDispatcher();
return dispatcher.useMemo(create, deps);
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | useMemo | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function useImperativeHandle(ref, create, deps) {
var dispatcher = resolveDispatcher();
return dispatcher.useImperativeHandle(ref, create, deps);
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | useImperativeHandle | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function useDebugValue(value, formatterFn) {
{
var dispatcher = resolveDispatcher();
return dispatcher.useDebugValue(value, formatterFn);
}
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | useDebugValue | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function useTransition() {
var dispatcher = resolveDispatcher();
return dispatcher.useTransition();
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | useTransition | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function useDeferredValue(value) {
var dispatcher = resolveDispatcher();
return dispatcher.useDeferredValue(value);
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | useDeferredValue | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function useId() {
var dispatcher = resolveDispatcher();
return dispatcher.useId();
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | useId | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
var dispatcher = resolveDispatcher();
return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | useSyncExternalStore | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function disableLogs() {
{
if (disabledDepth === 0) {
prevLog = console.log;
prevInfo = console.info;
prevWarn = console.warn;
prevError = console.error;
prevGroup = console.group;
p... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | disableLogs | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function reenableLogs() {
{
disabledDepth--;
if (disabledDepth === 0) {
var props = {
configurable: true,
enumerable: true,
writable: true
};
Object.definePrope... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | reenableLogs | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function describeBuiltInComponentFrame(name, source, ownerFn) {
{
if (prefix === void 0) {
try {
throw Error();
} catch (x) {
var match = x.stack.trim().match(/\n( *(at )?)/);
prefix = match && ... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | describeBuiltInComponentFrame | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function describeNativeComponentFrame(fn, construct) {
if (!fn || reentry) {
return "";
}
{
var frame = componentFrameCache.get(fn);
if (frame !== void 0) {
return frame;
}
}
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | describeNativeComponentFrame | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
Fake = function() {
throw Error();
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | Fake | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function describeFunctionComponentFrame(fn, source, ownerFn) {
{
return describeNativeComponentFrame(fn, false);
}
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | describeFunctionComponentFrame | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function shouldConstruct(Component2) {
var prototype = Component2.prototype;
return !!(prototype && prototype.isReactComponent);
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | shouldConstruct | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
if (type == null) {
return "";
}
if (typeof type === "function") {
{
return describeNativeComponentFrame(type, shouldConstruct(type));
}
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | describeUnknownElementTypeFrameInDEV | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function setCurrentlyValidatingElement(element) {
{
if (element) {
var owner = element._owner;
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
ReactDebugCurrentFrame$1.setExtra... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | setCurrentlyValidatingElement | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function checkPropTypes(typeSpecs, values, location, componentName, element) {
{
var has = Function.call.bind(hasOwnProperty);
for (var typeSpecName in typeSpecs) {
if (has(typeSpecs, typeSpecName)) {
var error$1 = void 0;
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | checkPropTypes | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function setCurrentlyValidatingElement$1(element) {
{
if (element) {
var owner = element._owner;
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
setExtraStackFrame(stack);
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | setCurrentlyValidatingElement$1 | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function getDeclarationErrorAddendum() {
if (ReactCurrentOwner.current) {
var name = getComponentNameFromType(ReactCurrentOwner.current.type);
if (name) {
return "\n\nCheck the render method of `" + name + "`.";
}
}
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | getDeclarationErrorAddendum | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function getSourceInfoErrorAddendum(source) {
if (source !== void 0) {
var fileName = source.fileName.replace(/^.*[\\\/]/, "");
var lineNumber = source.lineNumber;
return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
}
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | getSourceInfoErrorAddendum | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function getSourceInfoErrorAddendumForProps(elementProps) {
if (elementProps !== null && elementProps !== void 0) {
return getSourceInfoErrorAddendum(elementProps.__source);
}
return "";
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | getSourceInfoErrorAddendumForProps | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function getCurrentComponentErrorInfo(parentType) {
var info = getDeclarationErrorAddendum();
if (!info) {
var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
if (parentName) {
info = "\n\... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | getCurrentComponentErrorInfo | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function validateExplicitKey(element, parentType) {
if (!element._store || element._store.validated || element.key != null) {
return;
}
element._store.validated = true;
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | validateExplicitKey | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function validateChildKeys(node, parentType) {
if (typeof node !== "object") {
return;
}
if (isArray(node)) {
for (var i = 0; i < node.length; i++) {
var child = node[i];
if (isValidElement(child)) {
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | validateChildKeys | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function validatePropTypes(element) {
{
var type = element.type;
if (type === null || type === void 0 || typeof type === "string") {
return;
}
var propTypes;
if (typeof type === "function") {
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | validatePropTypes | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function validateFragmentProps(fragment) {
{
var keys = Object.keys(fragment.props);
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
if (key !== "children" && key !== "key") {
setCurrentlyValidatingElement$1... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | validateFragmentProps | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function createElementWithValidation(type, props, children) {
var validType = isValidElementType(type);
if (!validType) {
var info = "";
if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) {
inf... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | createElementWithValidation | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function createFactoryWithValidation(type) {
var validatedFactory = createElementWithValidation.bind(null, type);
validatedFactory.type = type;
{
if (!didWarnAboutDeprecatedCreateFactory) {
didWarnAboutDeprecatedCreateFactory = true;
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | createFactoryWithValidation | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function cloneElementWithValidation(element, props, children) {
var newElement = cloneElement.apply(this, arguments);
for (var i = 2; i < arguments.length; i++) {
validateChildKeys(arguments[i], newElement.type);
}
validatePropTypes(newElement);
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | cloneElementWithValidation | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
function startTransition(scope, options) {
var prevTransition = ReactCurrentBatchConfig.transition;
ReactCurrentBatchConfig.transition = {};
var currentTransition = ReactCurrentBatchConfig.transition;
{
ReactCurrentBatchConfig.transition._updatedFi... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | startTransition | javascript | wasmerio/winterjs | benchmark/complex.js | https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js | MIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.