resolveAsScalar
Call Signature
Section titled “Call Signature”resolveAsScalar(
token,strict?,onError?):object
Defined in: src/source/cst-scalar.ts:30
If token is a CST flow or block scalar, determine its string value and a few other attributes.
Otherwise, return null.
Parameters
Section titled “Parameters”strict?
Section titled “strict?”boolean
onError?
Section titled “onError?”(offset, code, message) => void
Returns
Section titled “Returns”object
comment
Section titled “comment”comment:
string
range:
Range
type:
ScalarType|null
value:
string
Call Signature
Section titled “Call Signature”resolveAsScalar(
token,strict?,onError?): {comment:string;range:Range;type:ScalarType|null;value:string; } |null
Defined in: src/source/cst-scalar.ts:40
If token is a CST flow or block scalar, determine its string value and a few other attributes.
Otherwise, return null.
Parameters
Section titled “Parameters”Token | null | undefined
strict?
Section titled “strict?”boolean
onError?
Section titled “onError?”(offset, code, message) => void
Returns
Section titled “Returns”{ comment: string; range: Range; type: ScalarType | null; value: string; } | null