diff options
| author | bobzel <zzzman@gmail.com> | 2025-03-16 19:02:56 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2025-03-16 19:02:56 -0400 |
| commit | df708c90d8356934d2e3d9123129c761d328c1fe (patch) | |
| tree | 98b0588710ac8ca00c303960da0851614aacf597 /src/extensions/ExtensionsTypings.ts | |
| parent | 7d9fae09e8906e5636f6ea695ad560797b08d023 (diff) | |
| parent | f4042257be7359734a0dd35cedbf03fe4aa14cf1 (diff) | |
Merge branch 'DocCreatorMenu-work' of https://github.com/brown-dash/Dash-Web into DocCreatorMenu-work
Diffstat (limited to 'src/extensions/ExtensionsTypings.ts')
| -rw-r--r-- | src/extensions/ExtensionsTypings.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/extensions/ExtensionsTypings.ts b/src/extensions/ExtensionsTypings.ts index d6ffd3be3..fa8851bb3 100644 --- a/src/extensions/ExtensionsTypings.ts +++ b/src/extensions/ExtensionsTypings.ts @@ -1,6 +1,14 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ interface Array<T> { + /** + * returns the last element of the array or undefined + */ lastElement(): T; + /** + * if val is in the list, it returns its index, otherwise undefined; + * @param val + */ + getIndex(val: T): number | undefined; } interface String { |
