actions.ts — svelte Source File
Architecture documentation for actions.ts, a typescript file in the svelte codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR c7d7d650_9ce5_9889_19ef_b2856517b577["actions.ts"] d9dc2270_b77f_5aeb_c76b_7e9e4c287961["action"] c7d7d650_9ce5_9889_19ef_b2856517b577 --> d9dc2270_b77f_5aeb_c76b_7e9e4c287961 style c7d7d650_9ce5_9889_19ef_b2856517b577 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import type { Action, ActionReturn } from 'svelte/action';
// ---------------- Action
const href: Action<HTMLAnchorElement> = (node) => {
node.href = '';
// @ts-expect-error
node.href = 1;
};
href;
const required: Action<HTMLElement, boolean> = (_node, _param) => {};
required(null as any, true);
// @ts-expect-error (only in strict mode) boolean missing
required(null as any);
// @ts-expect-error no boolean
required(null as any, 'string');
const required1: Action<HTMLElement, boolean> = (_node, _param) => {
return {
update: (p) => p === true,
destroy: () => {}
};
};
required1;
const required2: Action<HTMLElement, boolean> = (_node) => {};
required2;
const required3: Action<HTMLElement, boolean> = (_node, _param) => {
return {
// @ts-expect-error comparison always resolves to false
update: (p) => p === 'd',
destroy: () => {}
};
};
required3;
const optional: Action<HTMLElement, boolean | undefined> = (_node, _param?) => {};
optional(null as any, true);
optional(null as any);
// @ts-expect-error no boolean
optional(null as any, 'string');
const optional1: Action<HTMLElement, boolean | undefined> = (_node, _param?) => {
return {
update: (p) => p === true,
destroy: () => {}
};
};
optional1;
const optional2: Action<HTMLElement, boolean | undefined> = (_node) => {};
optional2;
const optional3: Action<HTMLElement, boolean | undefined> = (_node, _param) => {};
optional3;
const optional4: Action<HTMLElement, boolean | undefined> = (_node, _param?) => {
return {
// ... (75 more lines)
Domain
Subdomains
Functions
Types
Dependencies
- action
Source
Frequently Asked Questions
What does actions.ts do?
actions.ts is a source file in the svelte codebase, written in typescript. It belongs to the BuildSystem domain, MessageProcessor subdomain.
What functions are defined in actions.ts?
actions.ts defines 19 function(s): generic_action, href, invalidProperty.invalid, no, no1, no2, no3, no4, optional, optional1, and 9 more.
What does actions.ts depend on?
actions.ts imports 1 module(s): action.
Where is actions.ts in the architecture?
actions.ts is located at packages/svelte/tests/types/actions.ts (domain: BuildSystem, subdomain: MessageProcessor, directory: packages/svelte/tests/types).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free