// @allowJs: true // @checkJs: true // @target: es5 // @jsx: react // @esModuleInterop: true // @outDir: ./out // @strict: true // @noImplicitAny: false // @declaration: true // @filename: jsDeclarationsReactComponents1.jsx /// import React from "react"; import PropTypes from "prop-types" const TabbedShowLayout = ({ }) => { return (
); }; TabbedShowLayout.propTypes = { version: PropTypes.number, }; TabbedShowLayout.defaultProps = { tabs: undefined }; export default TabbedShowLayout; // @filename: jsDeclarationsReactComponents2.jsx import React from "react"; /** * @type {React.SFC} */ const TabbedShowLayout = () => { return (
ok
); }; TabbedShowLayout.defaultProps = { tabs: "default value" }; export default TabbedShowLayout; // @filename: jsDeclarationsReactComponents3.jsx import React from "react"; /** * @type {{defaultProps: {tabs: string}} & ((props?: {elem: string}) => JSX.Element)} */ const TabbedShowLayout = () => { return (
ok
); }; TabbedShowLayout.defaultProps = { tabs: "default value" }; export default TabbedShowLayout; // @filename: jsDeclarationsReactComponents4.jsx import React from "react"; const TabbedShowLayout = (/** @type {{className: string}}*/prop) => { return (
ok
); }; TabbedShowLayout.defaultProps = { tabs: "default value" }; export default TabbedShowLayout; // @filename: jsDeclarationsReactComponents5.jsx import React from 'react'; import PropTypes from 'prop-types'; function Tree({ allowDropOnRoot }) { return
} Tree.propTypes = { classes: PropTypes.object, }; Tree.defaultProps = { classes: {}, parentSource: 'parent_id', }; export default Tree;