OptionalastOptionallangTreat the source text as js, jsx, ts, tsx or dts.
OptionalpreserveEmit ParenthesizedExpression and TSParenthesizedType in AST.
If this option is true, parenthesized expressions are represented by
(non-standard) ParenthesizedExpression and TSParenthesizedType nodes that
have a single expression property containing the expression inside parentheses.
OptionalrangeControls whether the range property is included on AST nodes.
The range property is a [number, number] which indicates the start/end offsets
of the node in the file contents.
OptionalshowProduce semantic errors with an additional AST pass. Semantic errors depend on symbols and scopes, where the parser does not construct. This adds a small performance overhead.
OptionalsourceTreat the source text as script or module code.
Return an AST which includes TypeScript-related properties, or excludes them.
'js'is default for JS / JSX files.'ts'is default for TS / TSX files. The type of the file is determined fromlangoption, or extension of providedfilename.