Improved fn comments and definitions

This commit is contained in:
Alexander Cerutti
2023-04-19 23:27:50 +02:00
parent 1f12f64001
commit c7e41358eb
2 changed files with 56 additions and 49 deletions

View File

@@ -109,7 +109,9 @@ export function cloneRecursive<T extends Object>(object: T) {
return objectCopy;
}
export function assertUnfrozen(instance: InstanceType<typeof Bundle>) {
export function assertUnfrozen(
instance: InstanceType<typeof Bundle>,
): asserts instance is Bundle & { isFrozen: false } {
if (instance.isFrozen) {
throw new Error(Messages.BUNDLE.CLOSED);
}