How to use the skatejs.props.array function in skatejs

To help you get started, we’ve selected a few skatejs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github skatejs / skatejs / test / definitions / props-set-get.tsx View on Github external
static get props() {
    return {
      myArray: props.array,
      myBoolean: props.boolean
    }
  }
  myBoolean: boolean
github trusktr / vue-web-component / src / index.js View on Github external
if ( prop.type === null ) {
            result[ key ] = skatePropTypes.any
            warn()
            console.warn('vue-web-component: You did not specify a prop type for the attribute mentioned in the previous warning. Any values for this attribute will be passed as a string value to the Vue component.')
        }
        else if ( prop.type === Number )
            result[ key ] = Object.assign({}, skatePropTypes.number, {default:defaultVal})
        else if ( prop.type === String )
            result[ key ] = Object.assign({}, skatePropTypes.string, {default:defaultVal})
        else if ( prop.type === Boolean )
            result[ key ] = Object.assign({}, skatePropTypes.boolean, {default:defaultVal})
        else if ( prop.type === Object )
            result[ key ] = Object.assign({}, skatePropTypes.object, {default:defaultVal})
        else if ( prop.type === Array )
            result[ key ] = Object.assign({}, skatePropTypes.array, {default:defaultVal})
        else {
            result[ key ] = skatePropTypes.any
            warn()
            console.warn('vue-web-component: You specified a type in your Vue component that is currently is not supported by vue-web-component. Any values for the attribute mentioned in the previous warning will be passed as string value to the Vue component.')
        }

    }

    return result

}