2017-05-16 00:46:50 +02:00
|
|
|
// @filename: file.tsx
|
|
|
|
// @jsx: preserve
|
|
|
|
// @noLib: true
|
2017-10-04 23:43:35 +02:00
|
|
|
// @skipLibCheck: true
|
2017-05-16 00:46:50 +02:00
|
|
|
// @libFiles: react.d.ts,lib.d.ts
|
|
|
|
|
|
|
|
import React = require('react');
|
|
|
|
|
2017-05-24 21:48:13 +02:00
|
|
|
export function makeP<P>(Ctor: React.ComponentClass<P>) {
|
2017-05-16 00:46:50 +02:00
|
|
|
return class extends React.PureComponent<P, void> {
|
|
|
|
public render(): JSX.Element {
|
|
|
|
return (
|
|
|
|
<Ctor {...this.props } />
|
|
|
|
);
|
|
|
|
}
|
|
|
|
};
|
2017-05-24 21:48:13 +02:00
|
|
|
}
|
|
|
|
|