compile-warnings.js — svelte Source File
Architecture documentation for compile-warnings.js, a javascript file in the svelte codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 38aef96e_418f_689e_0190_6881c1213b6e["compile-warnings.js"] 126b3b5f_1512_d954_d5a0_32eb981c7aac["./state.js"] 38aef96e_418f_689e_0190_6881c1213b6e --> 126b3b5f_1512_d954_d5a0_32eb981c7aac 0d9214ee_ca0d_3c8d_6cc4_cfb71f9e09a6["./utils/compile_diagnostic.js"] 38aef96e_418f_689e_0190_6881c1213b6e --> 0d9214ee_ca0d_3c8d_6cc4_cfb71f9e09a6 style 38aef96e_418f_689e_0190_6881c1213b6e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { warnings, ignore_stack, ignore_map, warning_filter } from './state.js';
import { CompileDiagnostic } from './utils/compile_diagnostic.js';
/** @typedef {{ start?: number, end?: number }} NodeLike */
class InternalCompileWarning extends CompileDiagnostic {
name = 'CompileWarning';
/**
* @param {string} code
* @param {string} message
* @param {[number, number] | undefined} position
*/
constructor(code, message, position) {
super(code, message, position);
}
}
/**
* @param {null | NodeLike} node
* @param {string} code
* @param {string} message
*/
function w(node, code, message) {
let stack = ignore_stack;
if (node) {
stack = ignore_map.get(node) ?? ignore_stack;
}
if (stack && stack.at(-1)?.has(code)) return;
const warning = new InternalCompileWarning(
code,
message,
node && node.start !== undefined ? [node.start, node.end ?? node.start] : undefined
);
if (!warning_filter(warning)) return;
warnings.push(warning);
}
export const codes = CODES;
/**
* MESSAGE
* @param {null | NodeLike} node
* @param {string} PARAMETER
*/
export function CODE(node, PARAMETER) {
w(node, 'CODE', `${MESSAGE}\nhttps://svelte.dev/e/${'CODE'}`);
}
Domain
Subdomains
Classes
Dependencies
- ./state.js
- ./utils/compile_diagnostic.js
Source
Frequently Asked Questions
What does compile-warnings.js do?
compile-warnings.js is a source file in the svelte codebase, written in javascript. It belongs to the BuildSystem domain, QualityControl subdomain.
What functions are defined in compile-warnings.js?
compile-warnings.js defines 2 function(s): CODE, w.
What does compile-warnings.js depend on?
compile-warnings.js imports 2 module(s): ./state.js, ./utils/compile_diagnostic.js.
Where is compile-warnings.js in the architecture?
compile-warnings.js is located at packages/svelte/scripts/process-messages/templates/compile-warnings.js (domain: BuildSystem, subdomain: QualityControl, directory: packages/svelte/scripts/process-messages/templates).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free