File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -21,15 +21,16 @@ type WarningName = WarningNameWithValue | "unsafe-import";
21
21
22
22
type WarningLocation = [ [ number , number ] , [ number , number ] ] ;
23
23
24
- interface WarningDefault {
25
- kind : WarningName ;
24
+ interface WarningDefault < T = WarningName > {
25
+ kind : T ;
26
26
file ?: string ;
27
27
value : string ;
28
- source : string ;
29
- location : WarningLocation | WarningLocation [ ] ;
28
+ source : string ;
29
+ location : null | WarningLocation | WarningLocation [ ] ;
30
30
i18n : string ;
31
31
severity : "Information" | "Warning" | "Critical" ;
32
32
experimental ?: boolean ;
33
33
}
34
34
35
- type Warning < T extends WarningDefault = WarningDefault > = T extends { kind : WarningNameWithValue } ? T : Omit < T , "value" > ;
35
+ type Warning < T extends WarningDefault = WarningDefault > =
36
+ T extends { kind : WarningNameWithValue } ? T : Omit < T , "value" > ;
You can’t perform that action at this time.
0 commit comments