Home / Function/ paramsTypePlugin() — astro Function Reference

paramsTypePlugin() — astro Function Reference

Architecture documentation for the paramsTypePlugin() function in astro-get-static-paths.test.js from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  88ee5e28_21c0_cb13_cf79_54adc8c7f597["paramsTypePlugin()"]
  96aac543_b8cb_46ab_6862_2327c22c3dce["astro-get-static-paths.test.js"]
  88ee5e28_21c0_cb13_cf79_54adc8c7f597 -->|defined in| 96aac543_b8cb_46ab_6862_2327c22c3dce
  style 88ee5e28_21c0_cb13_cf79_54adc8c7f597 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/test/astro-get-static-paths.test.js lines 9–27

const paramsTypePlugin = (type = 'string') => ({
	name: 'vite-plugin-param-type',
	resolveId: {
		filter: {
			id: /^virtual:my:param:type$/,
		},
		handler() {
			return '\0virtual:my:param:type';
		},
	},
	load: {
		filter: {
			id: /^\0virtual:my:param:type$/,
		},
		handler() {
			return `export const paramType = ${JSON.stringify(type)}`;
		},
	},
});

Subdomains

Frequently Asked Questions

What does paramsTypePlugin() do?
paramsTypePlugin() is a function in the astro codebase, defined in packages/astro/test/astro-get-static-paths.test.js.
Where is paramsTypePlugin() defined?
paramsTypePlugin() is defined in packages/astro/test/astro-get-static-paths.test.js at line 9.

Analyze Your Own Codebase

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

Try Supermodel Free