title: react createContext with class generictype build error
body: <p>I'm a junior frontend engineer and I trying to createContext name StoreContext, which has initial parameter 
  type is 'class'. here is my codes
   ( I set my project with npx create-next-app) </p>
  
  <pre><code>import React,{createContext} from 'react';
  import {TodoList} from './TodoList';
  
  export const StoreContext = createContext&lt;TodoList&gt;({} as TodoList);
  export const StoreProvider = StoreContext.Provider;
  </code></pre>
  
  <p>I use typescript and there is a compile fail in line 4 </p>
  
  <pre><code>export const StoreContext = createContext&lt;TodoList&gt;({} as TodoList);
  </code></pre>
  
  <blockquote>
    <p>unexpected token, expected ","  </p>
  </blockquote>
  
  <p>problem occurred at {} as Todolist </p>
  
  <p>I tried to fix it with install some babel modules, but didn't work. here is my package.json and .babelrc, babel.config.js</p>
  
  <p>package.json</p>
  
  <pre><code>{
    "name": "mobx-sample",
    "version": "0.1.0",
    "private": true,
    "scripts": {
      "dev": "next dev",
      "build": "next build",
      "start": "next start"
    },
    "dependencies": {
      "@babel/core": "^7.7.7",
      "@babel/plugin-proposal-decorators": "^7.7.4",
      "@babel/plugin-transform-react-jsx": "^7.7.7",
      "mobx": "^5.15.1",
      "mobx-react-lite": "^1.5.2",
      "next": "9.1.7",
      "react": "16.12.0",
      "react-dom": "16.12.0"
    },
    "devDependencies": {
      "@babel/node": "^7.7.7",
      "@babel/plugin-transform-destructuring": "^7.7.4",
      "@babel/preset-env": "^7.7.7",
      "@babel/preset-react": "^7.7.4",
      "@types/node": "^13.1.4",
      "@types/react": "^16.9.17",
      "typescript": "^3.7.4"
    }
  }
  </code></pre>
  
  <p>.babelrc</p>
  
  <pre><code>{
      "plugins": ["@babel/plugin-transform-destructuring"]
    }
  </code></pre>
  
  <p>babel.config.js</p>
  
  <pre><code>module.exports = {
      presets: ["@babel/preset-react","@babel/preset-env"],
      plugins: [
        ['@babel/plugin-proposal-decorators', { legacy: true }],
        ["@babel/plugin-transform-destructuring",{"useBuiltIns":true}]
    ],
    };
  </code></pre>
  
  <p>how do I fix compile error? 
  and what's the name of that syntax </p>
  
  <blockquote>
    <p>{} as TodoList</p>
  </blockquote>