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

便捷提问 "TS中常见的7种操作符 #1

Open
EthanShen10086 opened this issue Jul 27, 2022 · 0 comments
Open

便捷提问 "TS中常见的7种操作符 #1

EthanShen10086 opened this issue Jul 27, 2022 · 0 comments

Comments

@EthanShen10086
Copy link

大家好!

我发现了一个问题:

const fn = (name: string | null | undefined) => {
  const objName: string = name; // 报错
};
type cbGenerator = () => string;

const fn = (cb: cbGenerator | null | undefined) => {
  cb();
};

好像并没有地方用到了非空断言操作符 (!)

另外 博客的这个转到GitHub issue还带复制的功能怎么做的啊 很漂亮.

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

1 participant