TypeScript icon indicating copy to clipboard operation
TypeScript copied to clipboard

compile target es6 static properties outside body class

Open isman-usoh opened this issue 10 years ago • 1 comments

tsconfig

  • target: es6
  • modules: es6

typescript

class App extends Component {
    static defaultProps = { initialCount: 0 };
    render() {
        return (
            <div>
                <h1>Count: {App.defaultProps.initialCount}</h1>
            </div>
        );
    }
}

js/es6

class App extends Component {
    render() {
        return (
            <div>
                <h1>Count: {App.defaultProps.initialCount}</h1>
            </div>
        );
    }
}
App.defaultProps = { initialCount: 0 };

isman-usoh avatar Apr 06 '16 21:04 isman-usoh

Can you talk about why this is unexpected, or what you'd like to have happen instead?

RyanCavanaugh avatar Apr 06 '16 21:04 RyanCavanaugh