@stylexswc/rs-compiler
Version:
NAPI-RS compiler for transform StyleX code
58 lines (55 loc) • 1.64 kB
TypeScript
/* tslint:disable */
/* eslint-disable */
/* auto-generated by NAPI-RS */
export interface TransformOutput {
code: string
map?: string
output?: string
diagnostics: Array<string>
}
export interface StyleXModuleResolution {
type: string
rootDir?: string
themeFileExtension?: string
}
export const enum SourceMaps {
True = 'True',
False = 'False',
Inline = 'Inline'
}
export interface ImportSourceInput {
as: string
from: string
}
export interface StyleXOptions {
styleResolution?: 'application-order' | 'property-specificity' | 'legacy-expand-shorthands'
enableFontSizePxToRem?: boolean
runtimeInjection?: boolean
classNamePrefix?: string
definedStylexCssVariables?: Record<string, string>
importSources?: (string | { as: string, from: string })[]
treeshakeCompensation?: boolean
enableInlinedConditionalMerge?: boolean
enableLogicalStylesPolyfill?: boolean
enableLegacyValueFlipping?: boolean
dev?: boolean
test?: boolean
debug?: boolean
enableDebugClassNames?: boolean
enableDebugDataProp?: boolean
enableDevClassNames?: boolean
enableMinifiedKeys?: boolean
aliases?: Record<string, string[]>
unstable_moduleResolution?: StyleXModuleResolution
sourceMap?: SourceMaps
}
export interface StyleXMetadata {
stylex: ([string, { ltr: string; rtl?: null | string }, number])[]
}
export interface StyleXTransformResult {
code: string
metadata: StyleXMetadata
map?: string
}
export declare function transform(filename: string, code: string, options: StyleXOptions): StyleXTransformResult
export declare function normalizeRsOptions(options: StyleXOptions): StyleXOptions