From 52ccdf1f0a1cee3f0659ac78e81c79dae152399b Mon Sep 17 00:00:00 2001 From: MDN Date: Wed, 23 Jun 2021 00:34:06 +0000 Subject: [CRON] sync translated content --- .../global_objects/map/@@species/index.html | 64 ---------------------- 1 file changed, 64 deletions(-) delete mode 100644 files/ja/web/javascript/reference/global_objects/map/@@species/index.html (limited to 'files/ja/web/javascript/reference/global_objects/map/@@species') diff --git a/files/ja/web/javascript/reference/global_objects/map/@@species/index.html b/files/ja/web/javascript/reference/global_objects/map/@@species/index.html deleted file mode 100644 index 4a428acdad..0000000000 --- a/files/ja/web/javascript/reference/global_objects/map/@@species/index.html +++ /dev/null @@ -1,64 +0,0 @@ ---- -title: 'get Map[@@species]' -slug: Web/JavaScript/Reference/Global_Objects/Map/@@species -tags: - - ECMAScript 2015 - - JavaScript - - Map - - Property -translation_of: Web/JavaScript/Reference/Global_Objects/Map/@@species ---- -
{{JSRef}}
- -

Map[@@species] アクセサープロパティは、 Map コンストラクターを返します。

- -

解説

- -

species アクセサープロパティは Map オブジェクトのデフォルトコンストラクターを返します。サブクラスのコンストラクターは、コンストラクターに代入して変更することによりオーバーライドすることができます。

- -

- -

通常のオブジェクトの species

- -

species プロパティはデフォルトコンストラクター関数を返しますので、 Map オブジェクトには Map コンストラクターを返します。

- -
Map[Symbol.species]; // function Map()
- -

派生オブジェクトの species

- -

派生したコレクションオブジェクトの中では (例えばカスタムマップである MyMap)、 MyMap の species は MyMap コンストラクターになっています。しかし、これをオーバーライドして、派生クラスのメソッド内で親の Map オブジェクトを返したい場合があります。

- -
class MyMap extends Map {
-  // Overwrite MyMap species to the parent Map constructor
-  static get [Symbol.species]() { return Map; }
-}
- -

仕様書

- - - - - - - - - - - - -
仕様書
{{SpecName('ESDraft', '#sec-get-map-@@species', 'get Map [ @@species ]')}}
- -

ブラウザーの互換性

- -
- - -

{{Compat("javascript.builtins.Map.@@species")}}

-
- -

関連情報

- - -- cgit v1.2.3-54-g00ecf