mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 22:25:24 +00:00
Changed implementation of FieldsArray to accept passInstance instead of pool, to check frozen instance
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
import * as Messages from "./messages";
|
||||
import type Bundle from "./Bundle";
|
||||
|
||||
/**
|
||||
* Acts as a wrapper for converting date to W3C string
|
||||
* @param date
|
||||
@@ -105,3 +108,9 @@ export function cloneRecursive(object: Object) {
|
||||
|
||||
return objectCopy;
|
||||
}
|
||||
|
||||
export function assertUnfrozen(instance: InstanceType<typeof Bundle>) {
|
||||
if (instance.isFrozen) {
|
||||
throw new Error(Messages.BUNDLE.CLOSED);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user