You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
424 B
16 lines
424 B
import * as PropTypes from "prop-types"; |
|
import * as React from "react"; |
|
|
|
export class Provider<T extends {}> extends React.Component<T> { |
|
static childContextTypes = { |
|
injected: any, |
|
}; |
|
} |
|
|
|
export function inject<P, T extends React.ComponentType<P>>(...names: string[]): (base: T) => React.ComponentClass<T> { |
|
return (Component) => { |
|
return class extends React.Component<T> { |
|
|
|
}; |
|
}; |
|
}
|
|
|