Remove backbone as a dependency

Co-authored-by: Yash <yash@signal.org>
Co-authored-by: ayumi-signal <143036029+ayumi-signal@users.noreply.github.com>
Co-authored-by: Jamie Kyle <113370520+jamiebuilds-signal@users.noreply.github.com>
Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
Co-authored-by: trevor-signal <131492920+trevor-signal@users.noreply.github.com>
This commit is contained in:
Scott Nonnenberg
2025-08-12 06:55:29 +10:00
parent 4fc9793cae
commit 237e239e05
69 changed files with 963 additions and 2110 deletions
-49
View File
@@ -1,49 +0,0 @@
diff --git a/index.d.ts b/index.d.ts
index 15d9d4b..a431841 100644
--- a/index.d.ts
+++ b/index.d.ts
@@ -66,7 +66,7 @@ declare namespace Backbone {
collection?: Collection<TModel> | undefined;
}
- type CombinedModelConstructorOptions<E, M extends Model<any, any, E> = Model> = ModelConstructorOptions<M> & E;
+ type CombinedModelConstructorOptions<E, M extends Model<any, any, E> = Model<any, any, E>> = ModelConstructorOptions<M> & E;
interface ModelSetOptions extends Silenceable, Validable {}
@@ -204,7 +204,7 @@ declare namespace Backbone {
*/
static extend(properties: any, classProperties?: any): any;
- attributes: Partial<T>;
+ attributes: T;
changed: Partial<T>;
cidPrefix: string;
cid: string;
@@ -220,7 +220,7 @@ declare namespace Backbone {
* That works only if you set it in the constructor or the initialize method.
*/
defaults(): Partial<T>;
- id: string | number;
+ id: string;
idAttribute: string;
validationError: any;
@@ -251,7 +251,7 @@ declare namespace Backbone {
* return super.get("name");
* }
*/
- get<A extends _StringKey<T>>(attributeName: A): T[A] | undefined;
+ get<A extends _StringKey<T>>(attributeName: A): T[A];
/**
* For strongly-typed assignment of attributes, use the `set` method only privately in public setter properties.
@@ -285,7 +285,7 @@ declare namespace Backbone {
previousAttributes(): Partial<T>;
save(attributes?: Partial<T> | null, options?: ModelSaveOptions): JQueryXHR;
unset(attribute: _StringKey<T>, options?: Silenceable): this;
- validate(attributes: Partial<T>, options?: any): any;
+ validate(attributes: T, options?: any): any;
private _validate(attributes: Partial<T>, options: any): boolean;
// mixins from underscore
File diff suppressed because one or more lines are too long