chore: improve parser option comments [ci skip]
This commit is contained in:
parent
d99437f870
commit
c403c39126
@ -9,11 +9,16 @@ import {
|
|||||||
import { ParserPlugin } from '@babel/parser'
|
import { ParserPlugin } from '@babel/parser'
|
||||||
|
|
||||||
export interface ParserOptions {
|
export interface ParserOptions {
|
||||||
isVoidTag?: (tag: string) => boolean // e.g. img, br, hr
|
// e.g. platform native elements, e.g. <div> for browsers
|
||||||
isNativeTag?: (tag: string) => boolean // e.g. loading-indicator in weex
|
isNativeTag?: (tag: string) => boolean
|
||||||
isPreTag?: (tag: string) => boolean // e.g. <pre> where whitespace is intact
|
// e.g. native elements that can self-close, e.g. <img>, <br>, <hr>
|
||||||
isCustomElement?: (tag: string) => boolean
|
isVoidTag?: (tag: string) => boolean
|
||||||
|
// e.g. elements that should preserve whitespace inside, e.g. <pre>
|
||||||
|
isPreTag?: (tag: string) => boolean
|
||||||
|
// platform-specific built-in components e.g. <Transition>
|
||||||
isBuiltInComponent?: (tag: string) => symbol | void
|
isBuiltInComponent?: (tag: string) => symbol | void
|
||||||
|
// separate option for end users to extend the native elements list
|
||||||
|
isCustomElement?: (tag: string) => boolean
|
||||||
getNamespace?: (tag: string, parent: ElementNode | undefined) => Namespace
|
getNamespace?: (tag: string, parent: ElementNode | undefined) => Namespace
|
||||||
getTextMode?: (
|
getTextMode?: (
|
||||||
tag: string,
|
tag: string,
|
||||||
|
Loading…
Reference in New Issue
Block a user