Skip to content

Commit 5372279

Browse files
committed
update types
1 parent ee4869f commit 5372279

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

packages/svelte/src/compiler/phases/3-transform/index.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ export function transform_component(analysis, source, options) {
2121
css: null,
2222
warnings: state.warnings, // set afterwards
2323
metadata: {
24-
runes: analysis.runes,
25-
hasUnscopedGlobalCss: analysis.css.has_unscoped_global
24+
runes: analysis.runes
2625
},
2726
ast: /** @type {any} */ (null) // set afterwards
2827
};
@@ -54,8 +53,7 @@ export function transform_component(analysis, source, options) {
5453
css,
5554
warnings: state.warnings, // set afterwards. TODO apply preprocessor sourcemap
5655
metadata: {
57-
runes: analysis.runes,
58-
hasUnscopedGlobalCss: analysis.css.has_unscoped_global
56+
runes: analysis.runes
5957
},
6058
ast: /** @type {any} */ (null) // set afterwards
6159
};
@@ -74,8 +72,7 @@ export function transform_module(analysis, source, options) {
7472
css: null,
7573
warnings: state.warnings, // set afterwards
7674
metadata: {
77-
runes: true,
78-
hasUnscopedGlobalCss: false
75+
runes: true
7976
},
8077
ast: /** @type {any} */ (null) // set afterwards
8178
};
@@ -105,8 +102,7 @@ export function transform_module(analysis, source, options) {
105102
}),
106103
css: null,
107104
metadata: {
108-
runes: true,
109-
hasUnscopedGlobalCss: false
105+
runes: true
110106
},
111107
warnings: state.warnings, // set afterwards
112108
ast: /** @type {any} */ (null) // set afterwards

packages/svelte/src/compiler/types/index.d.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ export interface CompileResult {
1818
code: string;
1919
/** A source map */
2020
map: SourceMap;
21+
/** Whether or not the CSS includes global rules */
22+
hasGlobal: boolean;
2123
};
2224
/**
2325
* An array of warning objects that were generated during compilation. Each warning has several properties:
@@ -35,11 +37,6 @@ export interface CompileResult {
3537
* For `compileModule`, this is always `true`
3638
*/
3739
runes: boolean;
38-
/**
39-
* Whether the component contains a top level :global selector or not
40-
* For `compileModule`, this is always `true`
41-
*/
42-
hasUnscopedGlobalCss: boolean;
4340
};
4441
/** The AST */
4542
ast: any;

0 commit comments

Comments
 (0)