Skip to content

Commit 492a9b6

Browse files
committed
regenerate types
1 parent 0c12e48 commit 492a9b6

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

packages/svelte/types/index.d.ts

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1315,30 +1315,57 @@ declare module 'svelte/compiler' {
13151315
metadata: {
13161316
parent_rule: null | Rule;
13171317
has_local_selectors: boolean;
1318+
/**
1319+
* `true` if the rule contains a `:global` selector, and therefore everything inside should be unscoped
1320+
*/
13181321
is_global_block: boolean;
13191322
};
13201323
}
13211324

1325+
/**
1326+
* A list of selectors, e.g. `a, b, c {}`
1327+
*/
13221328
export interface SelectorList extends BaseNode {
13231329
type: 'SelectorList';
1330+
/**
1331+
* The `a`, `b` and `c` in `a, b, c {}`
1332+
*/
13241333
children: ComplexSelector[];
13251334
}
13261335

1336+
/**
1337+
* A complex selector, e.g. `a b c {}`
1338+
*/
13271339
export interface ComplexSelector extends BaseNode {
13281340
type: 'ComplexSelector';
1341+
/**
1342+
* The `a`, `b` and `c` in `a b c {}`
1343+
*/
13291344
children: RelativeSelector[];
13301345
metadata: {
13311346
rule: null | Rule;
13321347
used: boolean;
13331348
};
13341349
}
13351350

1351+
/**
1352+
* A relative selector, e.g the `a` and `> b` in `a > b {}`
1353+
*/
13361354
export interface RelativeSelector extends BaseNode {
13371355
type: 'RelativeSelector';
1356+
/**
1357+
* In `a > b`, `> b` forms one relative selector, and `>` is the combinator. `null` for the first selector.
1358+
*/
13381359
combinator: null | Combinator;
1360+
/**
1361+
* The `b:is(...)` in `> b:is(...)`
1362+
*/
13391363
selectors: SimpleSelector[];
13401364
metadata: {
1341-
/** `:global(...)` or `:global` or `:global.x` (but not `.x:global`) */
1365+
/**
1366+
* `true` if the whole selector is unscoped, e.g. `:global(...)` or `:global` or `:global.x`.
1367+
* Selectors like `:global(...).x` or `div:global` are not considered global, because they still need scoping.
1368+
*/
13421369
is_global: boolean;
13431370
/** `:root`, `:host`, `::view-transition`, or selectors after a `:global` */
13441371
is_global_like: boolean;

0 commit comments

Comments
 (0)