From 396a0e3c7c82e5d2680d07250008094f336856db Mon Sep 17 00:00:00 2001 From: Milos Djermanovic Date: Wed, 25 Aug 2021 02:29:45 +0200 Subject: [PATCH] Docs: update ScopeManager with class fields (#14974) --- docs/developer-guide/scope-manager-interface.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/developer-guide/scope-manager-interface.md b/docs/developer-guide/scope-manager-interface.md index 3ee5b23d3cb..10ea7446ef4 100644 --- a/docs/developer-guide/scope-manager-interface.md +++ b/docs/developer-guide/scope-manager-interface.md @@ -77,7 +77,7 @@ Those members are defined but not used in ESLint. #### type * **Type:** `string` -* **Description:** The type of this scope. This is one of `"block"`, `"catch"`, `"class"`, `"for"`, `"function"`, `"function-expression-name"`, `"global"`, `"module"`, `"switch"`, `"with"` +* **Description:** The type of this scope. This is one of `"block"`, `"catch"`, `"class"`, `"class-field-initializer"`, `"for"`, `"function"`, `"function-expression-name"`, `"global"`, `"module"`, `"switch"`, `"with"`. #### isStrict @@ -97,7 +97,9 @@ Those members are defined but not used in ESLint. #### variableScope * **Type:** `Scope` -* **Description:** The scope which hosts variables which are defined by `var` declarations. +* **Description:** The nearest ancestor whose `type` is one of `"class-field-initializer"`, `"function"`, `"module"`, or `"program"` . For the aforementioned scopes this is a self-reference. + +> This represents the lowest enclosing function or top-level scope. Class field initializers are implicit functions. Historically, this was the scope which hosts variables that are defined by `var` declarations, and thus the name `variableScope`. #### block