On this page
@-prefix resolution for string flag values, mirroring Go resolveAtPrefix (parse.go) and Python _resolve_at_prefix across the three supported @-forms.
#typescript/src/atprefix
#typescript/src/atprefix
@-prefix resolution for string flag values, mirroring Go resolveAtPrefix (parse.go) and Python _resolve_at_prefix across the three supported @-forms. "@path" reads a file, "@-" reads stdin (once per invocation), and "@@literal" strips the leading "@". Content is trimmed of trailing space/tab/CR/LF only (never other whitespace), and capped at 1 MB.
#AT_PREFIX_MAX_SIZE
export const AT_PREFIX_MAX_SIZE = 1024 * 1024#StdinTracker
export interface StdinTrackerTracks which flag consumed stdin ("@-" is single-use per invocation).
#newStdinTracker
export function newStdinTracker(): StdinTracker#StdinReader
export type StdinReader = () => BufferReads all of stdin, returning at most AT_PREFIX_MAX_SIZE + 1 bytes (the +1 lets the caller detect over-limit input, like Go's LimitReader). Injectable for tests.
#resolveAtPrefix
export function resolveAtPrefix(Resolves the @-prefix for a raw string flag value. Returns the value unchanged when it does not start with "@". Throws ParseError with the sibling-exact messages on failure.