@@ -121,7 +121,7 @@ export const applyModelConfig = <T extends typeof JSORMBase>(
121121 config = { ...config } // clone since we're going to mutate it
122122
123123 // 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
125125 // a loop for assigning other arbitrary options
126126 if ( config . credentialStorageBackend ) {
127127 ModelClass . credentialStorageBackend = config . credentialStorageBackend
@@ -384,9 +384,9 @@ export class JSORMBase {
384384 stale : boolean = false
385385 storeKey : string = ""
386386
387- @nonenumerable afterSync : ( diff : Record < string , any > ) => any | undefined
387+ @nonenumerable afterSync ? : ( diff : Record < string , any > ) => any | undefined
388388 @nonenumerable relationships : Record < string , JSORMBase | JSORMBase [ ] > = { }
389- @nonenumerable klass : typeof JSORMBase
389+ @nonenumerable klass ! : typeof JSORMBase
390390
391391 @nonenumerable private _persisted : boolean = false
392392 @nonenumerable private _markedForDestruction : boolean = false
@@ -396,7 +396,7 @@ export class JSORMBase {
396396 string ,
397397 JsonapiResourceIdentifier [ ]
398398 > = { }
399- @nonenumerable private _attributes : ModelRecord < this>
399+ @nonenumerable private _attributes ! : ModelRecord < this>
400400 @nonenumerable private _originalAttributes : ModelRecord < this>
401401 @nonenumerable private __meta__ : any
402402 @nonenumerable private _errors : ValidationErrors < this> = { }
@@ -483,8 +483,9 @@ export class JSORMBase {
483483
484484 // fire afterSync hook if applicable
485485 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+ }
488489 }
489490 return this . _onStoreChange
490491 }
0 commit comments