For example I have a class and an interface for props:
interface PropsInterface {
propertyName: dataType
}
class Example {
constructor(props: PropsInterface) {
this.exampleProps = props
}
exampleProps: PropsInterface
}
Is it possible to avoid writing a constructor ?
For example something similar to React class components with props, where we can simply write so:
class Example extends React.Component<PropsInterface, any> {
exampleProps = this.props.propertyName
}
Thank You!