Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c403c39

Browse files
committedMar 24, 2020
chore: improve parser option comments [ci skip]
1 parent d99437f commit c403c39

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed
 

‎packages/compiler-core/src/options.ts

+9-4
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,16 @@ import {
99
import { ParserPlugin } from '@babel/parser'
1010

1111
export interface ParserOptions {
12-
isVoidTag?: (tag: string) => boolean // e.g. img, br, hr
13-
isNativeTag?: (tag: string) => boolean // e.g. loading-indicator in weex
14-
isPreTag?: (tag: string) => boolean // e.g. <pre> where whitespace is intact
15-
isCustomElement?: (tag: string) => boolean
12+
// e.g. platform native elements, e.g. <div> for browsers
13+
isNativeTag?: (tag: string) => boolean
14+
// e.g. native elements that can self-close, e.g. <img>, <br>, <hr>
15+
isVoidTag?: (tag: string) => boolean
16+
// e.g. elements that should preserve whitespace inside, e.g. <pre>
17+
isPreTag?: (tag: string) => boolean
18+
// platform-specific built-in components e.g. <Transition>
1619
isBuiltInComponent?: (tag: string) => symbol | void
20+
// separate option for end users to extend the native elements list
21+
isCustomElement?: (tag: string) => boolean
1722
getNamespace?: (tag: string, parent: ElementNode | undefined) => Namespace
1823
getTextMode?: (
1924
tag: string,

0 commit comments

Comments
 (0)
Please sign in to comment.