Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

编译类型无法抛出错误 #349

Open
maoxiaoke opened this issue May 12, 2022 · 0 comments
Open

编译类型无法抛出错误 #349

maoxiaoke opened this issue May 12, 2022 · 0 comments
Labels
bug Something isn't working pkg v2

Comments

@maoxiaoke
Copy link
Collaborator

以下面代码为例:

import { useState } from 'react';

const App = () => {
  const [count, setCount] = useState(0);

  const addCount = () => {
    setCount((c: number) => c + '1');
  };

  return (
    <div>
      <button onClick={addCount}>Add Count</button>
      <p>{count}</p>
    </div>
  );
};

export default App;

类型编译成功,没有抛出错误

@maoxiaoke maoxiaoke added bug Something isn't working pkg v2 labels May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pkg v2
Projects
None yet
Development

No branches or pull requests

1 participant