Skip to content

[F] getPattern

function getPattern(program, target): string | undefined

Gets the pattern regular expression associated with a given type, if one has been set.

Parameters

ParameterTypeDescription
programProgramthe Program containing the target Type
targetTypethe type to get the pattern for

Returns

string | undefined

the pattern string, if one was set

See

getPatternData