This CHANGELOG tells you:
- when a release was made
- what is in each release
It also tells you what changes have been completed, and will be included in the next tagged release.
For each release, changes are grouped under these headings:
- Backwards-Compatibility Breaks: a list of any backwards-compatibility breaks
- New: a list of new features. If the feature came from a contributor via a PR, make sure you link to the PR and give them a mention here.
- Fixes: a list of bugs that have been fixed. If there's an issue for the bug, make sure you link to the GitHub issue here.
- Dependencies: a list of dependencies that have been added / updated / removed.
- Tools: a list of bundled tools that have been added / updated / removed.
The following changes have been completed, and will be included in the next tagged release.
- added
DataAccessorOptions
type - added
DeferredValue
type - added
resolveValue()
function - added
DeferredValueWithContext
type - added
resolveValueWithContext()
type - added
setProperty()
helper function - added
HashMap.set()
static helper method - added
ObjectKey
type - added
pickProperties()
helper function - added
getOwnKeys()
helper function - added
omitProperties()
helper function - added
HashMap.partial()
static helper method - added
HashMap.omit()
static helper method - added
HashMap.flatMap()
static helper method - added
StrictObject()
type - added
isStrictObject()
type guard - added
mustBeStrictObject()
type guarantee - added
validateStrictObject()
type validator
- moved all types to be out-of-scope for
c8
code coverage toolc8
doesn't support code coverage of types at this time
- avoid bivariant methods in interfaces
- fix all linting errors caught by ESLint v9
- removed dev dependency on @swc/cli, due to upstream security vulnerability
- upgraded to Typescript 5.6
- upgraded to ESLint v9
Released Saturday, 16th March 2024.
- added
recastIfValid()
- added
Filter
function type - added
AnyFilter
function type - added
everyFilter()
- added
someFilters()
- added
makeNominalTypeFromDataGuarantee()
- added
makeNominalTypeFromTypeGuarantee()
- added
identity()
- added
noop()
- added
IS_DATA_DEFAULT_OPTIONS
- added
EmptyObject
type - added
validateStringMaxLength()
data validator
AnyDataGuarantee
- definition now uses
any
instead ofunknown
- updated to be compatible with latest
DataGuarantee
definition
- definition now uses
DataGuard
now as generic type parameter for acceptable optional parameters- useful if the underlying validator supports additional options being passed into it
IS_TYPE_DEFAULT_OPTIONS
updated to latest definition- the following data guards and type guards no longer accept any options (because they're not needed at all)
isEntity()
AnyBooleanishValidator
now correctly sets the OPT generic type parameter- was previously unset, and using the default of
BooleanishValidator
definition
- was previously unset, and using the default of
validateHttpStatusCodeData()
now returns aHttpStatusCode
type- previously, it returned a
number
- previously, it returned a
validateStringLengthBetween()
now built on top ofvalidateStringMinLength()
andvalidateStringMaxLength()
validateNumberIsInteger()
now returns the expected integer & actual number received if it returns anAppError
... plus lots of updates to docblocks to make them more accurate, add missing parameter documentation etc etc.
The following functionality had 'GNU GPL-3' license headers at the top of the file. This was a mistake, and the code has now been correctly relicensed under the 3-Clause BSD license:
Regex
validateRegExpArrayWithGroups()
As part of an overhaul of makeNominalType()
(to make it useful for interfaces), the following backwards-compatibility breaks were introduced:
- all option types have every property optional
- updated
DataGuardOptions
DataGuaranteeOptions
DataValidatorOptions
TypeGuardOptions
TypeGuaranteeOptions
TypeValidatorOptions
OnErrorOptions
BooleanishDataOptions
- with hindsight, this is how they should have always been
- if properties aren't option, it's not really an option type!
- updated
DataGuarantee
functions must now return the input value- makes them far more interchangeable with TypeGuarantees, and therefore far more useful
DataGuard
functions no longer default to anunknown
input type- create
TypeGuard
functions if you want to acceptunknown
input types
- create
SmartConstructorOptions
are now an alias forTypeGuaranteeOptions
- this adds a
DataPath
option to all smart constructors
- this adds a
applyFunctionalOptions()
now has an additional generic type parameter, to separate input and output typesmakeNominalType()
replaced bymakeNominalTypeFromDataGuarantee()
ormakeNominalTypeFromTypeGuarantee()
- removed
MAKE_NOMINAL_TYPE_DEFAULT_OPTIONS
makeNominalType()
already provides defaults for any options you don't provide
- removed
MakeNominalTypeOptions
type- use
TypeGuaranteeOptions
instead
- use
- removed
MAKE_DATA_PATH_DEFAULT_OPTIONS
makeDataPath()
already provides defaults for any options you don't provide
- removed
MakeDataPathOptions
type- use
TypeGuaranteeOptions
instead
- use
- removed
MakeHttpStatusCodeOptions
type- use
DataGuaranteeOptions
instead
- use
- removed
MAKE_HTTP_STATUS_CODE_DEFAULT_OPTIONS
makeHttpStatusCode()
already provides defaults for any options you don't provide
- removed
MakeNodeJSModuleNameOptions
type- use
DataGuaranteeOptions
instead
- use
- removed
MAKE_NODEJS_MODULE_NAME_DEFAULT_OPTIONS
makeNodeJSModuleName()
already provides defaults for any options you don't provide
mustBeBooleanishData()
is now a type guarantee- it was previously (wrongly) declared as a data guarantee
everyGuard()
andsomeGuard()
are now stricter in the functions they accept- the functions must return type predicates (e.g.
x is string
)- this was not correctly enforced before
- use the new
everyFilter()
andsomeFilters()
if you're using functions that do not return type predicates
- the functions must return type predicates (e.g.
everyGuard()
andsomeGuard()
now support an option parameter- most exported interfaces are now types, for better support for type manipulation
- only exceptions are:
- interfaces that describe class behaviours (aka contracts / protocols)
- interfaces that extend standard library interfaces
- only exceptions are:
The two replacements for makeNominalType()
appear to make it far easier for the Typescript compiler to successfully do type inference. This should make the functions safer to use.
isData()
and isType()
should also be more type-safe as a result too.
validateNumberRange()
now takes the input as the third parametereveryGuard()
andsomeGuards()
now expect the filters array as the first parameter
Released Saturday, 2nd March 2024.
- added missing export for
IS_TYPE_DEFAULT_OPTIONS
Released Saturday, 2nd March 2024.
- tweaks to the Typescript build config
Released Saturday, 2nd March 2024.
- attempt to make the package compatible for both CommonJS and ESM environments
Released Saturday, 2nd March 2024.
- update entrypoints in
package.json
Released Saturday, 2nd March 2024.
- fixed npmjs publishing workflow
Released Saturday, 2nd March 2024.
- Added
AnyArrayKey
- Added
mustBeEntity()
- Added
validateEntity()
- Added
getPropertyOf()
- Added
isObjectish()
- Added
mustBeObjectish()
- Added
validateObjectish()
- Added
mustImplementHas()
- Added
validateImplementsHas()
- Added
off
,nack
andnarp
as recognisedfalse
values to theDEFAULT_BOOLEANISH_RULES
- Added
on
,ack
,yarp
as recognisedtrue
values to theDEFAULT_BOOLEANISH_RULES
- Added
Prototypes
to act as module for prototype-related functions - Added
Strings
to act as module for string-related functions - Added
Unknowns
to act as module for unknown type-related functions
isEntity()
is now built onvalidateEntity()
implementsHas()
is now built onvalidateImplementsHas()
implementsProtocol()
is now built onvalidateImplementsProtocol()
- Moved
AnyFunction
into theBasicTypes
folder - Moved
AppErrorOr
into theErrorHandling
folder - Moved
DataPath
into theErrorHandling
folder - Moved
numerical
into theBasicTypes
folder - Moved the utility types up to be a top-level folder
- Upgrade to Typescript 5.2
- Switch from tslint to @typescript-eslint
- Lots of tweaks to satisfy @typescript-eslint
- Removed
everyFilter()
- use
everyGuard()
instead
- use
- Removed
someFilters()
- use
someGuards()
instead
- use
- Simplified
AppError
and the like:- dropped
status
field fromStructuredProblemReportData
- dropped
- Dropped
AnyPrimitiveType
- it was a duplicate of
Primitive
- it was a duplicate of
- Dropped previously-deprecated
FunctionPointerTable
et al- use
DispatchMap
instead
- use
- switched from Istanbul NYC to c8 for code coverage
- sadly, NYC seems to have been abandoned :(
Released Monday, 9th May, 2022.
- Added
validateStringLengthBetween()
- Added
validateStringMinLength()
- Added
StringIsTooShort
Error - Added
UnsupportedStringLengthRange
Error
Released Monday, 9th May 2022.
- Added
isHashMap()
- Added
mustBeHashMap()
- Added
validateHashMap()
- Added missing export for
isAppError()
- Updated to the latest deps.
- CI workflow now checks against:
- NodeJS v12.x
- NodeJS v14.x
- NodeJS v16.x
- NodeJS v18.x
Released Monday, 2nd May 2022.
- Added
HashMap.buildIndex()
- Added
HashMap.updateIndex()
Released Monday, 2nd May 2022.
The focus of this release has been on making HashMap much more complete.
- Added
HashMap.clear()
- Added
HashMap.delete()
- Added
HashMap.find()
- Added
HashMap.get()
- Added
HashMap.getKeyValuePairs()
- Added
HashMap.has()
- Added
HashMap.map()
- Added
HashMap.mapToArray()
- Added
HashMap.size()
- Added
HashMap.values()
- Added
deleteProperty()
getProperty()
type signature updated to show that it can returnundefined
- unfortunately, the TS compiler wasn't always able to work this out by itself
Released Sunday, 1st May 2022.
- Added
Nullable
utility type. - Added
NonNullable
utility type. - Added
NonNullableObject
utility type. - Added
getProperty()
as a workaround for Typescript not supporting symbols as property names fully. - Added
hasProperty()
as a workaround for Typescript not supporting symbols as property names fully. - Added
AnyDispatchMapKey
type.
searchDispatchMap()
now supports symbols as keys to search for.- Use
searchDispatchMap()
instead of the deprecatedsearchFunctionPointerTable()
:resolveNumerical()
updatedvalidateBooleanishData()
updated
- Bump dependencies to resolve dependabot security alerts.
Released Saturday, 18th September 2021.
- Added
DispatchMap
(replaces the oldFunctionPointerTable
) - Added
AnyDispatchMap
(replaces the oldAnyFunctionPointerTable
) - Added
searchDispatchMap()
(replaces the oldsearchFunctionPointerTable()
) - Added
DispatchMapReturnTypes
mapped type
- Deprecated
FunctionPointerTable
(now an alias forDispatchMap
) - Deprecated
AnyFunctionPointerTable
(now an alias forAnyDispatchMap
) - Deprecated
searchFunctionPointerTable()
(now an alias forsearchDispatchMap()
)
Released Sunday, 5th September 2021.
- Utility Types
- added
ValueOf
union-type builder
- added
Released Monday, 30th August 2021.
- Utility Types
- added
RequireAllAttributesMap
mapped type
- added
- Added Microsoft's API-Extractor
- Added Microsoft's API-Documenter
- Updated all docblocks to be compatible with api-extractor
Released Saturday, 3rd July 2021.
- Archetypes
- added
AnyDataGuarantee
type - added
AnyDataGuard
type - added
AnyDataValidator
type - added
AnyEntity
type - added
AnyEntityObject
type - added
AnyTypeGuarantee
type - added
AnyTypeGuard
type - added
AnyTypeValidator
type
- added
- BasicTypes
- added
mustBeNonEmptyArray()
TypeGuarantee
- added
- Operators
- added
everyGuard()
- added
someGuards()
- added
- Archetypes
DataGuard.ts
file moved into its own folderSmartConstructor
user-defined options / functional options' options definition has been simplified- both of these template parameters now enforce compatibility with
SmartConstructorOptions
, instead of relying on intersection types buried within the definition
- both of these template parameters now enforce compatibility with
- BasicTypes
- added missing export for
mustBeArray()
- improved type-inference for
isNonEmptyArray()
- switch to safer 'arrays of unknown type'
- isArray()
- mustBeArray()
- validateArray()
- validateArrayOf()
- validateNonEmptyArray()
- added explicit
TypeGuard
signature- isInteger()
- isNumber()
- isString()
- added missing export for
- Nominals
- moved
AnyBranded
type into its own file - moved
AnyFlavoured
type into its own file
- moved
- Operators
- moved
recast
into its own subfolder
- moved
- BasicTypes
- deprecated Filter; use the DataGuard type instead
- deprecated everyFilter(); use everyGuard() instead
- deprecated someFilters(); use someGuards() instead
- ErrorHandling
- additional unit tests for
isAppError()
, to prove it does not crash when given non-objects
- additional unit tests for
Released Wednesday, 26th May 2021.
- Update all dependencies to the latest version.
Released Tuesday, 22nd December 2020.
The following changes were needed for TypeScript v4 compatibility:
makeNominalType()
now requires user-defined options to be based onMakeNominalTypeOptions
instead ofobject
DataGuarantee
type now requires user-defined options to be based onDataGuaranteeOptions
instead ofobject
TypeGuarantee
type now requires user-defined options to be based onTypeGuaranteeOptions
instead ofobject
The following changes may break existing code:
ToPrimitive
protocol now supports returningbool
type too- apparently,
[Symbol.toPrimitive]: (hint) => bool
is a legal thing!
- apparently,
- Basic Types
- added
Immutable
- added
DeepImmutable
- added
Primitive
- added
PrimitiveOrFunction
- added
PrimitiveOrUndefined
- added
Primitivish
- added
Released Sunday, 4th October 2020.
- Basic Types
- added
HashMap.first()
- added
HashMap.firstKey()
- added
HashMap.keys()
HashMap
can now store functions
- added
Released Wednesday, 23rd September 2020.
- Basic Types
- added
HashMap.every()
- added
HashMap.filter()
- added
HashMap.some()
- added
Released Sunday, 20th September 2020.
- More missing exports
- added global export for
mustBeRegExpExecArrayWithGroups()
- added global export for
Released Sunday, 20th September 2020.
- Missing exports
- add global export for BasicTypes / Booleanish
- add global export for BasicTypes / Functions
Released Sunday, 20th September 2020.
- Basic Types / Functions
- Added
isFunction()
- Added
mustBeFunction()
- Added
validateFunction()
- Added
- Basic Types / Regex
- Added
RegexReturnedNoResultsError
- Added
Regex
type - Added
RegexReturnedNoNamedGroupsError
- Added
RegExpArrayWithGroups
type - Added
isRegExpExecArrayWithGroups()
- Added
mustBeRegExpExecArrayWithGroups()
- Added
validateRegExpExecArrayWithGroups()
- Added
- Basic Types / Objects
- Added
ObjectCannotBeEmptyError
- Added
validateObjectNotEmpty()
- Added
getTypeNames()
- added missing test case for arrays
Released Sunday, 6th September 2020.
- Added
HashMap.forEach()
extractReasonFromCaught()
andextractStackFromCaught()
- unit tests no longer look for
Context.<anonymous>
in the stack trace
- unit tests no longer look for
- Updated dev dependencies to resolve low-severity
npm audit
warnings.
Released Friday, 10th July 2020.
assignOptionalFields()
- parameter
fieldsList
has changed type, from an array to an object- delivers stronger type-safety over the original design
- parameter
AttributeNames
is nowAttributeKeys
- consistent naming with other utility types that return keys from objects
AttributeTransformers
has been removed- it has been replaced by
AttributeTransformerMap
- it has been replaced by
TransformedAttributes
has been removed- it's been designed out
- Utility Types
- added
AttributeFilterMap
- added
AttributeTransformerMap
- added
IfEquals
- added
EquivalentKeys
- added
EquivalentOptionalKeys
- added
EquivalentOptionalPart
- added
EquivalentPart
- added
IdenticallyNamedKeys
- added
IdenticallyNamedPart
- added
OptionalKeys
- added
OptionalPart
- added
WritableKeys
- added
WritablePart
- added
- Basic Types
assignOptionalFieldsUsingTransformers()
- the transformer functions can now be lambdas
- if there's a problem with the transformers, the compiler now complains about the transformer function that's wrong, instead of complaining about
target
- Utility Types
AttributeNames
no longer returnsundefined
in the enum
- Archetypes / Utility Types (new module!)
- added
AttributeNames
utility type - added
AttributeTransformers
utility type - added
Definitely
utility type - added
Maybe
utility type - added
TransformedAttributes
utility type
- added
- Basic Types
- added
assignOptionalFields()
- added
assignOptionalFieldsUsingTransformers()
- added
- Supporting Types
FunctionPointerTable
now supports allkeyof
types as keys
Released Wednesday, 8th July 2020
- Basic Types
- added
validateArrayOf()
- added
validateNonEmptyArray()
- added
validateOptionType()
- added
validateRegexCompiles()
- added
validateStringMatches()
- added
- Errors
- added
ArrayCannotBeEmptyError
- added
RegexDoesNotCompileError
- added
UnsupportedStringValueError
- added
- Basic Types
validateStringStartsWith()
is now part of the public APIvalidateStringValue()
only accepts strings now
Released Wednesday, 8th July 2020.
- Basic Types
- added
mustBeAny()
- added
validateAny()
- added
Released Wednesday, 1st July 2020.
- Errors
- added
NotImplementedError
- added
- Errors
ObjectIsImmutableError
now has an accurate description message
Released Tuesday, 30th June 2020.
- Errors
- added
ObjectIsImmutableError
- added
Released Tuesday, 23rd June 2020.
- Archetypes
- Function Types
- SmartConstructor now applies
Partial<>
toOPT
- SmartConstructor now applies
Partial<>
toFN_OPT
- was preventing the caller from passing in partial option objects
- SmartConstructor now applies
- Function Types
Released Monday, 22nd June 2020.
- Archetypes
- Nominals
MakeNominalTypeOptions
is now compatible withTypeGuaranteeOptions
makeNominalType()
now uses a deconstructed object to support user-supplied options
- Nominals
- Option Types
- DataPath
- added missing
MakeDataPathOptions
- added missing
MAKE_DATA_PATH_DEFAULT_OPTIONS
makeDataPath()
options are now compatible with theTypeGuaranteeOptions
- added missing
- HttpStatusCode
makeHttpStatusCode()
options are now compatible with theTypeGuaranteeOptions
- NodeJSModuleName
makeNodeJSModuleName()
options are now compatible with theTypeGuaranteeOptions
- DataPath
Released Monday, 22nd June 2020.
- Option Types
validateNumericalData()
function signature updated to show it returns anAppErrorOr<number>
- makes it easier to chain validators together
Released Sunday, 21st June 2020.
- Archetypes
- added
AnyFunction
- added
ComposableFunction
- added
- BasicTypes
- added
BooleanishValidatorOptions
- added
- Errors
- added
UnsupportedNumericalValueError
- added
- Option Types
- numerical (new type!)
- added
numerical
option type - added
NumericalConversionRules
function pointer table - added
DEFAULT_NUMERICAL_CONVERSION_RULES
- added
resolveNumerical()
- added
validateNumericalData()
- added
- numerical (new type!)
- Protocols
- added
ToPrimitive
protocol - added
PrimitiveHint
type
- added
- RefinedTypes
RefinedNumber
now implementsToPrimitive
RefinedString
now implementsToPrimitive
- SupportingTypes
- FunctionPointerTable (new type!)
- added
FunctionPointerTable
- added
AnyFunctionPointerTable
- added
searchFunctionPointerTable
- added
- FunctionPointerTable (new type!)
- RefinedTypes
RefinedString
now supports auto-conversion to a number
- BasicTypes
- the Booleanish module now uses the
FunctionPointerTable
- replaces its own, bespoke approach
- the Booleanish module now uses the
Released Sunday, 21st June 2020.
- Errors
- added
NumberOutOfRangeError
- added
- Basic Types
- added
validateNumberRange()
- added
- HttpStatusCode
- now built on
validateNumberRange()
- now built on
- HttpStatusCodeError
- now also an instance of
NumberOutOfRangeError
- now includes
minInc
andmaxInc
fields
- now also an instance of
Released Sunday, 21st June 2020.
- BasicTypes
- Filters (new module!)
- added
Filter
function signature - added
everyFilter()
method - added
someFilters()
method
- added
- HashMaps
- added
AnyHashMap
- added
- Objects
- added
getAllMethods()
- added
getAllMethodNames()
- added
getMissingMethodNames()
- added
getPublicMethods()
- added
getPublicMethodNames()
- added
isAttributeName()
- added
isGetterName()
- added
isMethodName()
- added
validateObjectHasAllMethodsCalled()
- Filters
- added
PropertyFilter
- added
PropertyFilterData
- added
PropertyDescriptorFilterOptions
- added
PropertyDescriptorFilter
- added
PropertyDescriptorFilterData
- added
PropertyNameFilter
- added
PropertyNameFilterData
- added
PropertyNameFilterOptions
- added
FIND_PROPERTIES_FILTER_DROP_CONSTRUCTORS
- added
FIND_PROPERTIES_FILTER_DROP_INTERNAL
- added
FIND_PROPERTIES_FILTER_KEEP_ATTRIBUTES
- added
FIND_PROPERTIES_FILTER_KEEP_METHODS
- added
FIND_PROPERTIES_FILTER_PREFER_CHILD_PROTOTYPE
- added
FIND_PROPERTY_DESCRIPTORS_DEFAULT_OPTIONS
- added
FIND_PROPERTY_NAMES_DEFAULT_OPTIONS
- added
findAttributes()
- added
findAttributeNames()
- added
findMethods()
- added
findMethodNames()
- added
findProperties()
- added
findPropertyNames()
- added
- added
- Protocols
- added
Has
protocol
- added
- Prototypes (new module!)
- added
NextPrototypeChain
- added
NEXT_PROTOTYPE
- added
STOP_AT_NEXT_PROTOTYPE
- added
STOP_AT_OBJECT_PROTOTYPE
- added
- Filters (new module!)
- Errors
- added
ExtensionDefinesNoMethodsError
- added
ObjectHasMissingMethodsError
- added
- ProtocolsExtensions (new module!)
- added
ProtocolDefinition
- added
addExtension()
- added
implementsProtocol()
- added
makeProtocolDefinition()
- added
validateImplementsProtocol()
- added
Released Friday, 20th June 2020.
- SmartConstuctor
- new generic parameter
FN_OPT
added
- new generic parameter
Released Friday, 19th June 2020.
- Resolve circular-dependency problems
- only occurs when using
@safelytyped/core-types
in another package
- only occurs when using
- Errors
- UnreachableCodeError
- corrected the 'details' field
- changed the 'status' field to be '500'
- UnreachableCodeError
Released Friday, 19th June 2020.
- Basic Types
- We now export basic types as part of the public API.
Released Thursday, 18th June 2020.
- Operators
- we now export
IS_DATA_DEFAULT_OPTIONS
- we now export
Released Wednesday, 17th June 2020.
- Archetypes
- Entities
- added
Entity
interface - added
EntityObject
base class
- added
- Function Types
- added
DataGuarantee
function signature - added
DataGuard
function signature - added
DataValidator
function signature - added
FunctionalOption
function signature - added
SmartConstructor
function signature - added
TypeGuarantee
function signature - added
TypeGuard
function signature - added
TypeValidator
function signature
- added
- Nominals
- added
AnyBranded
type - added
AnyFlavoured
type - added
AnyNominal
type - added
Branded
union type - added
Flavoured
type - added
makeNominalType()
- added
- Values
- added
AnyValue
type - added
isValue()
type guard - added
Value
protocol - added
ValueObject
base class
- added
- Entities
- BasicTypes
- Any
- added
isAny()
type guard
- added
- Arrays
- added
isArray()
type guard - added
isNonEmptyArray()
type guard - added
mustBeArray()
type guarantee - added
NonEmptyArray
type - added
validateArray()
type validator
- added
- Booleanish
- added
BooleanishDataOptions
type - added
BooleanishRules
type - added
isBooleanishData()
data validator - added
mustBeBooleanishData()
data guarantee - added
validateBooleanishBoolean()
data validator - added
validateBooleanishData()
data validator - added
validateBooleanishNumber()
data validator - added
validateBooleanishObject()
data validator - added
validateBooleanishString()
data validator
- added
- Booleans
- added
isBoolean()
type guard - added
mustBeBoolean()
type guard - added
validateBoolean()
type validator
- added
- Classes
- added
getClassNames()
- added
- HashMaps
- added
HashMap
interface
- added
- Integers
- added
isInteger()
data guard - added
mustBeInteger()
data guarantee - added
validateInteger()
data validator
- added
- Numbers
- added
isNumber()
type guard - added
mustBeNumber()
type guarantee - added
validateNumber()
type validator
- added
- Objects
- added
isObject()
type guard - added
mustBeObject()
type guarantee - added
validateObject()
type validator
- added
- Strings
- added
isString()
type guard - added
mustBeString()
type guarantee - added
validateString()
type validator - added
validateStringStartsWith()
data validator
- added
- Unknowns
- added
getTypeNames()
- added
- Any
- ErrorHandling
- added
AllExtraData
union type - added
AnyAppError
type - added
AnyExtraData
type - added
AppError
type - added
ExtraData
interface - added
ExtraLogsOnlyData
interface - added
ExtraPublicData
interface - added
NoExtraData
type - added
OnError
function signature - added
OnErrorOptions
option type - added
StructuredProblemReport
type - added
StructuredProblemReportData
type - added
THROW_THE_ERROR
default error handler - added
extractReasonFromCaught()
helper - added
extractStackFromCaught()
helper - added
isAppError()
type guard - added
makeStructuredProblemReport()
smart constructor
- added
- Errors
- added
MODULE_NAME
default - added
HttpStatusCodeOutOfRangeError
- added
InvalidNodeJSModuleNameError
- added
UnreachableCodeError
- added
UnsupportedBooleanishValueError
- added
UnsupportedStringPrefixError
- added
UnsupportedTypeError
- added
- Operators
- added
isData()
operator - added
IsDataOptions
type - added
isType()
operator - added
IsTypeOptions
type - added
mustBe()
operator - added
MustBePipelineStep
type - added
recast()
operator - added
validate()
operator - added
ValidationPipelineStep
type
- added
- OptionTypes
- added
AppErrorOr
option type
- added
- Protocols
- added
Stack
protocol - added
implementsStack()
type guard - added
ToString
protocol - added
implementsToString()
type guard - added
implementsOwnOrInheritedToString()
type guard
- added
- RefinedTypes
- added
AnyPrimitiveType
type - added
AnyRefinedPrimitive
type - added
AnyRefinedNumber
type - added
AnyRefinedString
type - added
AnyRefinedType
type - added
RefinedNumber
type - added
RefinedPrimitive
type - added
RefinedString
type - added
RefinedType
type
- added
- SupportingTypes
- DataPath
- added
DEFAULT_DATA_PATH
- added
DataPath
type - added
extendDataPath()
- added
isDataPathData()
data guard - added
makeDataPath()
smart constructor - added
mustBeDataPathData()
data guarantee - added
validateDataPathData()
data validator
- added
- HttpStatusCode
- added
MAKE_HTTP_STATUS_CODE_DEFAULT_OPTIONS
- added
HttpStatusCode
type - added
isHttpStatusCodeData()
data guard - added
makeHttpStatusCode()
smart constructor - added
MakeHttpStatusCodeOptions
data type - added
mustBeHttpStatusCodeData()
data guard - added
validateHttpStatusCodeData()
data validator
- added
- NodeJSModuleName
- added
MAKE_NODEJS_MODULE_NAME_DEFAULT_OPTIONS
- added
NodeJSModuleName
type - added
isNodeJSModuleNameData()
data guard - added
makeNodeJSModuleName()
smart constructor - added
MakeNodeJSModuleNameOptions
type - added
mustBeNodeJSModuleName()
data guarantee - added `validateNoteJSModuleNameData() data validator
- added
- DataPath