Skip to content

Commit ff806c2

Browse files
committed
regenerate
1 parent 943dc0b commit ff806c2

File tree

2 files changed

+25
-11
lines changed

2 files changed

+25
-11
lines changed

packages/svelte/src/compiler/warnings.js

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
/* This file is generated by scripts/process-messages/index.js. Do not edit! */
22

3-
import {
4-
warnings,
5-
ignore_stack,
6-
ignore_map,
7-
warning_filter
8-
} from './state.js';
9-
3+
import { warnings, ignore_stack, ignore_map, warning_filter } from './state.js';
104
import { CompileDiagnostic } from './utils/compile_diagnostic.js';
115

126
/** @typedef {{ start?: number, end?: number }} NodeLike */
@@ -40,6 +34,7 @@ function w(node, code, message) {
4034
const warning = new InternalCompileWarning(code, message, node && node.start !== undefined ? [node.start, node.end ?? node.start] : undefined);
4135

4236
if (!warning_filter(warning)) return;
37+
4338
warnings.push(warning);
4439
}
4540

@@ -496,7 +491,9 @@ export function a11y_role_supports_aria_props_implicit(node, attribute, role, na
496491
* @param {string | undefined | null} [suggestion]
497492
*/
498493
export function a11y_unknown_aria_attribute(node, attribute, suggestion) {
499-
w(node, 'a11y_unknown_aria_attribute', `${suggestion ? `Unknown aria attribute 'aria-${attribute}'. Did you mean '${suggestion}'?` : `Unknown aria attribute 'aria-${attribute}'`}\nhttps://svelte.dev/e/a11y_unknown_aria_attribute`);
494+
w(node, 'a11y_unknown_aria_attribute', `${suggestion
495+
? `Unknown aria attribute 'aria-${attribute}'. Did you mean '${suggestion}'?`
496+
: `Unknown aria attribute 'aria-${attribute}'`}\nhttps://svelte.dev/e/a11y_unknown_aria_attribute`);
500497
}
501498

502499
/**
@@ -506,7 +503,9 @@ export function a11y_unknown_aria_attribute(node, attribute, suggestion) {
506503
* @param {string | undefined | null} [suggestion]
507504
*/
508505
export function a11y_unknown_role(node, role, suggestion) {
509-
w(node, 'a11y_unknown_role', `${suggestion ? `Unknown role '${role}'. Did you mean '${suggestion}'?` : `Unknown role '${role}'`}\nhttps://svelte.dev/e/a11y_unknown_role`);
506+
w(node, 'a11y_unknown_role', `${suggestion
507+
? `Unknown role '${role}'. Did you mean '${suggestion}'?`
508+
: `Unknown role '${role}'`}\nhttps://svelte.dev/e/a11y_unknown_role`);
510509
}
511510

512511
/**
@@ -534,7 +533,9 @@ export function legacy_code(node, code, suggestion) {
534533
* @param {string | undefined | null} [suggestion]
535534
*/
536535
export function unknown_code(node, code, suggestion) {
537-
w(node, 'unknown_code', `${suggestion ? `\`${code}\` is not a recognised code (did you mean \`${suggestion}\`?)` : `\`${code}\` is not a recognised code`}\nhttps://svelte.dev/e/unknown_code`);
536+
w(node, 'unknown_code', `${suggestion
537+
? `\`${code}\` is not a recognised code (did you mean \`${suggestion}\`?)`
538+
: `\`${code}\` is not a recognised code`}\nhttps://svelte.dev/e/unknown_code`);
538539
}
539540

540541
/**

packages/svelte/types/index.d.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1120,6 +1120,8 @@ declare module 'svelte/compiler' {
11201120
instance: Script | null;
11211121
/** The parsed `<script module>` element, if exists */
11221122
module: Script | null;
1123+
/** Comments found in <script> and {expressions} */
1124+
comments: JSComment[];
11231125
}
11241126

11251127
export interface SvelteOptions {
@@ -1437,6 +1439,17 @@ declare module 'svelte/compiler' {
14371439
attributes: Attribute[];
14381440
}
14391441

1442+
export interface JSComment {
1443+
type: 'Line' | 'Block';
1444+
value: string;
1445+
start: number;
1446+
end: number;
1447+
loc: {
1448+
start: { line: number; column: number };
1449+
end: { line: number; column: number };
1450+
};
1451+
}
1452+
14401453
export type AttributeLike = Attribute | SpreadAttribute | Directive;
14411454

14421455
export type Directive =
@@ -1493,7 +1506,7 @@ declare module 'svelte/compiler' {
14931506
| AST.Comment
14941507
| Block;
14951508

1496-
export type SvelteNode = Node | TemplateNode | AST.Fragment | _CSS.Node;
1509+
export type SvelteNode = Node | TemplateNode | AST.Fragment | _CSS.Node | Script;
14971510

14981511
export type { _CSS as CSS };
14991512
}

0 commit comments

Comments
 (0)