我想创建一个使用React-Redux的打字稿React应用,但是安装 SELECT CUST_ID, EXTRACT(YEAR FROM TIME_ID) AS "YEAR", EXTRACT(MONTH FROM TIME_ID) AS "MONTH", AMOUNT_SOLD AS SPENT
FROM SH.SALES
的类型会删除 SELECT CUST_ID, EXTRACT(YEAR FROM TIME_ID) AS "YEAR", EXTRACT(MONTH FROM TIME_ID) AS "MONTH", SUM(AMOUNT_SOLD) AS SPENT
FROM SH.SALES
GROUP BY CUST_ID, EXTRACT(YEAR FROM TIME_ID), EXTRACT(MONTH FROM TIME_ID)
HAVING SUM(AMOUNT_SOLD) > 150
的类型。
问题:
为什么会发生这种情况,并且可以在无需重新安装react-redux
的类型的情况下阻止它 ?
复制步骤:
创建一个React打字稿应用程序(以下命令来自the official docs):
react
以上命令为我们创建了react
:
npx create-react-app hello-world --template typescript
现在,让我们添加React-Redux:
@types/react
以上命令删除了hello-world
|- node_modules
|- @types
|- react
的几乎所有内容,包括cd hello-world
npm install react-redux @types/react-redux
:
@types