d28672d97f
* Fix alias naming and structure bugs in js declarations * Add another test case and change condition for ns merge to require signature or export content * Fix typo in comment
103 lines
No EOL
2 KiB
TypeScript
103 lines
No EOL
2 KiB
TypeScript
// @allowJs: true
|
|
// @checkJs: true
|
|
// @target: es5
|
|
// @jsx: react
|
|
// @esModuleInterop: true
|
|
// @outDir: ./out
|
|
// @strict: true
|
|
// @noImplicitAny: false
|
|
// @declaration: true
|
|
// @filename: jsDeclarationsReactComponents1.jsx
|
|
/// <reference path="/.lib/react16.d.ts" />
|
|
import React from "react";
|
|
import PropTypes from "prop-types"
|
|
|
|
const TabbedShowLayout = ({
|
|
}) => {
|
|
return (
|
|
<div />
|
|
);
|
|
};
|
|
|
|
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 (
|
|
<div className="" key="">
|
|
ok
|
|
</div>
|
|
);
|
|
};
|
|
|
|
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 (
|
|
<div className="" key="">
|
|
ok
|
|
</div>
|
|
);
|
|
};
|
|
|
|
TabbedShowLayout.defaultProps = {
|
|
tabs: "default value"
|
|
};
|
|
|
|
export default TabbedShowLayout;
|
|
|
|
// @filename: jsDeclarationsReactComponents4.jsx
|
|
import React from "react";
|
|
const TabbedShowLayout = (/** @type {{className: string}}*/prop) => {
|
|
return (
|
|
<div className={prop.className} key="">
|
|
ok
|
|
</div>
|
|
);
|
|
};
|
|
|
|
TabbedShowLayout.defaultProps = {
|
|
tabs: "default value"
|
|
};
|
|
|
|
export default TabbedShowLayout;
|
|
// @filename: jsDeclarationsReactComponents5.jsx
|
|
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
|
|
function Tree({ allowDropOnRoot }) {
|
|
return <div />
|
|
}
|
|
|
|
Tree.propTypes = {
|
|
classes: PropTypes.object,
|
|
};
|
|
|
|
Tree.defaultProps = {
|
|
classes: {},
|
|
parentSource: 'parent_id',
|
|
};
|
|
|
|
export default Tree; |