diff --git a/types/warnings.d.ts b/types/warnings.d.ts index 14f1752..32c092c 100644 --- a/types/warnings.d.ts +++ b/types/warnings.d.ts @@ -21,15 +21,16 @@ type WarningName = WarningNameWithValue | "unsafe-import"; type WarningLocation = [[number, number], [number, number]]; -interface WarningDefault { - kind: WarningName; +interface WarningDefault { + kind: T; file?: string; value: string; - source: string; - location: WarningLocation | WarningLocation[]; + source: string; + location: null | WarningLocation | WarningLocation[]; i18n: string; severity: "Information" | "Warning" | "Critical"; experimental?: boolean; } -type Warning = T extends { kind: WarningNameWithValue } ? T : Omit; +type Warning = + T extends { kind: WarningNameWithValue } ? T : Omit;