WordPress at a glance
function is not described

Automattic\WooCommerce\Blocks\BlockTypes

Cart::enqueue_data() protected WC 1.0

Extra data passed through from server to client for block.

{} It's a method of the class: Cart{}

Hooks from the method
Return

null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->enqueue_data( $attributes );
$attributes(array)
Any attributes that currently are available from the block. Note, this will be empty in the editor context when the block is not in the post content on editor load.

Code of Cart::enqueue_data() WC 5.3.0

<?php
protected function enqueue_data( array $attributes = [] ) {
	parent::enqueue_data( $attributes );

	if ( ! $this->asset_data_registry->exists( 'shippingCountries' ) ) {
		$this->asset_data_registry->add( 'shippingCountries', $this->deep_sort_with_accents( WC()->countries->get_shipping_countries() ) );
	}

	if ( ! $this->asset_data_registry->exists( 'shippingStates' ) ) {
		$this->asset_data_registry->add( 'shippingStates', $this->deep_sort_with_accents( WC()->countries->get_shipping_country_states() ) );
	}

	if ( ! $this->asset_data_registry->exists( 'countryLocale' ) ) {
		// Merge country and state data to work around https://github.com/woocommerce/woocommerce/issues/28944.
		$country_locale = wc()->countries->get_country_locale();
		$states         = wc()->countries->get_states();

		foreach ( $states as $country => $states ) {
			if ( empty( $states ) ) {
				$country_locale[ $country ]['state']['required'] = false;
				$country_locale[ $country ]['state']['hidden']   = true;
			}
		}
		$this->asset_data_registry->add( 'countryLocale', $country_locale );
	}

	$permalink = ! empty( $attributes['checkoutPageId'] ) ? get_permalink( $attributes['checkoutPageId'] ) : false;

	if ( $permalink && ! $this->asset_data_registry->exists( 'page-' . $attributes['checkoutPageId'] ) ) {
		$this->asset_data_registry->add( 'page-' . $attributes['checkoutPageId'], $permalink );
	}

	// Hydrate the following data depending on admin or frontend context.
	if ( ! is_admin() && ! WC()->is_rest_api_request() ) {
		$this->hydrate_from_api();
	}

	do_action( 'woocommerce_blocks_cart_enqueue_data' );
}