[PR #34] [MERGED] Optional type parameters for DataSnapshot, DataReference, and associated classes/types #34

Closed
opened 2026-05-23 08:37:05 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/appy-one/acebase-core/pull/34
Author: @futurGH
Created: 2/11/2023
Status: Merged
Merged: 4/3/2023
Merged by: @appy-one

Base: masterHead: datareference-datasnapshot-generics


📝 Commits (6)

  • 9b7fd2e Add optional generics to DataSnapshot
  • c4bef58 Add optional generics to DataReference
  • 7dff26f Add DataReferenceQuery#get overloads dependent on options.snapshots
  • e3932ad Add type parameters to a few usages of DataReference & DataSnapshot
  • 8fdaac8 Add type parameters for subscriptions
  • fd53555 Fix DataReference#update parameter type

📊 Changes

22 files changed (+181 additions, -159 deletions)

View changed files

📝 dist/cjs/acebase-base.js.map (+1 -1)
📝 dist/cjs/data-reference.js (+1 -1)
📝 dist/cjs/data-reference.js.map (+1 -1)
📝 dist/cjs/data-snapshot.js.map (+1 -1)
📝 dist/cjs/subscription.js.map (+1 -1)
📝 dist/esm/acebase-base.js.map (+1 -1)
📝 dist/esm/data-reference.js (+1 -1)
📝 dist/esm/data-reference.js.map (+1 -1)
📝 dist/esm/data-snapshot.js.map (+1 -1)
📝 dist/esm/subscription.js.map (+1 -1)
📝 dist/types/acebase-base.d.ts (+1 -1)
📝 dist/types/acebase-base.d.ts.map (+1 -1)
📝 dist/types/data-reference.d.ts (+58 -46)
📝 dist/types/data-reference.d.ts.map (+1 -1)
📝 dist/types/data-snapshot.d.ts (+16 -15)
📝 dist/types/data-snapshot.d.ts.map (+1 -1)
📝 dist/types/subscription.d.ts (+1 -1)
📝 dist/types/subscription.d.ts.map (+1 -1)
📝 src/acebase-base.ts (+1 -1)
📝 src/data-reference.ts (+65 -57)

...and 2 more files

📄 Description

Closes #20.

Type parameters were added to methods in data-snapshot.ts and data-reference.ts where it seemed to make sense. All type parameters default to any, so existing code will continue to function as is.

There are quite a few as any assertions added in, but we're really just moving the assertions from user code to hidden within the library.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/appy-one/acebase-core/pull/34 **Author:** [@futurGH](https://github.com/futurGH) **Created:** 2/11/2023 **Status:** ✅ Merged **Merged:** 4/3/2023 **Merged by:** [@appy-one](https://github.com/appy-one) **Base:** `master` ← **Head:** `datareference-datasnapshot-generics` --- ### 📝 Commits (6) - [`9b7fd2e`](https://github.com/appy-one/acebase-core/commit/9b7fd2e881fd14ce8f6573d997c45ea6278f6deb) Add optional generics to DataSnapshot - [`c4bef58`](https://github.com/appy-one/acebase-core/commit/c4bef58de1f2320fcd1b765646d26fd679282b3d) Add optional generics to DataReference - [`7dff26f`](https://github.com/appy-one/acebase-core/commit/7dff26f70fcc4c1bc6ef09e1206a147f8abb98bc) Add DataReferenceQuery#get overloads dependent on options.snapshots - [`e3932ad`](https://github.com/appy-one/acebase-core/commit/e3932adb7135d17469388a4aaa9ee997ae77819f) Add type parameters to a few usages of DataReference & DataSnapshot - [`8fdaac8`](https://github.com/appy-one/acebase-core/commit/8fdaac823d94d387b5722f70889c858bb27f9841) Add type parameters for subscriptions - [`fd53555`](https://github.com/appy-one/acebase-core/commit/fd53555b447f118043acdcddb2150148c303b927) Fix DataReference#update parameter type ### 📊 Changes **22 files changed** (+181 additions, -159 deletions) <details> <summary>View changed files</summary> 📝 `dist/cjs/acebase-base.js.map` (+1 -1) 📝 `dist/cjs/data-reference.js` (+1 -1) 📝 `dist/cjs/data-reference.js.map` (+1 -1) 📝 `dist/cjs/data-snapshot.js.map` (+1 -1) 📝 `dist/cjs/subscription.js.map` (+1 -1) 📝 `dist/esm/acebase-base.js.map` (+1 -1) 📝 `dist/esm/data-reference.js` (+1 -1) 📝 `dist/esm/data-reference.js.map` (+1 -1) 📝 `dist/esm/data-snapshot.js.map` (+1 -1) 📝 `dist/esm/subscription.js.map` (+1 -1) 📝 `dist/types/acebase-base.d.ts` (+1 -1) 📝 `dist/types/acebase-base.d.ts.map` (+1 -1) 📝 `dist/types/data-reference.d.ts` (+58 -46) 📝 `dist/types/data-reference.d.ts.map` (+1 -1) 📝 `dist/types/data-snapshot.d.ts` (+16 -15) 📝 `dist/types/data-snapshot.d.ts.map` (+1 -1) 📝 `dist/types/subscription.d.ts` (+1 -1) 📝 `dist/types/subscription.d.ts.map` (+1 -1) 📝 `src/acebase-base.ts` (+1 -1) 📝 `src/data-reference.ts` (+65 -57) _...and 2 more files_ </details> ### 📄 Description Closes #20. Type parameters were added to methods in `data-snapshot.ts` and `data-reference.ts` where it seemed to make sense. All type parameters default to `any`, so existing code will continue to function as is. There are quite a few `as any` assertions added in, but we're really just moving the assertions from user code to hidden within the library. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-23 08:37:05 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/acebase-core#34
No description provided.