File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ export type Comment = {
18
18
19
19
export type Context = {
20
20
kind : 'context'
21
- context : Record < string , unknown >
21
+ context : Record < string , string >
22
22
nodes : AstNode [ ]
23
23
}
24
24
@@ -48,7 +48,7 @@ export function comment(value: string): Comment {
48
48
}
49
49
}
50
50
51
- export function context ( context : Record < string , unknown > , nodes : AstNode [ ] ) : Context {
51
+ export function context ( context : Record < string , string > , nodes : AstNode [ ] ) : Context {
52
52
return {
53
53
kind : 'context' ,
54
54
context,
@@ -74,11 +74,11 @@ export function walk(
74
74
utils : {
75
75
parent : AstNode | null
76
76
replaceWith ( newNode : AstNode | AstNode [ ] ) : void
77
- context : Record < string , unknown >
77
+ context : Record < string , string >
78
78
} ,
79
79
) => void | WalkAction ,
80
80
parent : AstNode | null = null ,
81
- context : Record < string , unknown > = { } ,
81
+ context : Record < string , string > = { } ,
82
82
) {
83
83
for ( let i = 0 ; i < ast . length ; i ++ ) {
84
84
let node = ast [ i ]
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ export async function applyCompatibilityHooks({
89
89
}
90
90
91
91
pluginPaths . push ( [
92
- { id : pluginPath , base : ( context as any ) . base } ,
92
+ { id : pluginPath , base : context . base } ,
93
93
Object . keys ( options ) . length > 0 ? options : null ,
94
94
] )
95
95
@@ -107,7 +107,7 @@ export async function applyCompatibilityHooks({
107
107
throw new Error ( '`@config` cannot be nested.' )
108
108
}
109
109
110
- configPaths . push ( { id : node . selector . slice ( 9 , - 1 ) , base : ( context as any ) . base } )
110
+ configPaths . push ( { id : node . selector . slice ( 9 , - 1 ) , base : context . base } )
111
111
replaceWith ( [ ] )
112
112
return
113
113
}
Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ async function parseCss(
126
126
) {
127
127
throw new Error ( '`@source` paths must be quoted.' )
128
128
}
129
- globs . push ( { base : context . base as string , pattern : path . slice ( 1 , - 1 ) } )
129
+ globs . push ( { base : context . base , pattern : path . slice ( 1 , - 1 ) } )
130
130
replaceWith ( [ ] )
131
131
return
132
132
}
You can’t perform that action at this time.
0 commit comments