From 5f972c8bbe7ec0a9a3b963ab0d0984efec905350 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=83=E8=89=AF?= Date: Tue, 11 May 2021 15:16:19 +0800 Subject: [PATCH] fix(classes): replace [[FunctionKind]] with [[IsClassConstructor]] --- 1-js/09-classes/01-class/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/09-classes/01-class/article.md b/1-js/09-classes/01-class/article.md index 8d4731e1..d19b9ca9 100644 --- a/1-js/09-classes/01-class/article.md +++ b/1-js/09-classes/01-class/article.md @@ -144,7 +144,7 @@ The result of this definition is about the same. So, there are indeed reasons wh Still, there are important differences. -1. First, a function created by `class` is labelled by a special internal property `[[FunctionKind]]:"classConstructor"`. So it's not entirely the same as creating it manually. +1. First, a function created by `class` is labelled by a special internal property `[[IsClassConstructor]]: true`. So it's not entirely the same as creating it manually. The language checks for that property in a variety of places. For example, unlike a regular function, it must be called with `new`: