@dfinity/utils 2.1.2-next-2024-03-18 → 2.1.2-next-2024-03-19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +30 -30
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -90,9 +90,9 @@ Get a default agent that connects to mainnet with the anonymous identity.
90
90
 
91
91
  Create an agent for a given identity
92
92
 
93
- | Function | Type |
94
- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
95
- | `createAgent` | `({ identity, host, fetchRootKey, verifyQuerySignatures, }: { identity: Identity; host?: string; fetchRootKey?: boolean; verifyQuerySignatures?: boolean; }) => Promise<HttpAgent>` |
93
+ | Function | Type |
94
+ | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
95
+ | `createAgent` | `({ identity, host, fetchRootKey, verifyQuerySignatures, }: { identity: Identity; host?: string or undefined; fetchRootKey?: boolean or undefined; verifyQuerySignatures?: boolean or undefined; }) => Promise<HttpAgent>` |
96
96
 
97
97
  Parameters:
98
98
 
@@ -105,17 +105,17 @@ Parameters:
105
105
 
106
106
  #### :gear: createServices
107
107
 
108
- | Function | Type |
109
- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
110
- | `createServices` | `<T>({ options: { canisterId, serviceOverride, certifiedServiceOverride, agent: agentOption, callTransform, queryTransform, }, idlFactory, certifiedIdlFactory, }: { options: Required<Pick<CanisterOptions<T>, "canisterId">> and Omit<CanisterOptions<T>, "canisterId"> & Pick<...>; idlFactory: InterfaceFactory; certifiedId...` |
108
+ | Function | Type |
109
+ | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
110
+ | `createServices` | `<T>({ options: { canisterId, serviceOverride, certifiedServiceOverride, agent: agentOption, callTransform, queryTransform, }, idlFactory, certifiedIdlFactory, }: { options: Required<Pick<CanisterOptions<T>, "canisterId">> and Omit<CanisterOptions<T>, "canisterId"> and Pick<...>; idlFactory: InterfaceFactory; certifiedId...` |
111
111
 
112
112
  [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/utils/src/utils/actor.utils.ts#L13)
113
113
 
114
114
  #### :gear: assertNonNullish
115
115
 
116
- | Function | Type |
117
- | ------------------ | -------------------------------------------------------------------- |
118
- | `assertNonNullish` | `<T>(value: T, message?: string) => asserts value is NonNullable<T>` |
116
+ | Function | Type |
117
+ | ------------------ | --------------------------------------------------------------------------------- |
118
+ | `assertNonNullish` | `<T>(value: T, message?: string or undefined) => asserts value is NonNullable<T>` |
119
119
 
120
120
  [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/utils/src/utils/asserts.utils.ts#L7)
121
121
 
@@ -240,9 +240,9 @@ Parameters:
240
240
 
241
241
  Convert seconds to a human-readable duration, such as "6 days, 10 hours."
242
242
 
243
- | Function | Type |
244
- | ------------------- | ------------------------------------------------------------------------------------ |
245
- | `secondsToDuration` | `({ seconds, i18n, }: { seconds: bigint; i18n?: I18nSecondsToDuration; }) => string` |
243
+ | Function | Type |
244
+ | ------------------- | ------------------------------------------------------------------------------------------------- |
245
+ | `secondsToDuration` | `({ seconds, i18n, }: { seconds: bigint; i18n?: I18nSecondsToDuration or undefined; }) => string` |
246
246
 
247
247
  Parameters:
248
248
 
@@ -252,9 +252,9 @@ Parameters:
252
252
 
253
253
  #### :gear: debounce
254
254
 
255
- | Function | Type |
256
- | ---------- | -------------------------------------------------------------------- |
257
- | `debounce` | `(func: Function, timeout?: number) => (...args: unknown[]) => void` |
255
+ | Function | Type |
256
+ | ---------- | --------------------------------------------------------------------------------- |
257
+ | `debounce` | `(func: Function, timeout?: number or undefined) => (...args: unknown[]) => void` |
258
258
 
259
259
  [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/utils/src/utils/debounce.utils.ts#L2)
260
260
 
@@ -262,9 +262,9 @@ Parameters:
262
262
 
263
263
  Is null or undefined
264
264
 
265
- | Function | Type |
266
- | ----------- | -------------------------------------- |
267
- | `isNullish` | `<T>(argument: T) => argument is null` |
265
+ | Function | Type |
266
+ | ----------- | ------------------------------------------------------------------------ |
267
+ | `isNullish` | `<T>(argument: T or null or undefined) => argument is null or undefined` |
268
268
 
269
269
  [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/utils/src/utils/nullish.utils.ts#L2)
270
270
 
@@ -272,9 +272,9 @@ Is null or undefined
272
272
 
273
273
  Not null and not undefined
274
274
 
275
- | Function | Type |
276
- | ------------ | ------------------------------------------------ |
277
- | `nonNullish` | `<T>(argument: T) => argument is NonNullable<T>` |
275
+ | Function | Type |
276
+ | ------------ | --------------------------------------------------------------------- |
277
+ | `nonNullish` | `<T>(argument: T or null or undefined) => argument is NonNullable<T>` |
278
278
 
279
279
  [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/utils/src/utils/nullish.utils.ts#L7)
280
280
 
@@ -282,25 +282,25 @@ Not null and not undefined
282
282
 
283
283
  Not null and not undefined and not empty
284
284
 
285
- | Function | Type |
286
- | ---------------- | ---------------------------- |
287
- | `notEmptyString` | `(value: string) => boolean` |
285
+ | Function | Type |
286
+ | ---------------- | ------------------------------------------------- |
287
+ | `notEmptyString` | `(value: string or null or undefined) => boolean` |
288
288
 
289
289
  [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/utils/src/utils/nullish.utils.ts#L12)
290
290
 
291
291
  #### :gear: toNullable
292
292
 
293
- | Function | Type |
294
- | ------------ | ----------------------------- |
295
- | `toNullable` | `<T>(value?: T) => [] or [T]` |
293
+ | Function | Type |
294
+ | ------------ | -------------------------------------------------- |
295
+ | `toNullable` | `<T>(value?: T or null or undefined) => [] or [T]` |
296
296
 
297
297
  [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/utils/src/utils/did.utils.ts#L4)
298
298
 
299
299
  #### :gear: fromNullable
300
300
 
301
- | Function | Type |
302
- | -------------- | ---------------------------- |
303
- | `fromNullable` | `<T>(value: [] or [T]) => T` |
301
+ | Function | Type |
302
+ | -------------- | ----------------------------------------- |
303
+ | `fromNullable` | `<T>(value: [] or [T]) => T or undefined` |
304
304
 
305
305
  [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/utils/src/utils/did.utils.ts#L8)
306
306
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dfinity/utils",
3
- "version": "2.1.2-next-2024-03-18",
3
+ "version": "2.1.2-next-2024-03-19",
4
4
  "description": "A collection of utilities and constants for NNS/SNS projects.",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/cjs/index.cjs.js",