A Predicate that always returns true.
true
Opposite of alwaysFalse.
All arguments are ignored
Returns always true
const result = alwaysTrue();console.log(result); // true
As default value for an optional Function argument
function canParseBoolean(canParse: ((s: String) => boolean) = alwaysTrue) { return canParse("false");}const result = canParseBoolean();console.log(result); // true
Rest
Generated using TypeDoc
A Predicate that always returns
true.Opposite of alwaysFalse.
Remark
All arguments are ignored
Example
Returns always
trueExample
As default value for an optional Function argument
Returns
true