TS1128: Declaration or statement expected (end of file) : <p>folks.    Working on a TypeScript/React project (just getting used to it, haven't written React in a year, etc.), and having an issue.</p>

<p>When I wrote this component, I followed some docs that I found, but I'm getting a TS1128 (Declaration or statement expected) error at the end of this file, and I can't figure out why:</p>

<pre><code>import * as React from 'react';
import Count from './CountDisplay';

interface State {
    count: number;
}

class Counter extends React.Component&lt;{}, State&gt; {

    state: State = {count: 0};

    increment() {
        this.setState({
            count: (this.state.count + 1)
        });
    }

    decrement() {
        this.setState({
            count: (this.state.count - 1)
        });
    }

    render(): JSX.Element {
        return (
            &lt;div&gt;
                &lt;Count count={this.state.count}/&gt;
                &lt;button onClick={this.increment}&gt;Increment&lt;/button&gt;
                &lt;button onClick={this.decrement}&gt;Decrement&lt;/button&gt;
            &lt;/div&gt;
        );
    }
}

export default Counter;
</code></pre>

<p>Dunno why I keep getting an error, because the code looks fine (or so I thought), but I could be wrong.</p>

<p>Below is my TSConfig.json, because I figured maybe it's relevant to the issue:</p>

<pre><code>{
  "compilerOptions": {
    "outDir": "./dist",
    "sourceMap": true,
    "noImplicitAny": true,
    "module": "commonjs",
    "target": "es6",
    "jsx": "react"
  }
}
</code></pre>

<p>Any help would be great appreciated, I've been beating my head against this for a short while now, sorta stuck.</p>
