Skip to content

resolveAsScalar

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.

FlowScalar | BlockScalar

boolean

(offset, code, message) => void

object

comment: string

range: Range

type: ScalarType | null

value: string

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.

Token | null | undefined

boolean

(offset, code, message) => void

{ comment: string; range: Range; type: ScalarType | null; value: string; } | null