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

这个网页似乎不能使用"联系"这个功能了 #1

Closed
Archsx opened this issue Oct 14, 2020 · 1 comment
Closed

这个网页似乎不能使用"联系"这个功能了 #1

Archsx opened this issue Oct 14, 2020 · 1 comment

Comments

@Archsx
Copy link

Archsx commented Oct 14, 2020

报错:"找不到 forms.brace.io 的服务器 IP 地址"

另附我本来像说的话:

你好,我在看博主在2018年12月25日写的"Typescript中的高级类型"一文的时候,觉得里面关于交集(intersection)某个部分有点容易误导人。文中写到:“例如,集合 a = [string, number, boolean] 与集合 b = [string, boolean, Function] 的交集是集合 [string, boolean], 交集中的每个元素既是集合 a 的成员,也是集合 b 的成员”。这段很像是高中数学集合的概念。但是如果在TS中,感觉交集的概念更像是[string, number, boolean, Function],博主在下面的注释部分写道:“// IAppleBanana 具有全部的三种属性 name, color, length,因此它既可以认为是 IApple,也可以认为是 IBanana, 是 IApple 与 IBanana 的交集”

@aprilandjan
Copy link
Owner

@Archsx 感谢关注!

在设置该 jekyll 模版时并没有配置好“联系”功能,所以可能这个功能实际上一直不可用,抱歉。

关于 TS 里的 Intersection 的理解,您说的也有道理,之前也和其他人讨论过这一点。可能是文中使用的中文不够精准,容易产生(与数学概念中的专有名词相冲突)的歧义,还是应该把 TS 里的 intersection 称为 “交叉类型” (而不是集合)、union 称为联合类型,这样可能会分的更清楚一些。

另外,

IAppleBanana 具有全部的三种属性 name, color, length,因此它既可以认为是 IApple,也可以认为是 IBanana, 是 IApple 与 IBanana 的交集”

从数学集合的角度来讲,“满足 IAppleBanana 的约束的类型”是一定满足 IApple 约束 以及 IBanana 约束的,那它的确是“所有满足 IApple 约束的类型” 与 “所有满足IBanana 约束的类型” 的交集。

@Archsx Archsx closed this as completed Oct 16, 2020
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