MCPcopy
hub / github.com/sveltejs/svelte / w

Function w

packages/svelte/src/compiler/warnings.js:25–39  ·  view source on GitHub ↗

* @param {null | NodeLike} node * @param {string} code * @param {string} message

(node, code, message)

Source from the content-addressed store, hash-verified

23 * @param {string} message
24 */
25function w(node, code, message) {
26 let stack = ignore_stack;
27
28 if (node) {
29 stack = ignore_map.get(node) ?? ignore_stack;
30 }
31
32 if (stack && stack.at(-1)?.has(code)) return;
33
34 const warning = new InternalCompileWarning(code, message, node && node.start !== undefined ? [node.start, node.end ?? node.start] : undefined);
35
36 if (!warning_filter(warning)) return;
37
38 warnings.push(warning);
39}
40
41export const codes = [
42 'a11y_accesskey',

Callers 15

a11y_accesskeyFunction · 0.70
a11y_aria_attributesFunction · 0.70
a11y_autocomplete_validFunction · 0.70
a11y_autofocusFunction · 0.70
a11y_figcaption_indexFunction · 0.70
a11y_figcaption_parentFunction · 0.70
a11y_hiddenFunction · 0.70
a11y_img_redundant_altFunction · 0.70

Calls 3

pushMethod · 0.80
getMethod · 0.45
hasMethod · 0.45

Tested by

no test coverage detected