import { ErrorTypes } from './errorHandling'
import { initializeComponentInstance } from './componentUtils'
import { EventEmitter, invokeListeners } from './optional/eventEmitter'
+import { warn } from './warning'
// public component instance type
export interface Component<P = {}, D = {}> extends PublicInstanceMethods {
}
}
+ // necessary to tell this apart from a functional
+ render(...args: any[]): any {
+ if (__DEV__) {
+ const name =
+ (this.$options && this.$options.displayName) || this.constructor.name
+ warn(`Class component \`${name}\` is missing render() method.`)
+ }
+ }
+
// to be set by renderer during mount
$forceUpdate: () => void = NOOP
// TODO warn non-present property
}
const value = Reflect.get(target, key, receiver)
- if (isFunction(value)) {
+ if (key !== 'constructor' && isFunction(value)) {
// auto bind
return getBoundMethod(value, target, receiver)
} else {