@@ -121,7 +121,7 @@ export const applyModelConfig = <T extends typeof JSORMBase>(
121
121
config = { ...config } // clone since we're going to mutate it
122
122
123
123
// Handle all JWT configuration at once since it's run-order dependent
124
- // We'll delete each key we encounter then pass the rest off to
124
+ // We'll delete each key we encounter then pass the rest off to
125
125
// a loop for assigning other arbitrary options
126
126
if ( config . credentialStorageBackend ) {
127
127
ModelClass . credentialStorageBackend = config . credentialStorageBackend
@@ -384,9 +384,9 @@ export class JSORMBase {
384
384
stale : boolean = false
385
385
storeKey : string = ""
386
386
387
- @nonenumerable afterSync : ( diff : Record < string , any > ) => any | undefined
387
+ @nonenumerable afterSync ? : ( diff : Record < string , any > ) => any | undefined
388
388
@nonenumerable relationships : Record < string , JSORMBase | JSORMBase [ ] > = { }
389
- @nonenumerable klass : typeof JSORMBase
389
+ @nonenumerable klass ! : typeof JSORMBase
390
390
391
391
@nonenumerable private _persisted : boolean = false
392
392
@nonenumerable private _markedForDestruction : boolean = false
@@ -396,7 +396,7 @@ export class JSORMBase {
396
396
string ,
397
397
JsonapiResourceIdentifier [ ]
398
398
> = { }
399
- @nonenumerable private _attributes : ModelRecord < this>
399
+ @nonenumerable private _attributes ! : ModelRecord < this>
400
400
@nonenumerable private _originalAttributes : ModelRecord < this>
401
401
@nonenumerable private __meta__ : any
402
402
@nonenumerable private _errors : ValidationErrors < this> = { }
@@ -483,8 +483,9 @@ export class JSORMBase {
483
483
484
484
// fire afterSync hook if applicable
485
485
let hasDiff = Object . keys ( diff ) . length > 0
486
- let hasAfterSync = typeof this . afterSync !== "undefined"
487
- if ( hasDiff && hasAfterSync ) this . afterSync ( diff )
486
+ if ( hasDiff && typeof this . afterSync !== "undefined" ) {
487
+ this . afterSync ( diff )
488
+ }
488
489
}
489
490
return this . _onStoreChange
490
491
}
0 commit comments