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

typescript例子中 类型不对编译也通过 #46

Open
Nicklzy opened this issue Jun 19, 2019 · 1 comment
Open

typescript例子中 类型不对编译也通过 #46

Nicklzy opened this issue Jun 19, 2019 · 1 comment

Comments

@Nicklzy
Copy link

Nicklzy commented Jun 19, 2019

const page: FC<PageProps> = function(props) {
  const handleAdd = () => {
    props.dispatch(add());
  };

  const handleMinus = () => {
    props.dispatch(minus());
  };

  console.log(props.xxx)  // 这里props里面并没有xxx属性,ts编译却通过了
  return (
    <Fragment>

    </Fragment>
  );
};

请问这里是ts哪里没有配置好吗?
预期是希望类型不对,能够编译不通过

@ji123mmy
Copy link

the same question

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants