Releases: toreda/types
v2.14.0
Added
LangCodeidentifying localization language used in other localization systems.- Entity Lifecycle types:
LifecycleEntity,LifecycleEntityData,LifecycleEntityDelegate, andLifecycleEntityPhase. - Addon Lifecycle types:
LifecycleAddon,LifecycleAddonData,LifecycleAddonDelegate, andLifecycleAddonPhase. cnxWillReconnect,cnxDidReconnect,cnxWillInit,cnxDidInit,cnxWillLoad, andcnxDidLoadadded connection lifecycle flow.
v2.13.1
v2.10.1
Fixed
Iterableincorrectly requiredforEach: ArrayFunc<T, U>which definesforEachas a single array function, when it should have definedArrayFuncas thefnargument applied to each item inforEach.Iterablepreviously required three argumentsItemT,ReturnT, andNextT. The third argumentNextTnow defaults toundefinedand is considered optional.
v2.10.0
v2.9.1
New Types
Runnable<ArgT, ReturnT>interface for classes which implement a runnable task interface.RunnableTask<ArgT, ReturnT>type signature for asynchronous functions invoked byRunnableclasses.RunnableTaskSync<ArgT, ReturnT>type signature for synchronous functions invoked byRunnableclasses. Prefer async tasks whenever possible.
v2.8.0
New Types
Cryptocurrency Units
AAVEADAALGOAPEATOMAVAXAXSBCHBCNBNBBTCBTMBTMBTTBTTBUSDCAKECDAICELCELOCoinsCUSDCDAIDASHDGBDOGEDOTENJEOSETHFILFLOFLOWFTMFTXFTXGALAGRTHashrateHBARKCSKSMLINKLRCLTCLUNAMANAMATICMKRNEARNEXORVNSANDSHIBSOLSTXSYSTokensTRXTUSDUNIUSDCUSDTVETVTCWAVESWBTCWETHZECXLMXMRXRDXRPXTZXVGZENZILICP
Scientific Units
AmperesDegreesKatalsFaradsHertzJoulesKelvinKilogramsMoleNewtonsOhmsRadiansSievertsTelsas
Data Units
BitsBytesKilobytesKilobitsMegabytesGigabytesPetabytesMegabitsGigabitsExabytesTerabytesTerabits
Data-rate Units
bpsBpsMbpsMBpsGbpsGBpsTbpsTBpsPbpsPBps
Size and Distance
Imperial
FeetFluidOuncesGallonsGramsInchesMilesOuncesPoundsYards
Metric
-
Centimeters -
Decimeters -
Femtometers -
Gigameters -
Kilometers -
Megameters -
Meters -
Micrometers -
Micrometers -
Millimeters -
Nanometers -
Picometers -
Terameters -
HashStrto express hash string values. -
HashAlgto express unique identifiers for hashing algorithms, e.g.sha256. Does not comfort to a specific format e.g.sha256vssha-256, only that the stored value uniquely identifies a hashing algorithm. -
FileSizeto express file sizes in bytes or other units. -
PublicKeyto identify properties containing public key data, but does not describe algorithm, length, or other specific properties about the key. -
PrivateKeyto identify properties containing private key data, but does not describe algorithm, length, or other specific properties about the key.
v2.7.0
v2.6.0
Added
LifecycleServerDelegatefor server-side classes using lifecycles.LifecycleClientDelegatefor client-side classes using lifecycles.LifecyclePhaseIdas an expressive type to clarify the purpose of some name & id args used in lifecycle functions.Itorfor Iterators which contain a next call.ItorItemfor values returned byItor.next().Clearablefor objects offering.clear()functionality.Resettablefor objects offering state reset via.reset().Visitor<NodeT>for Visitor functions used in Graph and Tree search algorithms. ReturnsPromise<NodeT | null>, allowing the function to return the next node or indicate there are no more nodes.ArrayFunc<T, U>used by.forEach(...)calls on Iterable objects.
Release v2.4.1
Full Changelog: v1.2.2...v2.4.1
Added
Optional<T, K>generic type which takes an interfaceTto make all properties optional except for one or more keys provided fork. For example:Optional<MyInterface, 'one' | 'two'>makes all properties on interfaceMyInterfaceoptional except for keys which exactly matchoneortwo.
Updated
- All dev packages updated to latest available.
Removed
gulp-eslintis no longer required during build.
Release v1.2.2
Release v1.2.2 focused on reducing the number of dependencies and upgrading packages causing issues further up the dependency chain.
- No changes to exported types.
- Moved
delpackage from dependencies to devDependencies. It's used only during the build. @toreda/build-toolsremoved from dependencies. Build flow converted into a minimal & bare gulp build.- Removed eslint & linting from build flow. Not ideal, but made it possible to eliminate some problematic dependencies.