Releases: toreda/types
v2.14.0
Added
LangCode
identifying 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
, andcnxDidLoad
added connection lifecycle flow.
v2.13.1
v2.10.1
Fixed
Iterable
incorrectly requiredforEach: ArrayFunc<T, U>
which definesforEach
as a single array function, when it should have definedArrayFunc
as thefn
argument applied to each item inforEach
.Iterable
previously required three argumentsItemT
,ReturnT
, andNextT
. The third argumentNextT
now defaults toundefined
and 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 byRunnable
classes.RunnableTaskSync<ArgT, ReturnT>
type signature for synchronous functions invoked byRunnable
classes. Prefer async tasks whenever possible.
v2.8.0
New Types
Cryptocurrency Units
AAVE
ADA
ALGO
APE
ATOM
AVAX
AXS
BCH
BCN
BNB
BTC
BTM
BTM
BTT
BTT
BUSD
CAKE
CDAI
CEL
CELO
Coins
CUSDC
DAI
DASH
DGB
DOGE
DOT
ENJ
EOS
ETH
FIL
FLO
FLOW
FTM
FTX
FTX
GALA
GRT
Hashrate
HBAR
KCS
KSM
LINK
LRC
LTC
LUNA
MANA
MATIC
MKR
NEAR
NEXO
RVN
SAND
SHIB
SOL
STX
SYS
Tokens
TRX
TUSD
UNI
USDC
USDT
VET
VTC
WAVES
WBTC
WETH
ZEC
XLM
XMR
XRD
XRP
XTZ
XVG
ZEN
ZIL
ICP
Scientific Units
Amperes
Degrees
Katals
Farads
Hertz
Joules
Kelvin
Kilograms
Mole
Newtons
Ohms
Radians
Sieverts
Telsas
Data Units
Bits
Bytes
Kilobytes
Kilobits
Megabytes
Gigabytes
Petabytes
Megabits
Gigabits
Exabytes
Terabytes
Terabits
Data-rate Units
bps
Bps
Mbps
MBps
Gbps
GBps
Tbps
TBps
Pbps
PBps
Size and Distance
Imperial
Feet
FluidOunces
Gallons
Grams
Inches
Miles
Ounces
Pounds
Yards
Metric
-
Centimeters
-
Decimeters
-
Femtometers
-
Gigameters
-
Kilometers
-
Megameters
-
Meters
-
Micrometers
-
Micrometers
-
Millimeters
-
Nanometers
-
Picometers
-
Terameters
-
HashStr
to express hash string values. -
HashAlg
to express unique identifiers for hashing algorithms, e.g.sha256
. Does not comfort to a specific format e.g.sha256
vssha-256
, only that the stored value uniquely identifies a hashing algorithm. -
FileSize
to express file sizes in bytes or other units. -
PublicKey
to identify properties containing public key data, but does not describe algorithm, length, or other specific properties about the key. -
PrivateKey
to 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
LifecycleServerDelegate
for server-side classes using lifecycles.LifecycleClientDelegate
for client-side classes using lifecycles.LifecyclePhaseId
as an expressive type to clarify the purpose of some name & id args used in lifecycle functions.Itor
for Iterators which contain a next call.ItorItem
for values returned byItor.next()
.Clearable
for objects offering.clear()
functionality.Resettable
for 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 interfaceT
to make all properties optional except for one or more keys provided fork
. For example:Optional<MyInterface, 'one' | 'two'>
makes all properties on interfaceMyInterface
optional except for keys which exactly matchone
ortwo
.
Updated
- All dev packages updated to latest available.
Removed
gulp-eslint
is 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
del
package from dependencies to devDependencies. It's used only during the build. @toreda/build-tools
removed 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.