@arcgis/toolkit 5.2.0-next.14 → 5.2.0-next.141

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 (41) hide show
  1. package/LICENSE.md +4 -2
  2. package/README.md +2 -2
  3. package/dist/{array/index.d.ts → array.d.ts} +4 -1
  4. package/dist/{dom/index.js → chunks/dom.js} +34 -48
  5. package/dist/dom/color.d.ts +56 -0
  6. package/dist/dom/color.js +37 -0
  7. package/dist/dom/referenceElement.d.ts +17 -0
  8. package/dist/dom/referenceElement.js +5 -0
  9. package/dist/dom/slots.d.ts +8 -0
  10. package/dist/dom/slots.js +39 -0
  11. package/dist/dom.d.ts +186 -0
  12. package/dist/dom.js +22 -0
  13. package/dist/{error/index.d.ts → error.d.ts} +15 -4
  14. package/dist/{error/index.js → error.js} +1 -1
  15. package/dist/{function/index.d.ts → function.d.ts} +4 -1
  16. package/dist/intl/dom.d.ts +80 -0
  17. package/dist/intl/{index.js → dom.js} +40 -36
  18. package/dist/intl.d.ts +89 -0
  19. package/dist/intl.js +10 -0
  20. package/dist/{log/index.d.ts → log.d.ts} +38 -6
  21. package/dist/{number/index.d.ts → number.d.ts} +2 -1
  22. package/dist/predicate.d.ts +27 -0
  23. package/dist/predicate.js +8 -0
  24. package/dist/{promise/index.d.ts → promise.d.ts} +28 -1
  25. package/dist/{promise/index.js → promise.js} +24 -1
  26. package/dist/{string/index.d.ts → string.d.ts} +40 -3
  27. package/dist/{type/index.d.ts → type.d.ts} +11 -1
  28. package/dist/{url/index.d.ts → url.d.ts} +4 -3
  29. package/package.json +17 -13
  30. package/dist/dom/index.d.ts +0 -117
  31. package/dist/dom/reference-element.d.ts +0 -6
  32. package/dist/intl/index.d.ts +0 -124
  33. package/dist/predicate/index.d.ts +0 -24
  34. package/dist/predicate/index.js +0 -8
  35. /package/dist/{array/index.js → array.js} +0 -0
  36. /package/dist/{function/index.js → function.js} +0 -0
  37. /package/dist/{log/index.js → log.js} +0 -0
  38. /package/dist/{number/index.js → number.js} +0 -0
  39. /package/dist/{string/index.js → string.js} +0 -0
  40. /package/dist/{type/index.js → type.js} +0 -0
  41. /package/dist/{url/index.js → url.js} +0 -0
@@ -1,6 +1,8 @@
1
1
  /**
2
2
  * Convert kebab-case string to PascalCase
3
3
  *
4
+ * @public
5
+ * @param string
4
6
  * @example
5
7
  * ```ts
6
8
  * const pascal = kebabToPascal("my-component-name");
@@ -10,6 +12,8 @@ export declare const kebabToPascal: (string: string) => string;
10
12
  /**
11
13
  * Convert camelCase string to kebab-case
12
14
  *
15
+ * @public
16
+ * @param string
13
17
  * @example
14
18
  * ```ts
15
19
  * const kebab = camelToKebab("myComponentName");
@@ -20,6 +24,8 @@ export declare const camelToKebab: (string: string) => string;
20
24
  /**
21
25
  * Convert camelCase string to Sentence case.
22
26
  *
27
+ * @public
28
+ * @param string
23
29
  * @example
24
30
  * ```ts
25
31
  * const human = camelToHuman("myComponentName");
@@ -27,26 +33,44 @@ export declare const camelToKebab: (string: string) => string;
27
33
  * ```
28
34
  */
29
35
  export declare const camelToHuman: (string: string) => string;
30
- /** Capitalize the first letter of a string. */
36
+ /**
37
+ * Capitalize the first letter of a string.
38
+ *
39
+ * @public
40
+ * @param string
41
+ */
31
42
  export declare const capitalize: <T extends string>(string: T) => Capitalize<T>;
32
- /** Uncapitalize the first letter of a string. */
43
+ /**
44
+ * Uncapitalize the first letter of a string.
45
+ *
46
+ * @public
47
+ * @param string
48
+ */
33
49
  export declare const uncapitalize: <T extends string>(string: T) => Uncapitalize<T>;
34
50
  /**
35
51
  * Add quotes to a string for display purposes.
36
52
  * If the string contains a double quote, then single quotes will be used.
37
53
  * If the string contains a single quote, then double quotes will be used.
38
54
  * If the string contains both, then double quotes will be used and the single quotes will be escaped.
55
+ *
56
+ * @public
57
+ * @param value
39
58
  */
40
59
  export declare const quoteString: (value: string) => string;
41
60
  /**
42
61
  * Create a filter expression from a filter word.
43
62
  *
44
- * @remarks Once browser support permits, use `RegExp.escape()` instead.
63
+ * > Once browser support permits, use `RegExp.escape()` instead.
64
+ *
65
+ * @public
66
+ * @param filterWord
45
67
  * @privateRemarks TODO: DEPRECATE
46
68
  */
47
69
  export declare const createFilterExpression: (filterWord: string) => RegExp;
48
70
  /**
49
71
  * Add LTR marks to a string to ensure it is displayed as LTR even in RTL contexts.
72
+ *
73
+ * @public
50
74
  * @param value The string to add LTR marks to.
51
75
  * @returns The string with LTR marks.
52
76
  *
@@ -58,6 +82,8 @@ export declare const createFilterExpression: (filterWord: string) => RegExp;
58
82
  export declare const addLtrMark: (value: string | undefined) => string;
59
83
  /**
60
84
  * A string containing a randomly generated, 36 character long v4 UUID.
85
+ *
86
+ * @public
61
87
  */
62
88
  export type UUID = ReturnType<typeof crypto.randomUUID>;
63
89
  /**
@@ -69,6 +95,7 @@ export type UUID = ReturnType<typeof crypto.randomUUID>;
69
95
  * Avoid using GUID and other non-deterministic output in render() as they
70
96
  * cause SSR hydration issues and snapshot test instability.
71
97
  *
98
+ * @public
72
99
  * @example
73
100
  * ```ts
74
101
  * const id = generateGuid();
@@ -79,6 +106,8 @@ export declare const generateGuid: () => UUID;
79
106
  /**
80
107
  * Extract the major and minor version from a full version string.
81
108
  *
109
+ * @public
110
+ * @param version
82
111
  * @example
83
112
  * ```ts
84
113
  * const minorVersion = getMinorVersion("4.34.0-next.123");
@@ -93,6 +122,8 @@ export declare const getMinorVersion: (version: string) => string;
93
122
  * The version number should normally come from package.json.
94
123
  *
95
124
  * @see https://webgis.esri.com/sdk/contributing/licensing
125
+ * @public
126
+ * @param version
96
127
  * @example
97
128
  * ```ts
98
129
  * const preamble = getPreamble("5.0.1-next.456");
@@ -104,6 +135,9 @@ export declare const getPreamble: (version: string) => string;
104
135
  * Replace values in a string using the format {valueName} with the value from the values object.
105
136
  * If the value is not found in the values object, then the value is not replaced.
106
137
  *
138
+ * @public
139
+ * @param message
140
+ * @param values
107
141
  * @deprecated Import from https://next.gha.afd.arcgis.com/javascript/latest/references/core/intl/#substitute instead
108
142
  */
109
143
  export declare const setValuesInString: (message: string | null | undefined, values?: Record<string, string>) => string;
@@ -113,6 +147,9 @@ export declare const setValuesInString: (message: string | null | undefined, val
113
147
  *
114
148
  * Throws when the named region cannot be found or is missing its closing marker.
115
149
  *
150
+ * @public
151
+ * @param source
152
+ * @param regionName
116
153
  * @example
117
154
  * ```ts
118
155
  * import code from "my-code-file.ts?raw";
@@ -1,15 +1,24 @@
1
1
  /**
2
2
  * A convenient alias for `null | undefined`.
3
- * @remarks Named `nil` over `Nil` as per https://devtopia.esri.com/WebGIS/arcgis-js-api/pull/66920
3
+ *
4
+ * > Named `nil` over `Nil` as per https://devtopia.esri.com/WebGIS/arcgis-js-api/pull/66920
5
+ *
6
+ * @public
4
7
  */
5
8
  export type nil = null | undefined;
6
9
  /**
10
+ * @public
7
11
  * @deprecated import type { ResourceHandle } from "@arcgis/core/core/Handles.js";
8
12
  */
9
13
  export type IHandle = {
14
+ /**
15
+ * @public
16
+ * @deprecated import type { ResourceHandle } from "@arcgis/core/core/Handles.js";
17
+ */
10
18
  remove: () => void;
11
19
  };
12
20
  /**
21
+ * @public
13
22
  * @deprecated Import type { nil } from `@arcgis/toolkit/type` instead
14
23
  */
15
24
  export type Nil = nil;
@@ -23,6 +32,7 @@ export type Nil = nil;
23
32
  * During production end-application build, such type tests will be removed as
24
33
  * they have no runtime impact.
25
34
  *
35
+ * @public
26
36
  * @privateRemarks
27
37
  * Using `0` over `undefined` to take fewer bytes if minifier is disabled.
28
38
  */
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * Compares two url strings for their origin and returns true if they have the same origin.
3
3
  *
4
+ * @public
4
5
  * @param url1 First url string
5
6
  * @param url2 Second url string
6
7
  * @param ignoreProtocol Indicates if protocol comparison should be ignored
@@ -9,10 +10,10 @@
9
10
  export declare const hasSameOrigin: (url1: string | null | undefined, url2: string | null | undefined, ignoreProtocol?: boolean) => boolean;
10
11
  /**
11
12
  * Tests if a url string is a URL or not.
13
+ *
14
+ * @public
15
+ * @deprecated Use https://developer.mozilla.org/docs/Web/API/URL/parse_static instead
12
16
  * @param url The url string to test
13
17
  * @returns True if the string is a URL.
14
- *
15
- * @remarks If browser support permits, use https://developer.mozilla.org/docs/Web/API/URL/parse_static instead
16
- * @privateRemarks TODO: DEPRECATE
17
18
  */
18
19
  export declare const isURL: (url: string) => boolean;
package/package.json CHANGED
@@ -1,23 +1,27 @@
1
1
  {
2
2
  "name": "@arcgis/toolkit",
3
- "version": "5.2.0-next.14",
3
+ "version": "5.2.0-next.141",
4
4
  "description": "Collection of common internal patterns and utilities for ArcGIS Maps SDK for JavaScript components.",
5
5
  "homepage": "https://developers.arcgis.com/javascript/latest/",
6
6
  "sideEffects": false,
7
7
  "type": "module",
8
8
  "exports": {
9
- "./array": "./dist/array/index.js",
10
- "./dom": "./dist/dom/index.js",
11
- "./error": "./dist/error/index.js",
12
- "./function": "./dist/function/index.js",
13
- "./intl": "./dist/intl/index.js",
14
- "./log": "./dist/log/index.js",
15
- "./number": "./dist/number/index.js",
16
- "./predicate": "./dist/predicate/index.js",
17
- "./promise": "./dist/promise/index.js",
18
- "./string": "./dist/string/index.js",
19
- "./type": "./dist/type/index.js",
20
- "./url": "./dist/url/index.js",
9
+ "./array": "./dist/array.js",
10
+ "./dom": "./dist/dom.js",
11
+ "./dom/color": "./dist/dom/color.js",
12
+ "./dom/slots": "./dist/dom/slots.js",
13
+ "./dom/referenceElement": "./dist/dom/referenceElement.js",
14
+ "./error": "./dist/error.js",
15
+ "./function": "./dist/function.js",
16
+ "./intl": "./dist/intl.js",
17
+ "./intl/dom": "./dist/intl/dom.js",
18
+ "./log": "./dist/log.js",
19
+ "./number": "./dist/number.js",
20
+ "./predicate": "./dist/predicate.js",
21
+ "./promise": "./dist/promise.js",
22
+ "./string": "./dist/string.js",
23
+ "./type": "./dist/type.js",
24
+ "./url": "./dist/url.js",
21
25
  "./package.json": "./package.json"
22
26
  },
23
27
  "files": [
@@ -1,117 +0,0 @@
1
- import { nil } from '../type/index.ts';
2
- export * from './slots.ts';
3
- export * from './reference-element.ts';
4
- /**
5
- * Combine multiple class names into a single string.
6
- *
7
- * @remarks
8
- * This function is less necessary in Lumina packages as the `class` JSX prop
9
- * accepts `Record<string, boolean>` objects.
10
- */
11
- export declare const classes: (...classes: (nil | Record<string, boolean> | string[] | string | false)[]) => string;
12
- /**
13
- * Observe the element and its ancestors for attribute mutations.
14
- * If the attributes have been changed in the ancestor tree then the callback
15
- * will be invoked.
16
- *
17
- * @param element The element on which to observe the attribute mutations.
18
- * @param attributeFilter The list of attributes to observe.
19
- * @param callback The callback to invoke when the attributes have been changed.
20
- * @returns A callback to unsubscribe from the observer.
21
- *
22
- * @example
23
- * ```ts
24
- * observeAncestorsMutation(
25
- * element,
26
- * ["dir", "lang"],
27
- * () => console.log(getElementAttribute(element, "dir", "ltr"))
28
- * );
29
- * ```
30
- */
31
- export declare const observeAncestorsMutation: (element: Node, attributeFilter: string[], callback: () => void) => (() => void);
32
- /**
33
- * Find the closest element that matches the selector.
34
- * It will traverse the element's ancestors to find the target element.
35
- * Shadow DOM boundaries are also taken into account.
36
- * @param base The element to start the search from.
37
- * @param selector The selector to match.
38
- * @returns The closest element that matches the selector or null if not found.
39
- *
40
- * @remarks
41
- * This is similar to [Element.closest()](https://developer.mozilla.org/docs/Web/API/Element/closest),
42
- * but the DOM's utility only looks up until the first shadow boundary.
43
- *
44
- * @example
45
- * ```ts
46
- * const hostElement = getClosestElement(element, "arcgis-map, arcgis-scene");
47
- * ```
48
- */
49
- export declare const getClosestElement: <T = Element>(base: Element, selector: string) => T | undefined;
50
- /**
51
- * Use the closest Calcite mode class name to determine the
52
- * theme of the element. It will traverse the element's
53
- * ancestors to find the theme. Shadow DOM boundaries are also
54
- * taken into account.
55
- *
56
- * @param base The element to start the search from.
57
- * @returns The theme of the element ("light" or "dark"). "light" is the default.
58
- *
59
- * @remarks
60
- * It is advised to consider alternative solutions before using this utility:
61
- * - Calcite CSS variables. Benefits: makes styles more consistent,
62
- * and variables are updated automatically to match dark/light theme.
63
- * - Detect dark mode using CSS selectors and apply styles in CSS.
64
- * Benefit: styles update automatically when the theme changes.
65
- */
66
- export declare function unsafeGetCalciteModeName(el: HTMLElement): "dark" | "light";
67
- /**
68
- * Get direction property of the closest element.
69
- *
70
- * @param el The element to start the search from.
71
- * @returns The direction of the element ("ltr" | "rtl"). "ltr" is the default.
72
- *
73
- * @remarks
74
- * Do not set the `dir` property on the element itself. Do not set the `dir`
75
- * attribute on the components you are rendering. The `dir` attribute is only
76
- * meant to be set by the consumers of your component. Your component is
77
- * expected to respect what was set by the consumer.
78
- *
79
- * @remarks
80
- * Prefer [useDirection()](https://webgis.esri.com/references/lumina/controllers/useDirection)
81
- * to ensure your component is responsive to direction changes.
82
- */
83
- export declare const unsafeGetElementDirection: (el: HTMLElement) => "ltr" | "rtl";
84
- /**
85
- * Get the attribute value from the element or closest ancestor.
86
- * Shadow DOM boundaries are also taken into account.
87
- * If the attribute is not found then the fallback value is returned.
88
- *
89
- * @example
90
- * ```ts
91
- * const dir = getElementAttribute(element, "dir", "ltr");
92
- * ```
93
- */
94
- export declare const getElementAttribute: (el: Element, attributeName: string, fallbackValue: string) => string;
95
- /**
96
- * Focus the element if it is focusable.
97
- * @returns A promise that resolves once the focus is set.
98
- */
99
- export declare const focusElement: (el: FocusableElement | undefined) => Promise<void>;
100
- export interface FocusableElement extends HTMLElement {
101
- setFocus?: () => Promise<void>;
102
- }
103
- /**
104
- * Set the focus on the element that matches the selector.
105
- * It will traverse the element's ancestors to find the target element.
106
- * Shadow DOM boundaries are also taken into account.
107
- * If the element is not found then the focus is not set.
108
- * Example: `setFocusOnElement(element, "[role='menuitem']");`
109
- * @param ref The element to start the search from.
110
- * @param selector The selector to match.
111
- * @returns Returns true if the focus is set on the element.
112
- *
113
- * @deprecated This function is doing too much. Import from `focusElement(getClosestElement())` from `@arcgis/toolkit/dom` instead.
114
- */
115
- export declare const setFocusOnElement: (ref: (Element & {
116
- componentOnReady?: () => Promise<void>;
117
- }) | null | undefined, selector: string) => void;
@@ -1,6 +0,0 @@
1
- type ArcgisComponentBase<T> = {
2
- el: HTMLElement;
3
- referenceElement?: T | string | null | undefined;
4
- };
5
- export declare function resolveReferenceElement<T extends Element>(component: ArcgisComponentBase<T>, referenceElementString?: ArcgisComponentBase<T>["referenceElement"] | string): T | undefined;
6
- export {};
@@ -1,124 +0,0 @@
1
- declare const supportedLocalesArray: ["ar", "bg", "bs", "ca", "cs", "da", "de", "el", "en", "es", "et", "fi", "fr", "he", "hr", "hu", "id", "it", "ja", "ko", "lt", "lv", "nl", "nb", "no", "pl", "pt-BR", "pt-PT", "ro", "ru", "sk", "sl", "sr", "sv", "th", "tr", "uk", "vi", "zh-CN", "zh-HK", "zh-TW"];
2
- /**
3
- * The list of supported locales for ArcGIS Maps SDK for JavaScript components.
4
- */
5
- export declare const supportedLocales: Set<"hr" | "th" | "tr" | "el" | "ar" | "bg" | "bs" | "ca" | "cs" | "da" | "de" | "en" | "es" | "et" | "fi" | "fr" | "he" | "hu" | "id" | "it" | "ja" | "ko" | "lt" | "lv" | "nl" | "nb" | "no" | "pl" | "pt-BR" | "pt-PT" | "ro" | "ru" | "sk" | "sl" | "sr" | "sv" | "uk" | "vi" | "zh-CN" | "zh-HK" | "zh-TW">;
6
- /**
7
- * TypeScript union type for each locale supported by WebGIS SDK
8
- */
9
- export type SupportedLocale = (typeof supportedLocalesArray)[number];
10
- /**
11
- * The default locale for WebGIS SDK.
12
- */
13
- export declare const defaultLocale = "en";
14
- /**
15
- * Fetch the T9N strings bundle for the given locale, assets path and prefix.
16
- * The locale must be one of the supported locales.
17
- * If the locale is not supported, it will default to 'en'.
18
- * If the T9N strings bundle cannot be found, it will default to 'en'.
19
- *
20
- * @param locale The locale for which to fetch the T9N strings
21
- * @param assetsPath The path to the assets folder where the T9N strings are located
22
- * @param prefix The prefix to use for the T9N strings file name.
23
- *
24
- * @remarks
25
- * Rather than using this function directly, prefer the
26
- * [useT9n()](https://webgis.esri.com/references/lumina/controllers/useT9n)
27
- * controller.
28
- *
29
- * @remarks
30
- * The function implements cache. Frequent calls are safe.
31
- *
32
- * @example
33
- * ```ts
34
- * // Will make a request for ./assets/coding-editor/t9n/messages.en.json
35
- * const t9nStrings = await fetchT9nStringsBundle(
36
- * "en",
37
- * getAssetPath("./assets/coding-editor/t9n"),
38
- * "messages."
39
- * );
40
- * ```
41
- *
42
- * @see [Lumina asset handling](https://webgis.esri.com/references/lumina/assets)
43
- */
44
- export declare const fetchT9nStringsBundle: <Strings extends GenericT9nStrings>(locale: string, assetsPath: string, prefix?: string) => Promise<Strings>;
45
- /**
46
- * The interface for translated strings.
47
- */
48
- export interface GenericT9nStrings {
49
- [key: string]: GenericT9nStrings | string;
50
- }
51
- /**
52
- * Get the locale of the given element.
53
- * It will look for the lang attribute on the element and its ancestors.
54
- * If not lang is found, it will default to 'en'.
55
- *
56
- * @returns an object with the `lang` and `t9nLocale` properties.
57
- *
58
- * @see [lang vs t9nLocale](https://webgis.esri.com/references/lumina/controllers/useT9n#difference-between-lang-and-t9nlocale).
59
- */
60
- export declare const getElementLocale: (element: HTMLElement) => {
61
- readonly lang: string;
62
- readonly t9nLocale: SupportedLocale;
63
- };
64
- /**
65
- * Try to parse any language string into one of the locales supported by WebGIS SDK.
66
- *
67
- * @remarks
68
- * Follows the ArcGIS Maps SDK for JavaScript locale support:
69
- * https://developers.arcgis.com/javascript/latest/localization/#locale-support
70
- *
71
- * If language includes a region code, but we don't have a bundle for it, the
72
- * language is normalized to the language code only.
73
- */
74
- export declare const normalizeLocale: (lang: string) => SupportedLocale;
75
- export interface LocaleObserverResult<Strings extends GenericT9nStrings = GenericT9nStrings> {
76
- /** The T9N strings of the component */
77
- t9nStrings: Strings;
78
- /**
79
- * The locale of the component set by the `lang` attribute on the component host element or one of its ancestors.
80
- */
81
- lang: string;
82
- /**
83
- * The locale used by the component to load the T9N strings.
84
- * It may be different than the locale of the component host element that was set by the `lang` attribute.
85
- */
86
- t9nLocale: SupportedLocale;
87
- }
88
- /**
89
- * Start the locale observer for the given component.
90
- * The callback will be called when the locale changes for the component.
91
- * It will observe the lang attribute on the component and its ancestors.
92
- * The callback is called once at the beginning.
93
- *
94
- * @param element The HTML element that is doing the fetching
95
- * This is used to determine the locale to fetch, observe the `lang` attribute
96
- * changes, and is used as the default value for the `assetName` parameter.
97
- * @param getAssetsPath The callback to get path to the assets folder where the
98
- * T9N strings are located.
99
- * @param onUpdated The callback to call when the locale changes.
100
- * @param assetName Optionally override the asset file name.
101
- * Default file name is the element tag name without the part before the
102
- * first dash (e.g. `arcgis-map` becomes `map`).
103
- *
104
- * Set to null if the component has no localization strings, but you still
105
- * wish to use `startLocaleObserver` to get the locale information.
106
- *
107
- * @remarks
108
- * Rather than using this function directly, prefer the
109
- * [useT9n()](https://webgis.esri.com/references/lumina/controllers/useT9n)
110
- * controller.
111
- *
112
- * @example
113
- * ```ts
114
- * const observer = startLocaleObserver(
115
- * element,
116
- * () => getAssetPath("./assets"),
117
- * ({ strings, lang, t9nLocale }) => console.log({ strings, lang, t9nLocale }),
118
- * );
119
- * // Later: cleanup
120
- * observer();
121
- * ```
122
- */
123
- export declare const startLocaleObserver: <Strings extends GenericT9nStrings = GenericT9nStrings>(element: HTMLElement, getAssetsPath: () => string, onUpdated: (payload: LocaleObserverResult<Strings>) => void, assetName?: string | null) => (() => void);
124
- export {};
@@ -1,24 +0,0 @@
1
- import { nil } from '../type/index.ts';
2
- /**
3
- * Safeguard to ensure that an item is not undefined.
4
- * @param item The item to check.
5
- * @returns Returns true if the item is not undefined.
6
- * @example
7
- * ```ts
8
- * const arr = [1, undefined, 3];
9
- * const result = arr.filter(isNotUndefined);
10
- * ```
11
- */
12
- export declare const isNotUndefined: <T>(item: T | undefined) => item is T;
13
- /**
14
- * Safeguard to ensure that an item is not null.
15
- * @param item The item to check.
16
- * @returns Returns true if the item is not null.
17
- */
18
- export declare const isNotNull: <T>(item: T | null) => item is T;
19
- /**
20
- * Safeguard to ensure that an item is not null.
21
- * @param item The item to check.
22
- * @returns Returns true if the item is not and not undefined and not null.
23
- */
24
- export declare const isNotNil: <T>(x: nil | T) => x is T;
@@ -1,8 +0,0 @@
1
- const isNotUndefined = (item) => item !== void 0;
2
- const isNotNull = (item) => item !== null;
3
- const isNotNil = (x) => x != null;
4
- export {
5
- isNotNil,
6
- isNotNull,
7
- isNotUndefined
8
- };
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes