MCPcopy Create free account
hub / github.com/microsoft/SandDance / createProps

Function createProps

docs/app/js/sanddance-app.js:87986–87999  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

87984}
87985var COMPONENT = (0, _constants.PROP_SYMBOLS).COMPONENT, ASYNC_ORIGINAL = (0, _constants.PROP_SYMBOLS).ASYNC_ORIGINAL, ASYNC_RESOLVED = (0, _constants.PROP_SYMBOLS).ASYNC_RESOLVED, ASYNC_DEFAULTS = (0, _constants.PROP_SYMBOLS).ASYNC_DEFAULTS;
87986function createProps() {
87987 var component = this;
87988 var propsPrototype = getPropsPrototype(component.constructor);
87989 var propsInstance = Object.create(propsPrototype);
87990 propsInstance[COMPONENT] = component;
87991 propsInstance[ASYNC_ORIGINAL] = {};
87992 propsInstance[ASYNC_RESOLVED] = {};
87993 for(var i = 0; i < arguments.length; ++i){
87994 var props = arguments[i];
87995 for(var key in props)propsInstance[key] = props[key];
87996 }
87997 Object.freeze(propsInstance);
87998 return propsInstance;
87999}
88000function getPropsPrototype(componentClass) {
88001 var defaultProps = getOwnProperty(componentClass, "_mergedDefaultProps");
88002 if (!defaultProps) {

Callers

nothing calls this directly

Calls 1

getPropsPrototypeFunction · 0.70

Tested by

no test coverage detected