Home / File/ PropertyDefinition.js — svelte Source File

PropertyDefinition.js — svelte Source File

Architecture documentation for PropertyDefinition.js, a javascript file in the svelte codebase. 4 imports, 1 dependents.

File javascript Compiler Transformer 4 imports 1 dependents 1 functions

Entity Profile

Dependency Diagram

graph LR
  2e7493dd_ba08_9071_5988_c50f0fd536d9["PropertyDefinition.js"]
  495501a4_a342_6a4d_ac11_e3e2fee8b218["errors.js"]
  2e7493dd_ba08_9071_5988_c50f0fd536d9 --> 495501a4_a342_6a4d_ac11_e3e2fee8b218
  a146f6ac_0088_8736_b6ce_318f9f115170["e"]
  2e7493dd_ba08_9071_5988_c50f0fd536d9 --> a146f6ac_0088_8736_b6ce_318f9f115170
  bbca3d2a_42c8_b215_d3b5_5077ccaf0797["nodes.js"]
  2e7493dd_ba08_9071_5988_c50f0fd536d9 --> bbca3d2a_42c8_b215_d3b5_5077ccaf0797
  d69a156c_617a_9397_4c8b_e94508c59e30["get_name"]
  2e7493dd_ba08_9071_5988_c50f0fd536d9 --> d69a156c_617a_9397_4c8b_e94508c59e30
  4aa8a188_84d4_0274_ed83_cac0ab1d3572["index.js"]
  4aa8a188_84d4_0274_ed83_cac0ab1d3572 --> 2e7493dd_ba08_9071_5988_c50f0fd536d9
  style 2e7493dd_ba08_9071_5988_c50f0fd536d9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

/** @import { PropertyDefinition } from 'estree' */
/** @import { Context } from '../types' */
import * as e from '../../../errors.js';
import { get_name } from '../../nodes.js';

/**
 * @param {PropertyDefinition} node
 * @param {Context} context
 */
export function PropertyDefinition(node, context) {
	const name = get_name(node.key);
	const field = name && context.state.state_fields.get(name);

	if (field && node !== field.node && node.value) {
		if (/** @type {number} */ (node.start) < /** @type {number} */ (field.node.start)) {
			e.state_field_invalid_assignment(node);
		}
	}

	context.next();
}

Domain

Subdomains

Frequently Asked Questions

What does PropertyDefinition.js do?
PropertyDefinition.js is a source file in the svelte codebase, written in javascript. It belongs to the Compiler domain, Transformer subdomain.
What functions are defined in PropertyDefinition.js?
PropertyDefinition.js defines 1 function(s): PropertyDefinition.
What does PropertyDefinition.js depend on?
PropertyDefinition.js imports 4 module(s): e, errors.js, get_name, nodes.js.
What files import PropertyDefinition.js?
PropertyDefinition.js is imported by 1 file(s): index.js.
Where is PropertyDefinition.js in the architecture?
PropertyDefinition.js is located at packages/svelte/src/compiler/phases/2-analyze/visitors/PropertyDefinition.js (domain: Compiler, subdomain: Transformer, directory: packages/svelte/src/compiler/phases/2-analyze/visitors).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free