Skip to content

Commit 8de63d9

Browse files
committed
Add error recovery to types for transformStyleAttribute
1 parent 6b15754 commit 8de63d9

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

node/index.d.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,14 +193,22 @@ export interface TransformAttributeOptions {
193193
* that can be replaced with the final urls later (after bundling).
194194
* Dependencies are returned as part of the result.
195195
*/
196-
analyzeDependencies?: boolean
196+
analyzeDependencies?: boolean,
197+
/**
198+
* Whether to ignore invalid rules and declarations rather than erroring.
199+
* When enabled, warnings are returned, and the invalid rule or declaration is
200+
* omitted from the output code.
201+
*/
202+
errorRecovery?: boolean
197203
}
198204

199205
export interface TransformAttributeResult {
200206
/** The transformed code. */
201207
code: Buffer,
202208
/** `@import` and `url()` dependencies, if enabled. */
203-
dependencies: Dependency[] | void
209+
dependencies: Dependency[] | void,
210+
/** Warnings that occurred during compilation. */
211+
warnings: Warning[]
204212
}
205213

206214
/**

0 commit comments

Comments
 (0)