-
Notifications
You must be signed in to change notification settings - Fork 0
Utils.Function.is_identifier
DecentM edited this page Jan 16, 2026
·
86 revisions
@decentm/concourse-ts / Utils / is_identifier
is_identifier<
IdentifierType>(input):input is IdentifierType
Defined in: utils/identifier/index.ts:43
Returns if the input is a valid Identifier, using the compiler's validator.
https://concourse-ci.org/docs/config-basics/#identifier-schema
Example:
const name = 'my-name'
// ^? string
new Job(name) // Compilation error
if (!is_identifier(name)) {
return
}
new Job(name) // No error
// ^? Identifier• IdentifierType extends Identifier = Identifier
unknown
The potential Identifier to check
input is IdentifierType
Type guard for valid identifiers, using branded types.