TransformResult
Hierarchy (View Summary)
- RenderResult
- TransformResult
Index
Accessors
Constructors
Methods
Properties
Accessors
code
-
get code(): string
Rendered CSS. The bytes of RenderResult.write are decoded the first time the property is read
Returns string
Constructors
constructor
new TransformResult(
parseResult: ParseResult,
renderResult: RenderResult,
stats: TransformResultStats,
): TransformResult
Parameters
parseResult: ParseResultrenderResult: RenderResultstats: TransformResultStats
Returns TransformResult
Methods
to JSON
toJSON(): Record<string, any>
JSON representation: the css is serialized as a string, the bytes are not serialized
Returns Record<string, any>
Staticcode Length
codeLength(result: RenderResult): number
Internal
length of the rendered css once decoded (result.code.length), without decoding it
Parameters
result: RenderResult
Returns number
Properties
arena
arena the ast nodes are stored in
ast
ast: number
Parsed ast tree: the id of the stylesheet node in TransformResult.arena
errors
Render errors
Optionalmap
Source map
Optionalmapping
mapping?: Record<string, string>
CSS module mapping
stats
Transform stats
write
write: Uint8Array
Rendered CSS, encoded as UTF-8
Static Readonly Internalshape
An instance is kept alive: the hidden class of the instances would otherwise be collected by a full garbage collection when no instance is alive, and the optimized code that depends on it discarded (deoptimized)
Transform result: the parse result and the render result