API Reference
Qingkuai's API is organized by entry package so that imports stay explicit and responsibilities remain clear. This article lists the public APIs exported from the source entry files of two packages: the runtime package qingkuai and the compiler package qingkuai/compiler.
qingkuai/internal is mainly intended for framework internals and is generally not recommended for direct use in application code, so it is not covered here.
Runtime
The runtime package exports APIs for component lifecycle hooks, reactive side effects, performance controls, and state conversion.
Type Exports
ComponentInstanceHtmlBlockOptionsQingkuaiComponent
Lifecycle
onAfterDestroyonAfterMountonAfterUpdateonBeforeDestroyonBeforeUpdate
See: Lifecycle
Side Effects and Watchers
effectpostEffectpostWatchpreEffectpreWatchsyncEffectsyncWatchwatch
See: Watchers and Side Effects
Reactive Optimization Controls
batchAndNoTrackingbatchUpdatingnoTrackingnoUpdatingpauseTrackingpauseUpdatingresumeTrackingresumeUpdatingstartBatchUpdatingstopBatchUpdating
State and Scheduling
createShallowStorecreateStoremountAppnextTicktoRawtoReactivetoShallowReactive
Other Exports
DESTRUCT_HTMLversion
Compiler (qingkuai/compiler)
The compiler package is used to parse and compile component source code. It is mainly consumed by build tools, language services, and plugin ecosystems.
Type Exports
ASTLocationASTPositionASTPositionWithFlagCompileIntermediateOptionsCompileIntermediateResultCompileOptionsCompileResultIdentifierStatusScriptDescriptorStyleDescriptorTemplateAttributeTemplateNodeTemplateNodeContextTextContentPart
Constants Object
The constants object contains the following properties:
LSCPRESERVED_IDPREFIXSPREAD_TAG
Utility Object
The util object contains the following properties:
camel2KebabfindEndBracketfindOutOfCommentfindOutOfLiteralfindOutOfLiteralCommentformatSourceCodeisEmbeddedLanguageTagisEmbeddedStyleTagisRequiredValueDirectiveisVoidTagkebab2CameltoPropertyKeyts
Flags
PositionFlag
Methods
compilecompileIntermediateisCompileErrorisCompileWarningparseDirectiveValueparseEventFlagparseTemplate